diff options
author | Roger Sayle <roger@nextmovesoftware.com> | 2022-05-18 16:13:17 +0100 |
---|---|---|
committer | Roger Sayle <roger@nextmovesoftware.com> | 2022-05-18 16:18:22 +0100 |
commit | 30405ccc143bb4b63476a329800244826a88faf3 (patch) | |
tree | 6638507ed0d6c55379c90160bf00736a44f686ba /gcc/ada/fe.h | |
parent | 60fdce11dc9e5ddf671b07a3fc6ed70476860b22 (diff) | |
download | gcc-30405ccc143bb4b63476a329800244826a88faf3.zip gcc-30405ccc143bb4b63476a329800244826a88faf3.tar.gz gcc-30405ccc143bb4b63476a329800244826a88faf3.tar.bz2 |
Avoid andn and generate shorter not;and with -Oz on x86.
The x86 instruction encoding for SImode andn is longer than the
equivalent notl/andl sequence when the source for the not operand
is the same register as the destination. This patch adds post_reload
splitters to i386.md to avoid "-mbmi" (which enables andn) increasing
code size with "-Oz".
One minor subtlety with this patch is that the splitter for
*andn_si_ccno swaps the order of operands (match_dup 2 and match_dup 3)
as memory operands need to appear first in *test<mode>_1 patterns.
2022-05-18 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
* config/i386/i386.md (define_split): Split *andsi_1
and *andn_si_ccno after reload with -Oz.
gcc/testsuite/ChangeLog
* gcc.target/i386/bmi-andn-3.c: New test case.
Diffstat (limited to 'gcc/ada/fe.h')
0 files changed, 0 insertions, 0 deletions