public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1802] Use x instead of v for alternative 2 (v, BH) in mov<mode>_internal.
@ 2023-06-14  8:19 hongtao Liu
  0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2023-06-14  8:19 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b7e42b85212e03eb59193a712eb523f26911a581

commit r14-1802-gb7e42b85212e03eb59193a712eb523f26911a581
Author: liuhongt <hongtao.liu@intel.com>
Date:   Tue Jun 13 14:20:59 2023 +0800

    Use x instead of v for alternative 2 (v, BH) in mov<mode>_internal.
    
    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.

Diff:
---
 gcc/config/i386/sse.md                   |  2 +-
 gcc/testsuite/gcc.target/i386/pr110227.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 7d4b4ec8df5..a0824ef2350 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1333,7 +1333,7 @@
 
 (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
index 00000000000..9b59f5b6e49
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr110227.c
@@ -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));
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-14  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14  8:19 [gcc r14-1802] Use x instead of v for alternative 2 (v, BH) in mov<mode>_internal hongtao Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).