]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Fix vec_unpacks_float_lo_v4si operand constraint [PR104469]
authorUros Bizjak <ubizjak@gmail.com>
Thu, 10 Feb 2022 16:23:17 +0000 (17:23 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Thu, 10 Feb 2022 16:29:02 +0000 (17:29 +0100)
2022-02-10  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

PR target/104469
* config/i386/sse.md (vec_unpacks_float_lo_v4si):
Change operand 1 constraint to register_operand.

gcc/testsuite/ChangeLog:

PR target/104469
* gcc.target/i386/pr104469.c: New test.

(cherry picked from commit 53fcc46339239c4958e2a15bb9e59274133bbcf7)

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

index f1b3521d48202bae24817832607d3f66c0bf8f95..1292126a46d5fe09318df3d347e487f8c082be7e 100644 (file)
 (define_expand "vec_unpacks_float_hi_v8si"
   [(set (match_dup 2)
        (vec_select:V4SI
-         (match_operand:V8SI 1 "vector_operand")
+         (match_operand:V8SI 1 "register_operand")
          (parallel [(const_int 4) (const_int 5)
                     (const_int 6) (const_int 7)])))
    (set (match_operand:V4DF 0 "register_operand")
diff --git a/gcc/testsuite/gcc.target/i386/pr104469.c b/gcc/testsuite/gcc.target/i386/pr104469.c
new file mode 100644 (file)
index 0000000..39cc31f
--- /dev/null
@@ -0,0 +1,12 @@
+/* PR target/104469 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+typedef double __attribute__((__vector_size__ (64))) F;
+typedef int __attribute__((__vector_size__ (32))) V;
+
+F
+foo (V v)
+{
+  return __builtin_convertvector (v, F);
+}