[Bug target/103743] PPC: Inefficient equality compare for large 64-bit constants having only 16-bit relevant bits in high part

guojiufu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 15 02:06:07 GMT 2022


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

Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed:

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

--- Comment #3 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
For "in == 0x8000000000000000LL", it would be also ok with:
rotldi %r9,%r3,16
cmpldi %cr0,%r9,32768

And it would be similar for "in == 0x8000FFFFFFFFFFFFLL" (highest bit and
low48bits are all 1)
rotldi %r9,%r3,16
cmpdi %cr0,%r9,-32768


More information about the Gcc-bugs mailing list