re PR target/91408 (ICE in extract_insn, at recog.c:2310 since r273981)
authorJakub Jelinek <jakub@redhat.com>
Sat, 10 Aug 2019 10:13:52 +0000 (12:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 10 Aug 2019 10:13:52 +0000 (12:13 +0200)
PR target/91408
* config/i386/mmx.md (usadv8qi): Use register_operand instead of
vector_operand.

* gcc.target/i386/pr91408.c: New test.

From-SVN: r274251

gcc/ChangeLog
gcc/config/i386/mmx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr91408.c [new file with mode: 0644]

index 350483a..56913a0 100644 (file)
@@ -1,3 +1,9 @@
+2019-08-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/91408
+       * config/i386/mmx.md (usadv8qi): Use register_operand instead of
+       vector_operand.
+
 2019-09-09  Vladimir Makarov  <vmakarov@redhat.com>
 
        * reload1.c (finish_spills): Do not check ira_conflicts_p when
index 3bbf5e0..1fffea1 100644 (file)
 (define_expand "usadv8qi"
   [(match_operand:V2SI 0 "register_operand")
    (match_operand:V8QI 1 "register_operand")
-   (match_operand:V8QI 2 "vector_operand")
-   (match_operand:V2SI 3 "vector_operand")]
+   (match_operand:V8QI 2 "register_operand")
+   (match_operand:V2SI 3 "register_operand")]
   "TARGET_MMX_WITH_SSE"
 {
   rtx t1 = gen_reg_rtx (V1DImode);
index 5864fc0..3fec121 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/91408
+       * gcc.target/i386/pr91408.c: New test.
+
 2019-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * gcc.target/powerpc/vec_rotate-1.c: Rename to ...
diff --git a/gcc/testsuite/gcc.target/i386/pr91408.c b/gcc/testsuite/gcc.target/i386/pr91408.c
new file mode 100644 (file)
index 0000000..13acd15
--- /dev/null
@@ -0,0 +1,29 @@
+/* PR target/91408 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-vectorize -fno-tree-forwprop" } */
+
+long long a;
+unsigned char b;
+short *c;
+int d;
+
+void
+foo (long long *x)
+{
+  unsigned char *e = (char *) x;
+  int f, g = 0;
+  for (d = 0; d < 8; d++)
+    {
+      f = b - e[d];
+      if (f < 0)
+       f = -f;
+      g += f;
+    }
+  c[0] = g;
+}
+
+void
+bar (void)
+{
+  foo (&a);
+}