diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2020-05-06 17:33:51 +0200 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2020-05-06 17:33:51 +0200 |
commit | 7c2879301d3b027a1ba427a5d5c7557decb8a7ab (patch) | |
tree | 88de4ce841571a83a2dba3f013b5d79b2768a4f0 /gcc/common.opt | |
parent | 1266778548e20de82983b6446f3cb685068cfb1e (diff) | |
download | gcc-7c2879301d3b027a1ba427a5d5c7557decb8a7ab.zip gcc-7c2879301d3b027a1ba427a5d5c7557decb8a7ab.tar.gz gcc-7c2879301d3b027a1ba427a5d5c7557decb8a7ab.tar.bz2 |
i386: Use ADD to implement compares with negated operand [PR94913]
Use carry flag from addition to implement GEU/LTU compares
with negated operand, so e.g.
~x < y
compiles to:
addq %rsi, %rdi
setc %al
instead of:
notq %rdi
cmpq %rsi, %rdi
setb %al
PR target/94913
* config/i386/predicates.md (add_comparison_operator): New predicate.
* config/i386/i386.md (compare->add splitter): New splitters.
testsuite/ChangeLog:
PR target/94913
* gcc.target/i386/pr94913-1.c: New test.
* gcc.target/i386/pr94913-2.c: Ditto.
Diffstat (limited to 'gcc/common.opt')
0 files changed, 0 insertions, 0 deletions