This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63743] Thumb1: big regression for float operators by r216728
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Nov 2014 12:34:38 +0000
- Subject: [Bug tree-optimization/63743] Thumb1: big regression for float operators by r216728
- Auto-submitted: auto-generated
- References: <bug-63743-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63743
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
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.