From: Jakub Jelinek Date: Tue, 17 Apr 2018 17:01:31 +0000 (+0200) Subject: re PR target/85430 (ICE: SIGSEGV in memory_operand at recog.c:1358/9 with -O2 -fno... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f00fe6d3bd06a929ceb8c646085fef9145d490b;p=gcc.git re PR target/85430 (ICE: SIGSEGV in memory_operand at recog.c:1358/9 with -O2 -fno-tree-ccp -fno-tree-fre) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e444bf1c7c1..1d6d385519b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2018-04-17 Jakub Jelinek + 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. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 352212094ec..95ca2cf9e3d 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10713,7 +10713,7 @@ { switch (get_attr_type (insn)) { - case TYPE_ALU: + case TYPE_ALU1: gcc_assert (operands[1] == const1_rtx); return "add{b}\t%0, %0"; @@ -10729,12 +10729,12 @@ (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") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index af61628ca76..f0d6035123e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-04-17 Jakub Jelinek + + PR target/85430 + * gcc.dg/pr85430.c: New test. + 2018-04-17 Kyrylo Tkachov PR testsuite/85326 diff --git a/gcc/testsuite/gcc.dg/pr85430.c b/gcc/testsuite/gcc.dg/pr85430.c new file mode 100644 index 00000000000..7b58a3cd567 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr85430.c @@ -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; +}