]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/85430 (ICE: SIGSEGV in memory_operand at recog.c:1358/9 with...
authorJakub Jelinek <jakub@redhat.com>
Fri, 22 Jun 2018 21:10:59 +0000 (23:10 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 22 Jun 2018 21:10:59 +0000 (23:10 +0200)
Backported from mainline
2018-04-17  Jakub Jelinek  <jakub@redhat.com>

PR target/85430
* config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.

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

From-SVN: r261954

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

index 2850fa03bfe8a16bc400add4705f415b770f5ddc..52232caf7a143ca3d9b584da36e3ccf2b5dc4dba 100644 (file)
@@ -1,6 +1,11 @@
 2018-06-22  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2018-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/85430
+       * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
+
        2018-04-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/85300
index 5d0cd5311b7c2b25c7274afbe5a9c0c37050e82b..8469cf02510c20fa422083145ef3cf07f86ae986 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 27f70405941e57181af26013a2d851ad4cbdecc2..554465f0d78d48157198ea5f9cc8c05164e26021 100644 (file)
@@ -1,6 +1,11 @@
 2018-06-22  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2018-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/85430
+       * gcc.dg/pr85430.c: New test.
+
        2018-04-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/85300
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;
+}