diff options
author | Haochen Jiang <haochen.jiang@intel.com> | 2022-01-12 10:01:21 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2022-01-13 13:03:11 +0800 |
commit | 5f19303ada7db92c155332e7ba317233ca05946b (patch) | |
tree | 8f2866087cd1d5b3409b0c79de2ccf5206a50ef8 /gcc/tree-streamer-out.c | |
parent | 080a06fcb076b3586ee4b00d415ae177f0b76b18 (diff) | |
download | gcc-5f19303ada7db92c155332e7ba317233ca05946b.zip gcc-5f19303ada7db92c155332e7ba317233ca05946b.tar.gz gcc-5f19303ada7db92c155332e7ba317233ca05946b.tar.bz2 |
Optimize a ^ ((a ^ b) & mask) to (~mask & a) | (b & mask).
From the perspective of the pipeline, `andn + and + ior` version take
2 cycles(AND and ANDN doesn't have dependence), but xor + and + xor
will take 3 cycles.
- xorl %edi, %esi
andl %edx, %esi
- movl %esi, %eax
- xorl %edi, %eax
+ andn %edi, %edx, %eax
+ orl %esi, %eax
gcc/ChangeLog:
PR target/94790
* config/i386/i386.md (*xor2andn): New define_insn_and_split.
gcc/testsuite/ChangeLog:
PR target/94790
* gcc.target/i386/pr94790-1.c: New test.
* gcc.target/i386/pr94790-2.c: Ditto.
Diffstat (limited to 'gcc/tree-streamer-out.c')
0 files changed, 0 insertions, 0 deletions