Fix incorrect insn type to avoid ICE in memory attr auto-detection.
Memory attribute auto detection will check operand 2 for type sselog, and check operand 1 for type sselog1. For below 2 insns, there's no operand 2. Change type to sselog1. gcc/ChangeLog: PR target/107540 * config/i386/sse.md (avx512f_movddup512<mask_name>): Change type from sselog to sselog1. (avx_movddup256<mask_name>): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr107540.c: New test.
This commit is contained in:
parent
69023a9f95
commit
916bec9a05
2 changed files with 14 additions and 2 deletions
|
@ -12203,7 +12203,7 @@
|
|||
(const_int 6) (const_int 14)])))]
|
||||
"TARGET_AVX512F"
|
||||
"vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
|
||||
[(set_attr "type" "sselog")
|
||||
[(set_attr "type" "sselog1")
|
||||
(set_attr "prefix" "evex")
|
||||
(set_attr "mode" "V8DF")])
|
||||
|
||||
|
@ -12234,7 +12234,7 @@
|
|||
(const_int 2) (const_int 6)])))]
|
||||
"TARGET_AVX && <mask_avx512vl_condition>"
|
||||
"vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
|
||||
[(set_attr "type" "sselog")
|
||||
[(set_attr "type" "sselog1")
|
||||
(set_attr "prefix" "<mask_prefix>")
|
||||
(set_attr "mode" "V4DF")])
|
||||
|
||||
|
|
12
gcc/testsuite/gcc.target/i386/pr107540.c
Normal file
12
gcc/testsuite/gcc.target/i386/pr107540.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-flive-range-shrinkage -mavx" } */
|
||||
|
||||
typedef double __attribute__((__vector_size__ (32))) V;
|
||||
|
||||
V v;
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
v = __builtin_ia32_movddup256 (v);
|
||||
}
|
Loading…
Add table
Reference in a new issue