From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84326 invoked by alias); 9 Aug 2016 21:55: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 84311 invoked by uid 89); 9 Aug 2016 21:55:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=08AM, 08am 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, 09 Aug 2016 21:55:33 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD7983F720; Tue, 9 Aug 2016 21:55:31 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-43.brq.redhat.com [10.40.204.43]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u79LtUhH032475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 Aug 2016 17:55:31 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u79LtShU015421; Tue, 9 Aug 2016 23:55:28 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u79LtRI1015420; Tue, 9 Aug 2016 23:55:27 +0200 Date: Tue, 09 Aug 2016 21:55:00 -0000 From: Jakub Jelinek To: kugan Cc: "gcc-patches@gcc.gnu.org" , Richard Biener Subject: Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments Message-ID: <20160809215527.GC14857@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <0a1eaaf8-3ede-cd56-ffb5-40b25f94e46e@linaro.org> <98613cff-7c48-1a56-0014-6d87c35a8f26@linaro.org> <20160809214617.GB14857@tucnak.redhat.com> <7210cceb-be3b-44b1-13b7-4152e89d2a4f@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7210cceb-be3b-44b1-13b7-4152e89d2a4f@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00765.txt.bz2 On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: > On 10/08/16 07:46, Jakub Jelinek wrote: > >On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: > >>There was no new regression while testing. I also moved the testcase from > >>gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this OK for trunk? > > > >This looks strange. The tree-ssa-reassoc.c code has been trying to never > >reuse SSA_NAMEs if they would hold a different value. > >So there should be no resetting of flow sensitive info needed. > > We are not reusing but, if you see the example change in reassoc: > > - _5 = -_4; > - _6 = _2 * _5; > + _5 = _4; > + _6 = _5 * _2; > > _5 and _6 will now have different value ranges because they compute > different values. Therefore I think we should reset (?). No. We should not have reused _5 and _6 for the different values. It is not harmful just for the value ranges, but also for debug info. Jakub