i386: Remove %q modifier from two pmov insn templates [PR95355]
authorUros Bizjak <ubizjak@gmail.com>
Wed, 27 May 2020 19:02:51 +0000 (21:02 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 27 May 2020 19:02:51 +0000 (21:02 +0200)
2020-05-27  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:
PR target/95355
* config/i386/sse.md
(<mask_codefor>avx512f_<code>v16qiv16si2<mask_name>):
Remove %q operand modifier from insn template.
(avx512f_<code>v8hiv8di2<mask_name>): Ditto.

gcc/testsuite/ChangeLog:
PR target/95355
* gcc.target/i386/pr95355.c: New test.

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

index fde65391d7d4279aa01e9656b63ef633ecfb679b..1cf1b8cea3b29dd4a1bb1f96596c34b215089393 100644 (file)
        (any_extend:V16SI
          (match_operand:V16QI 1 "nonimmediate_operand" "vm")))]
   "TARGET_AVX512F"
-  "vpmov<extsuffix>bd\t{%1, %0<mask_operand2>|%0<mask_operand2>, %q1}"
+  "vpmov<extsuffix>bd\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
   [(set_attr "type" "ssemov")
    (set_attr "prefix" "evex")
    (set_attr "mode" "XI")])
        (any_extend:V8DI
          (match_operand:V8HI 1 "nonimmediate_operand" "vm")))]
   "TARGET_AVX512F"
-  "vpmov<extsuffix>wq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %q1}"
+  "vpmov<extsuffix>wq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
   [(set_attr "type" "ssemov")
    (set_attr "prefix" "evex")
    (set_attr "mode" "XI")])
diff --git a/gcc/testsuite/gcc.target/i386/pr95355.c b/gcc/testsuite/gcc.target/i386/pr95355.c
new file mode 100644 (file)
index 0000000..3e4faba
--- /dev/null
@@ -0,0 +1,20 @@
+/* PR target/95355 */
+/* { dg-do assemble { target avx512dq } } */
+/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target masm_intel } */
+/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre -ftree-slp-vectorize -fno-tree-ter -mavx512dq -masm=intel" } */
+
+typedef int __attribute__((__vector_size__(64))) U;
+typedef __int128 __attribute__((__vector_size__(32))) V;
+
+U i;
+V j;
+
+int
+foo(unsigned char l)
+{
+  V m = j % 999;
+  U n = l <= i;
+  V o = ((union { U a; V b[2]; }) n).b[0] + m;
+  return o[0];
+}