From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118257 invoked by alias); 16 Dec 2015 19:09:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 118246 invoked by uid 89); 16 Dec 2015 19:09:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=sk:HARD_RE, H*M:5000709 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 16 Dec 2015 19:09:27 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 46656C0AEE44; Wed, 16 Dec 2015 19:09:26 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-83.phx2.redhat.com [10.3.113.83]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBGJ9PBk000399; Wed, 16 Dec 2015 14:09:25 -0500 Subject: Re: [RFA] [PATCH] Fix invalid redundant extension elimination for rl78 port To: gcc-patches , rdsandiford@googlemail.com References: <56537379.4030101@redhat.com> <871tb655i9.fsf@googlemail.com> From: Jeff Law Message-ID: <5671B6E5.5000709@redhat.com> Date: Wed, 16 Dec 2015 19:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <871tb655i9.fsf@googlemail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg01650.txt.bz2 On 12/01/2015 12:32 PM, Richard Sandiford wrote: > Jeff Law writes: >> @@ -1080,6 +1070,18 @@ add_removable_extension (const_rtx expr, rtx_insn *insn, >> } >> } >> >> + /* Fourth, if the extended version occupies more registers than the >> + original and the source of the extension is the same hard register >> + as the destination of the extension, then we can not eliminate >> + the extension without deep analysis, so just punt. >> + >> + We allow this when the registers are different because the >> + code in combine_reaching_defs will handle that case correctly. */ >> + if ((HARD_REGNO_NREGS (REGNO (dest), mode) >> + != HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg))) >> + && REGNO (dest) == REGNO (reg)) >> + return; >> + >> /* Then add the candidate to the list and insert the reaching definitions >> into the definition map. */ >> ext_cand e = {expr, code, mode, insn}; > > I might be wrong, but the check looks specific to little-endian. Would > it make sense to use reg_overlap_mentioned_p instead of the REGNO check? Agreed. Testing in progress now... jeff