aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-im.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2020-05-04 13:49:14 +0200
committerUros Bizjak <ubizjak@gmail.com>2020-05-04 13:49:14 +0200
commit8ea03e9016cbca5a7ee2b4befa4d5c32467b0982 (patch)
tree67d23af3275c8c5a39a516143abe17d843b0c210 /gcc/tree-ssa-loop-im.c
parent6b5c7ee0df6b87780f2fd6f2c5759a04e6eed1fe (diff)
downloadgcc-8ea03e9016cbca5a7ee2b4befa4d5c32467b0982.zip
gcc-8ea03e9016cbca5a7ee2b4befa4d5c32467b0982.tar.gz
gcc-8ea03e9016cbca5a7ee2b4befa4d5c32467b0982.tar.bz2
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.
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
0 files changed, 0 insertions, 0 deletions