[x86] Use x instead of v for alternative 2 (v, BH) in mov<mode>_internal.
Checks
Commit Message
Since there's no evex version for vpcmpeq ymm, ymm, ymm.
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
Ready to push to trunk and backport to GCC13.
gcc/ChangeLog:
PR target/110227
* config/i386/sse.md (mov<mode>_internal>): Use x instead of v
for alternative 2 since there's no evex version for vpcmpeqd
ymm, ymm, ymm.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr110227.c: New test.
---
gcc/config/i386/sse.md | 2 +-
gcc/testsuite/gcc.target/i386/pr110227.c | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.target/i386/pr110227.c
@@ -1324,7 +1324,7 @@ (define_expand "mov<mode>"
(define_insn "mov<mode>_internal"
[(set (match_operand:VMOVE 0 "nonimmediate_operand"
- "=v,v ,v,v ,m")
+ "=v,v ,x,v ,m")
(match_operand:VMOVE 1 "nonimmediate_or_sse_const_operand"
" C,<sseconstm1>,BH,vm,v"))]
"TARGET_SSE
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do assemble { target { ! ia32 } } } */
+/* { dg-options " -O2 -mavx512vl" } */
+
+#include <immintrin.h>
+
+void f()
+{
+ __m256i mask = _mm256_set_epi32(0, 0, 0, 0, -1, -1, -1, -1);
+ register __m256i reg asm("xmm16") = mask;
+ asm(""::"v"(reg));
+}