This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/63743] Thumb1: big regression for float operators by r216728


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]