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 target/38939] MULLW on often faster than SLWI ADD SLWI ADD..


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

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-11-23
                 CC|                            |segher at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
The problem is that expand_mult (in expmed.c) calculates the cost of
the reg*0x01010101 as six cycles, namely, two to construct the constant
in a register and then four for the reg-reg multiply.  The shift
sequence is just four cycles, so that is chosen.  expand_mult does not
realise this is within a loop and the construction of the constant will
be hoisted out of the loop.

Confirmed.

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