From: liuhongt Date: Tue, 13 Jun 2023 06:20:59 +0000 (+0800) Subject: Use x instead of v for alternative 2 (v, BH) in mov_internal. X-Git-Tag: basepoints/gcc-15~8337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7e42b85212e03eb59193a712eb523f26911a581;p=thirdparty%2Fgcc.git Use x instead of v for alternative 2 (v, BH) in mov_internal. Since there's no evex version for vpcmpeq ymm, ymm, ymm. gcc/ChangeLog: PR target/110227 * config/i386/sse.md (mov_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 --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 7d4b4ec8df54..a0824ef2350c 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1333,7 +1333,7 @@ (define_insn "mov_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,,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 000000000000..9b59f5b6e49e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr110227.c @@ -0,0 +1,11 @@ +/* { dg-do assemble { target { ! ia32 } } } */ +/* { dg-options " -O2 -mavx512vl" } */ + +#include + +void f() +{ + __m256i mask = _mm256_set_epi32(0, 0, 0, 0, -1, -1, -1, -1); + register __m256i reg asm("xmm16") = mask; + asm(""::"v"(reg)); +}