re PR target/85430 (ICE: SIGSEGV in memory_operand at recog.c:1358/9 with -O2 -fno...
authorJakub Jelinek <jakub@redhat.com>
Tue, 17 Apr 2018 17:01:31 +0000 (19:01 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 17 Apr 2018 17:01:31 +0000 (19:01 +0200)
PR target/85430
* config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.

* gcc.dg/pr85430.c: New test.

From-SVN: r259436

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr85430.c [new file with mode: 0644]

index e444bf1c7c1632d154fb6640f5d30115854b0cb8..1d6d385519b2573b48a4da93635153b4f2a0b4c5 100644 (file)
@@ -1,5 +1,8 @@
 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/85430
+       * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
+
        PR middle-end/85414
        * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
        on a SUBREG.
index 352212094ec0f1217e432eff179d6f8e342f0d8f..95ca2cf9e3d689bbe1c62899cf0bc29510a6f884 100644 (file)
 {
   switch (get_attr_type (insn))
     {
-    case TYPE_ALU:
+    case TYPE_ALU1:
       gcc_assert (operands[1] == const1_rtx);
       return "add{b}\t%0, %0";
 
      (cond [(and (and (match_test "TARGET_DOUBLE_WITH_ADD")
                      (match_operand 0 "register_operand"))
                 (match_operand 1 "const1_operand"))
-             (const_string "alu")
+             (const_string "alu1")
           ]
           (const_string "ishift1")))
    (set (attr "length_immediate")
      (if_then_else
-       (ior (eq_attr "type" "alu")
+       (ior (eq_attr "type" "alu1")
            (and (eq_attr "type" "ishift1")
                 (and (match_operand 1 "const1_operand")
                      (ior (match_test "TARGET_SHIFT1")
index af61628ca76466cbdfed45409b8c3897eabc7b5f..f0d6035123ea5786154709a9affd903331176e14 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/85430
+       * gcc.dg/pr85430.c: New test.
+
 2018-04-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR testsuite/85326
diff --git a/gcc/testsuite/gcc.dg/pr85430.c b/gcc/testsuite/gcc.dg/pr85430.c
new file mode 100644 (file)
index 0000000..7b58a3c
--- /dev/null
@@ -0,0 +1,12 @@
+/* PR target/85430 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-ccp -fno-tree-fre" } */
+
+typedef char V __attribute__((vector_size (4)));
+
+V
+foo (V v)
+{
+  v[(V){}[0]] <<= 1;
+  return v;
+}