From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30825 invoked by alias); 5 Nov 2014 08:20:09 -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 30787 invoked by uid 48); 5 Nov 2014 08:20:05 -0000 From: "zhenqiang.chen at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63743] New: Thumb1: big regression for float operators by r216728 Date: Wed, 05 Nov 2014 08:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: zhenqiang.chen at arm dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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/msg00233.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63743 Bug ID: 63743 Summary: Thumb1: big regression for float operators by r216728 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhenqiang.chen at arm dot com Created attachment 33887 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33887&action=edit test case Root cause: the fold_stmt swaps the operands, which leads to register shuffle. commit f619ecaed41d1487091098a0f4fdf4d6ed1fa379 Author: rguenth Date: Mon Oct 27 11:30:23 2014 +0000 2014-10-27 Richard Biener * tree-ssa-forwprop.c: Include tree-cfgcleanup.h and tree-into-ssa.h. (lattice): New global. (fwprop_ssa_val): New function. (fold_all_stmts): Likewise. (pass_forwprop::execute): Finally fold all stmts. * gcc.dg/tree-ssa/forwprop-6.c: Scan ccp1 dump instead. * gcc.dg/strlenopt-8.c: Adjust and XFAIL for non_strict_align target due to memcpy inline-expansion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216728 138bc75d-0d04-0410-961f-82ee72b054a4 A simplified case is attached. Options: -mthumb -Os -mcpu=cortex-m0 Before the patch, tree codes like _20 = _14 + _19; _21 = _20 * x_13; After the patch, tree codes like _20 = _14 + _19; _21 = x_13 * _20; Without HARD fpu support, all operators will be changed to function calls. The assemble codes change like: Before the patch, bl __aeabi_dadd ldr r2, [sp] ldr r3, [sp, #4] /* r0, r1 are reused from the return values of the previous call. */ bl __aeabi_dmul After the patch, bl __aeabi_dadd mov r2, r0 mov r3, r1 ldr r0, [sp] ldr r1, [sp, #4] bl __aeabi_dmul