From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16344 invoked by alias); 3 Sep 2014 18:37:00 -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 16334 invoked by uid 89); 3 Sep 2014 18:36:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_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; Wed, 03 Sep 2014 18:36:58 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s83Iau3o002986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Sep 2014 14:36:56 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-71.phx2.redhat.com [10.3.113.71]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s83IatAH030941; Wed, 3 Sep 2014 14:36:56 -0400 Message-ID: <54075FC7.6050008@redhat.com> Date: Wed, 03 Sep 2014 18:37:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Easwaran Raman CC: GCC Patches , Brooks Moses Subject: Re: [4.9] PR 62146 References: <5400DD5D.1070009@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00261.txt.bz2 On 09/02/14 12:52, Easwaran Raman wrote: > It turns out that the REG_EQUAL note is removed on a hoisted > instruction (relevant code is in dead_or_predicable in ifcvt.c) if the > source of the move instruction is not a function invariant. In this > case, the source is a function invariant (constant) and so that > doesn't kick in. I don't understand why this exemption for function > invariant is there and the original thread in > https://gcc.gnu.org/ml/gcc/2005-05/msg01710.html doesn't explain > either. Should I just remove the REG_EQUAL notes of all hoisted > instructions or are there cases where it is safe to leave the note? I suspect it was left in in an attempt to keep as many REG_EQUAL notes as possible as the notes can help later optimizations. But even those equivalences are not necessarily safe. I'm pretty sure the right thing to do here is just drop the note regardless of whether or not its an invariant. jeff