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

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 5 08:35:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63743

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
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).



More information about the Gcc-bugs mailing list