diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2023-10-25 16:26:57 +0200 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2023-10-25 16:28:09 +0200 |
commit | 678e6c328c77db383431751bcfcf867b02369bd6 (patch) | |
tree | d46342f158cb08944263f4958b29893bb9fb2be0 /gcc/expr.cc | |
parent | f7dbf6230453c76a19921607601eff968bb70169 (diff) | |
download | gcc-678e6c328c77db383431751bcfcf867b02369bd6.zip gcc-678e6c328c77db383431751bcfcf867b02369bd6.tar.gz gcc-678e6c328c77db383431751bcfcf867b02369bd6.tar.bz2 |
i386: Narrow test instructions with immediate operands [PR111698]
Narrow test instructions with immediate operand that test memory location
for zero. E.g. testl $0x00aa0000, mem can be converted to testb $0xaa, mem+2.
Reject targets where reading (possibly unaligned) part of memory location
after a large write to the same address causes store-to-load forwarding stall.
PR target/111698
gcc/ChangeLog:
* config/i386/x86-tune.def (X86_TUNE_PARTIAL_MEMORY_READ_STALL):
New tune.
* config/i386/i386.h (TARGET_PARTIAL_MEMORY_READ_STALL): New macro.
* config/i386/i386.md: New peephole pattern to narrow test
instructions with immediate operands that test memory locations
for zero.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr111698.c: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions