diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-05-08 10:03:56 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-05-08 10:03:56 +0200 |
commit | a229f9b3737062c6e853879be6683f3f3e4a6661 (patch) | |
tree | 31fa0f21442170ed14bc6e3f755c2f0a08010653 /gcc/ada/gcc-interface/utils.c | |
parent | a139bc2b492de8a761890a5d299951dede3d8f7b (diff) | |
download | gcc-a229f9b3737062c6e853879be6683f3f3e4a6661.zip gcc-a229f9b3737062c6e853879be6683f3f3e4a6661.tar.gz gcc-a229f9b3737062c6e853879be6683f3f3e4a6661.tar.bz2 |
ix86: Add peephole2 for *add<mode>3_cc_overflow_1 followed by matching memory store [PR94857]
The following peephole2 changes:
- addl (%rdi), %esi
+ xorl %eax, %eax
+ addl %esi, (%rdi)
setc %al
- movl %esi, (%rdi)
- movzbl %al, %eax
ret
on the testcase. *add<mode>3_cc_overflow_1, being an add{l,q} insn, is
commutative, so if TARGET_READ_MODIFY_WRITE we can replace
addl (%rdi), %esi; movl %esi, (%rdi)
with
addl %esi, (%rdi)
if %esi is dead after those two insns.
2020-05-08 Jakub Jelinek <jakub@redhat.com>
PR target/94857
* config/i386/i386.md (peephole2 after *add<mode>3_cc_overflow_1): New
define_peephole2.
* gcc.target/i386/pr94857.c: New test.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
0 files changed, 0 insertions, 0 deletions