From patchwork Sun Sep 1 22:31:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 271657 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 DBFEB2C009C for ; Mon, 2 Sep 2013 08:32:22 +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 :message-id:cc:from:to:in-reply-to:content-type:subject :mime-version:date:references; q=dns; s=default; b=mRI9mLa8iO4Ln QZHjYk4oD3Yiejc4DpMGqJ7ILxSS7KCtfNwSXsn9l8rpAMoWw+Rm6vH3mvtienVp xVGf83XqVkZlmezqY4htg2xOHi/JTVIxFhs4GBG2V559U6kn9sqj84g+pQuDZOAM yfEVK3Kz/O5WrjPIRuZab9kfc4FtOc= 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 :message-id:cc:from:to:in-reply-to:content-type:subject :mime-version:date:references; s=default; bh=/zaSh8tun8812tgs97H UIYdd7F8=; b=M+SwsAfM6zeDweMZq21AP6r1hI+sBLVyOLJf4kWwQKmj0ezufor Nnj2dail3NjHng4ahvWCpfUahOTqj+xxC4B7RQWEvKDqMr5J/V6VRe92CGgbsNT8 qYLU42HoVThn5BC1oLKskt97CKNeLAchvftUBL8HTOHHOtEns2ideshc= Received: (qmail 28342 invoked by alias); 1 Sep 2013 22:32:15 -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 28326 invoked by uid 89); 1 Sep 2013 22:32:14 -0000 Received: from blu0-omc3-s16.blu0.hotmail.com (HELO blu0-omc3-s16.blu0.hotmail.com) (65.55.116.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Sep 2013 22:32:14 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL, BAYES_40, FSL_HELO_NON_FQDN_1, KHOP_DNSBL_BUMP, KHOP_THREADED, MSGID_FROM_MTA_HEADER, RCVD_IN_HOSTKARMA_BL, RCVD_IN_JMF_BL, RDNS_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: blu0-omc3-s16.blu0.hotmail.com Received: from BLU0-SMTP71 ([65.55.116.74]) by blu0-omc3-s16.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 1 Sep 2013 15:32:12 -0700 X-TMN: [kT29eS+D3B302KThmPD9cRCa8S3BIQmE] Message-ID: Received: from [192.168.2.10] ([64.229.84.211]) by BLU0-SMTP71.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 1 Sep 2013 15:32:11 -0700 CC: gcc-patches@gcc.gnu.org, Steven Bosscher From: John David Anglin To: Eric Botcazou In-Reply-To: <201308301238.58640.ebotcazou@adacore.com> Subject: Re: [PATCH]: Fix PR middle-end/56382 -- Only move MODE_COMPLEX_FLOAT by parts if we can create pseudos MIME-Version: 1.0 (Apple Message framework v936) Date: Sun, 1 Sep 2013 18:31:54 -0400 References: <201308301238.58640.ebotcazou@adacore.com> On 30-Aug-13, at 6:38 AM, Eric Botcazou wrote: > Let's avoid trying to do something general since this seems to be > really a > corner case. Can't we simply deal with hard registers specially? > > /* Move floating point as parts if splitting is easy. */ > if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT > && 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; Eric, your patch works for me. Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Dave --- John David Anglin dave.anglin@bell.net Index: expr.c =================================================================== --- expr.c (revision 202102) +++ expr.c (working copy) @@ -3236,7 +3236,13 @@ /* Move floating point as parts. */ 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)