From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14706 invoked by alias); 5 Nov 2014 12:34:44 -0000 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 Received: (qmail 14668 invoked by uid 48); 5 Nov 2014 12:34:39 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63743] Thumb1: big regression for float operators by r216728 Date: Wed, 05 Nov 2014 12:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg00263.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63743 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #5 from Richard Biener --- This is just operand canonicalization according to tree_swap_operands which is now consistently applied. It was a bug that it wasn't applied before (the usual offender here is SSA rewriting that doesn't fold "changed" statements nor re-canonicalizes). You are just (un)lucky btw, try both double test1 (double x, double y) { double tem = x + y; double tem2 = x; return tem2 * tem; } and double test1 (double x, double y) { double tem = x + y; double tem2 = x; return tem * tem2; } there is nothing that forces ordering in the way you would prefer it. So as Jakub says - this needs addressing in RTL expansion and/or TER and SSA coalescing.