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 middle-end/80131] powerpc: 1U << (31 - x) doesn't generate optimised code


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

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

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

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
It may be best to do this in combine.

If we have  d = a << (b - c);  and  a << b  does not truncate in the
original mode, write it as  d := (a << b) >> c;  instead (and then
see if it is actually cheaper, as combine always does).

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