]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix ICE.
authorliuhongt <hongtao.liu@intel.com>
Mon, 23 Aug 2021 09:00:36 +0000 (17:00 +0800)
committerliuhongt <hongtao.liu@intel.com>
Mon, 23 Aug 2021 09:52:03 +0000 (17:52 +0800)
gcc/ChangeLog:

PR target/102016
* config/i386/sse.md (*avx512f_pshufb_truncv8hiv8qi_1): Add
TARGET_AVX512BW to condition.

gcc/testsuite/ChangeLog:

PR target/102016
* gcc.target/i386/pr102016.c: New test.

gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/pr102016.c [new file with mode: 0644]

index 138896877939d35fcc61d253e5769669189020a3..95f95823ea3b690dd203ab2cebc82b4acd2637ef 100644 (file)
               (match_operand:V16QI 2 "pshufb_truncv8hiv8qi_operand")]
           UNSPEC_PSHUFB) 0)
          (parallel [(const_int 0)])))]
-  "TARGET_AVX512VL && ix86_pre_reload_split ()"
+  "TARGET_AVX512VL && TARGET_AVX512BW && ix86_pre_reload_split ()"
   "#"
   "&& 1"
   [(const_int 0)]
diff --git a/gcc/testsuite/gcc.target/i386/pr102016.c b/gcc/testsuite/gcc.target/i386/pr102016.c
new file mode 100644 (file)
index 0000000..2ff75cb
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512vl -O2" } */
+typedef char v8qi __attribute__((vector_size (8)));
+typedef char v16qi __attribute__((vector_size (16)));
+v8qi
+foo_wb_128 (v16qi x)
+{
+  return __builtin_shufflevector (x, x,
+                                 0, 2, 4, 6, 8, 10, 12, 14);
+}