]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use x instead of v for alternative 2 (v, BH) in mov<mode>_internal.
authorliuhongt <hongtao.liu@intel.com>
Tue, 13 Jun 2023 06:20:59 +0000 (14:20 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 14 Jun 2023 08:18:54 +0000 (16:18 +0800)
Since there's no evex version for vpcmpeq ymm, ymm, ymm.

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
gcc/testsuite/gcc.target/i386/pr110227.c [new file with mode: 0644]

index 7d4b4ec8df541359362dac6dfbbc968b47f6119c..a0824ef2350cac986db4b826ac6d13499dcc7162 100644 (file)
 
 (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
diff --git a/gcc/testsuite/gcc.target/i386/pr110227.c b/gcc/testsuite/gcc.target/i386/pr110227.c
new file mode 100644 (file)
index 0000000..9b59f5b
--- /dev/null
@@ -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));
+}