diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-01-08 16:58:20 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2020-01-08 16:58:20 +0100 |
commit | 7ca803f1011503334cebdc9ab5d64b3a213f315b (patch) | |
tree | 04a8baca190831e65feec3eb14dd9f15a2f4e772 | |
parent | 80d803aefb82f336abd3ff421c1a7edcbd24c9ae (diff) | |
download | gcc-7ca803f1011503334cebdc9ab5d64b3a213f315b.zip gcc-7ca803f1011503334cebdc9ab5d64b3a213f315b.tar.gz gcc-7ca803f1011503334cebdc9ab5d64b3a213f315b.tar.bz2 |
re PR target/93174 (ICE building glibc __sha512_process_block for i686)
PR target/93174
* config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand
predicate for output operand instead of register_operand.
(addcarry<mode>, addcarry<mode>_1): Likewise. Add alternative with
memory destination and non-memory operands[2].
* gcc.c-torture/compile/pr93174.c: New test.
From-SVN: r280011
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 10 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr93174.c | 14 |
4 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f960eb4..cb1f7cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2020-01-08 Jakub Jelinek <jakub@redhat.com> + + PR target/93174 + * config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand + predicate for output operand instead of register_operand. + (addcarry<mode>, addcarry<mode>_1): Likewise. Add alternative with + memory destination and non-memory operands[2]. + 2020-01-08 Martin Liska <mliska@suse.cz> * cgraph.c (cgraph_node::dump): Use ::dump_name or diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 50fb99a..3daf720 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6786,13 +6786,13 @@ (plus:SWI48 (match_operator:SWI48 5 "ix86_carry_flag_operator" [(match_operand 3 "flags_reg_operand") (const_int 0)]) - (match_operand:SWI48 1 "nonimmediate_operand" "%0")) - (match_operand:SWI48 2 "nonimmediate_operand" "rm"))) + (match_operand:SWI48 1 "nonimmediate_operand" "%0,0")) + (match_operand:SWI48 2 "nonimmediate_operand" "r,rm"))) (plus:<DWI> (zero_extend:<DWI> (match_dup 2)) (match_operator:<DWI> 4 "ix86_carry_flag_operator" [(match_dup 3) (const_int 0)])))) - (set (match_operand:SWI48 0 "register_operand" "=r") + (set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r") (plus:SWI48 (plus:SWI48 (match_op_dup 5 [(match_dup 3) (const_int 0)]) (match_dup 1)) @@ -6812,7 +6812,7 @@ (match_operand:SWI48 1 "nonimmediate_operand") (match_operand:SWI48 2 "x86_64_general_operand")) (match_dup 1))) - (set (match_operand:SWI48 0 "register_operand") + (set (match_operand:SWI48 0 "nonimmediate_operand") (plus:SWI48 (match_dup 1) (match_dup 2)))])] "ix86_binary_operator_ok (PLUS, <MODE>mode, operands)") @@ -6830,7 +6830,7 @@ (match_operand:<DWI> 6 "const_scalar_int_operand" "") (match_operator:<DWI> 4 "ix86_carry_flag_operator" [(match_dup 3) (const_int 0)])))) - (set (match_operand:SWI48 0 "register_operand" "=r") + (set (match_operand:SWI48 0 "nonimmediate_operand" "=rm") (plus:SWI48 (plus:SWI48 (match_op_dup 5 [(match_dup 3) (const_int 0)]) (match_dup 1)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 63ba12d..8870858 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-01-08 Jakub Jelinek <jakub@redhat.com> + + PR target/93174 + * gcc.c-torture/compile/pr93174.c: New test. + 2020-01-08 Olivier Hainque <hainque@adacore.com> Alexandre Oliva <oliva@adacore.com> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr93174.c b/gcc/testsuite/gcc.c-torture/compile/pr93174.c new file mode 100644 index 0000000..653a470 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr93174.c @@ -0,0 +1,14 @@ +/* PR target/93174 */ + +unsigned long long a[2]; +void bar (void); + +void +foo (int c) +{ + int e = c >> 2; + a[0] += c; + a[1] = a[0] < c; + while (e--) + bar (); +} |