From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8399 invoked by alias); 5 Nov 2014 08:35:49 -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 8363 invoked by uid 48); 5 Nov 2014 08:35:46 -0000 From: "jakub 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 08:35: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: jakub 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/msg00234.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63743 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek --- Were we swapping operands before? I mean, if you rewrite the testcase to swap the * arguments in the source, did you get the same more efficient code in the past? In any case, this doesn't sound something that we should keep in mind in GIMPLE passes, + and * are just commutative, how they are expanded is a matter of expansion. So, either look for this during expansion (if a commutative operation is being expanded using libcall (or is this emitted by the backend?), see if one of the operands isn't result of immediately preceeding emitted call and if it is, perhaps swap the order of arguments), or add some register allocator smarts (add a way to mark library calls as commutative and allow RA to swap arguments to them if beneficial).