From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28793 invoked by alias); 7 Sep 2010 13:09:10 -0000 Received: (qmail 26693 invoked by uid 48); 7 Sep 2010 13:05:49 -0000 Date: Tue, 07 Sep 2010 13:09:00 -0000 Message-ID: <20100907130549.26692.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/45256] Missed arithmetic simplification at tree level In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ibolton at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg00875.txt.bz2 ------- Comment #2 from ibolton at gcc dot gnu dot org 2010-09-07 13:05 ------- (In reply to comment #1) > Created an attachment (id=21454) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21454&action=view) [edit] > Testcase > OK. I can see this happening on trunk, when compiled as follows: arm-none-linux-gnueabi/obj/gcc3/gcc/cc1 -O2 pr45256.i -fdump-tree-all -fdump-rtl-all. The 148t.optimized dump shows exactly what has been posted above, where effectively 32 is both added and then subtracted. The 183r.dce dump still shows this extra work happening and the 184r.combine dump shows that it has been optimised away. It should be possible to do this optimisation at the tree-level, so this bug is confirmed. Should I check whether this happens for 4.4 and 4.5 too? -- ibolton at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |missed-optimization Known to fail| |4.6.0 Last reconfirmed|0000-00-00 00:00:00 |2010-09-07 13:05:49 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45256