i386: Use SHR to compare with large power-of-two constants [PR94650]
Convert unsigned compares where
m >= LARGE_POWER_OF_TWO
and LARGE_POWER_OF_TWO represent an immediate where bit 33+ is set to use
a SHR instruction and compare the result to 0. This avoids loading a
large immediate with MOVABS insn.
movabsq $
1099511627775, %rax
cmpq %rax, %rdi
ja .L5
gets converted to:
shrq $40, %rdi
jne .L5
PR target/94650
* config/i386/predicates.md (shr_comparison_operator): New predicate.
* config/i386/i386.md (compare->shr splitter): New splitters.
testsuite/ChangeLog:
PR target/94650
* gcc.targeti/i386/pr94650.c: New test.