diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2022-04-29 13:27:48 +0200 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2022-04-29 13:31:12 +0200 |
commit | 59119253b3133b30114194a04171f9d353b5c7f7 (patch) | |
tree | 105aa73678b251a054964c0602875c73a40ef3f7 /gcc/gcov-io.cc | |
parent | c090743b2ae0095f792371c7cbeb3cf6e2978f5d (diff) | |
download | gcc-59119253b3133b30114194a04171f9d353b5c7f7.zip gcc-59119253b3133b30114194a04171f9d353b5c7f7.tar.gz gcc-59119253b3133b30114194a04171f9d353b5c7f7.tar.bz2 |
i386: Optimize double-word negation [PR51954]
Introduce peephole2 pattern to convert from:
mov %esi, %edx
negl %eax
adcl $0, %edx
negl %edx
to:
xorl %edx, %edx
negl %eax
sbbl %esi, %edx
This conversion is profitable only when initial move is found. Otherwise,
additional move to a temporary together with clearing xor is needed.
2022-04-29 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
PR target/51954
* config/i386/i386.md (adcl/neg -> sbb peephole): New peephole2.
gcc/testsuite/ChangeLog:
PR target/51954
* gcc.target/i386/pr51954.c: New test.
Diffstat (limited to 'gcc/gcov-io.cc')
0 files changed, 0 insertions, 0 deletions