From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12940 invoked by alias); 17 Nov 2015 12:10:34 -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 12926 invoked by uid 89); 17 Nov 2015 12:10:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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; Tue, 17 Nov 2015 12:10:31 +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 A1480A0B91; Tue, 17 Nov 2015 12:10:30 +0000 (UTC) Received: from localhost.localdomain (vpn1-4-126.ams2.redhat.com [10.36.4.126]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAHCAT5T003166; Tue, 17 Nov 2015 07:10:29 -0500 Subject: Re: [PATCH][RTL-ree] PR rtl-optimization/68194: Restrict copy instruction in presence of conditional moves To: Kyrill Tkachov , GCC Patches References: <5649E333.4090904@arm.com> <564A2339.3030308@redhat.com> <564AEE94.3070708@arm.com> Cc: Jeff Law From: Bernd Schmidt Message-ID: <564B1934.6050300@redhat.com> Date: Tue, 17 Nov 2015 12:10: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: <564AEE94.3070708@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02069.txt.bz2 On 11/17/2015 10:08 AM, Kyrill Tkachov wrote: > Yes, I had considered that as well. It should be equivalent. I didn't > use !reg_used_between_p because I thought > it'd be more expensive than checking reg_overlap_mentioned_p since we > must iterate over a number of instructions > and call reg_overlap_mentioned_p on each one. But I suppose this case is > rare enough that it wouldn't make any > measurable difference. > > Would you prefer to use !reg_used_between_p here? I would but apparently it doesn't work, so that's kind of neither here nor there. >> The added comment could lead to some confusion since it's placed in >> front of an existing if statement that also tests a different >> condition. Also, if we go with your fix, >> >>> + || !reg_overlap_mentioned_p (tmp_reg, SET_SRC (PATTERN >>> (cand->insn)))) >> >> Shouldn't this really be !rtx_equal_p? >> > > Maybe, will it behave the right way if the two regs have different modes > or when subregs are involved? It would return false, in which case we'll conservatively fail here. I think that's desirable? Bernd