Extend predicate of operands[1] from register_operand to vector_operand for andnot...
authorHaochen Jiang <haochen.jiang@intel.com>
Thu, 30 Dec 2021 07:47:58 +0000 (15:47 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 11 Jan 2022 02:10:14 +0000 (10:10 +0800)
commit4bb79e27c02c5cd57d5781bef20e70982d898c40
tree388319e806c74b1fc14e98abcb281064637ccc74
parentd9450aa0e8b70f2362925cbcac8a29733899d37f
Extend predicate of operands[1] from register_operand to vector_operand for andnot insn.

This can do optimization like

-       pcmpeqd %xmm0, %xmm0
-       pxor    g(%rip), %xmm0
-       pand    %xmm1, %xmm0
+       movdqa  g(%rip), %xmm0
+       pandn   %xmm1, %xmm0

gcc/ChangeLog:

PR target/53652
* config/i386/sse.md (*andnot<mode>3): Extend predicate of
operands[1] from register_operand to vector_operand.

gcc/testsuite/ChangeLog:

PR target/53652
* gcc.target/i386/pr53652-1.c: New test.
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/pr53652-1.c [new file with mode: 0644]