]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86_64: PR target/100711: Splitters for pandn
authorRoger Sayle <roger@nextmovesoftware.com>
Tue, 30 Nov 2021 08:35:39 +0000 (08:35 +0000)
committerRoger Sayle <roger@nextmovesoftware.com>
Tue, 30 Nov 2021 08:35:39 +0000 (08:35 +0000)
commitc39d77f252e895306ef88c1efb3eff04e4232554
tree90de97dc9fdbc692cb7dbdf8e06eac36b77d9021
parentb962469a01b017ae2e7ef2865a40e37094ceec4b
x86_64: PR target/100711: Splitters for pandn

This patch addresses PR target/100711 by introducing define_split
patterns so that not/broadcast/pand may be simplified (by combine)
to broadcast/pandn.  This introduces two splitters one for optimizing
pandn on TARGET_SSE for V4SI and V2DI, and another for vpandn on
TARGET_AVX2 for V16QI, V8HI, V32QI, V16HI and V8SI.  Each splitter
has its own new testcase.

I've also confirmed that not/broadcast/pandn is already getting
simplified to broadcast/pand by the middle-end optimizers.

2021-11-30  Roger Sayle  <roger@nextmovesoftware.com>
    Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog
PR target/100711
* config/i386/sse.md (define_split): New splitters to simplify
not;vec_duplicate;and as vec_duplicate;andn.

gcc/testsuite/ChangeLog
PR target/100711
* gcc.target/i386/pr100711-1.c: New test case.
* gcc.target/i386/pr100711-2.c: New test case.
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/pr100711-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr100711-2.c [new file with mode: 0644]