From patchwork Mon Sep 2 16:19:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 271988 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 5323D2C009E for ; Tue, 3 Sep 2013 02:20:20 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=USK8d7+dGzQBzLg7H4biuFBbXMfTqUv/OUWWb0eZVTMt+Wc8NcGKU Z7OgwkVOnwzpzEvZNzV7PWFHSruQefRJ490HuNoJhrbjEtwazyDOrRGoqz2+SY4/ j8KoEItD/mxTBz9zWs3+Ep1jwVBGntiqS/ow78YwVtkWu1GkQ7Klmc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=fyo/LhnSONDy7aeAYyALETeyJDk=; b=iikKV+NGXcXs6Vn9RuVqpbeAyXxL YNUe7xqwmuShklD4XYVF2X7FzOkVoImydgNd8ZB+P8K5aKkGTs1q+9UoSaxVh5oc cL0bhcjdtktjeGJh1OUiC2FihudWXl4PE/Sf+te/uQ9itBEee4n0YkPzlPK+TlRN IRXJYC7go/uqJv8= Received: (qmail 13912 invoked by alias); 2 Sep 2013 16:20:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13893 invoked by uid 89); 2 Sep 2013 16:20:13 -0000 Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 02 Sep 2013 16:20:13 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00, KHOP_THREADED autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 0731A266086D; Mon, 2 Sep 2013 18:20:09 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SS5gXpNvNm63; Mon, 2 Sep 2013 18:20:08 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id D9CF52660864; Mon, 2 Sep 2013 18:20:08 +0200 (CEST) From: Eric Botcazou To: John David Anglin Cc: gcc-patches@gcc.gnu.org, Steven Bosscher Subject: Re: [PATCH]: Fix PR middle-end/56382 -- Only move MODE_COMPLEX_FLOAT by parts if we can create pseudos Date: Mon, 02 Sep 2013 18:19:40 +0200 Message-ID: <5204824.c27S7jqm0W@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: <201308301238.58640.ebotcazou@adacore.com> MIME-Version: 1.0 > Eric, your patch works for me. Tested on hppa2.0w-hp-hpux11.11 and > hppa64-hp-hpux11.11. Thanks, also tested on x86-64/Linux and applied on the mainline. 2013-09-02 Eric Botcazou PR middle-end/56382 * expr.c (emit_move_complex): Do not move complex FP values as parts if the source or the destination is a single hard register. Index: expr.c =================================================================== --- expr.c (revision 202160) +++ expr.c (working copy) @@ -3232,11 +3232,16 @@ emit_move_complex (enum machine_mode mod if (push_operand (x, mode)) return emit_move_complex_push (mode, x, y); - /* See if we can coerce the target into moving both values at once. */ - - /* Move floating point as parts. */ + /* See if we can coerce the target into moving both values at once, except + for floating point where we favor moving as parts if this is easy. */ if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT - && optab_handler (mov_optab, GET_MODE_INNER (mode)) != CODE_FOR_nothing) + && optab_handler (mov_optab, GET_MODE_INNER (mode)) != CODE_FOR_nothing + && !(REG_P (x) + && HARD_REGISTER_P (x) + && hard_regno_nregs[REGNO(x)][mode] == 1) + && !(REG_P (y) + && HARD_REGISTER_P (y) + && hard_regno_nregs[REGNO(y)][mode] == 1)) try_int = false; /* Not possible if the values are inherently not adjacent. */ else if (GET_CODE (x) == CONCAT || GET_CODE (y) == CONCAT)