diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2020-01-10 20:07:45 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2020-01-10 20:07:45 +0000 |
commit | 60257913f864a5b9f70fbd45ff267cb703075497 (patch) | |
tree | afb332be6c365b15c9b2315162bf98d3f62d9ada | |
parent | b937050d302ba3984eec7c76381081ca8f5962aa (diff) | |
download | gcc-60257913f864a5b9f70fbd45ff267cb703075497.zip gcc-60257913f864a5b9f70fbd45ff267cb703075497.tar.gz gcc-60257913f864a5b9f70fbd45ff267cb703075497.tar.bz2 |
re PR inline-asm/93027 (ICE: in match_reload, at lra-constraints.c:1060)
2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
PR inline-asm/93207
* lra-constraints.c (match_reload): Permit input operands have the
same mode as output while other input operands have a different
mode.
2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
PR inline-asm/93207
* gcc.target/i386/pr93207.c: New test.
From-SVN: r280133
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr93207.c | 14 |
4 files changed, 34 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index acdebad..e9c0052 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-01-10 Vladimir Makarov <vmakarov@redhat.com> + + PR inline-asm/93207 + * lra-constraints.c (match_reload): Permit input operands have the + same mode as output while other input operands have a different + mode. + 2020-01-10 Wilco Dijkstra <wdijkstr@arm.com> PR tree-optimization/90838 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 57e2457..f71e0c9 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1054,12 +1054,15 @@ match_reload (signed char out, signed char *ins, signed char *outs, curr_insn_input_reloads[curr_insn_input_reloads_num].match_p = true; curr_insn_input_reloads[curr_insn_input_reloads_num++].reg = new_in_reg; for (i = 0; (in = ins[i]) >= 0; i++) - { - lra_assert - (GET_MODE (*curr_id->operand_loc[in]) == VOIDmode - || GET_MODE (new_in_reg) == GET_MODE (*curr_id->operand_loc[in])); + if (GET_MODE (*curr_id->operand_loc[in]) == VOIDmode + || GET_MODE (new_in_reg) == GET_MODE (*curr_id->operand_loc[in])) *curr_id->operand_loc[in] = new_in_reg; - } + else + { + lra_assert + (GET_MODE (new_out_reg) == GET_MODE (*curr_id->operand_loc[in])); + *curr_id->operand_loc[in] = new_out_reg; + } lra_update_dups (curr_id, ins); if (out < 0) return; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 42820ef..1edada1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-01-10 Vladimir Makarov <vmakarov@redhat.com> + + PR inline-asm/93207 + * gcc.target/i386/pr93207.c: New test. + 2020-01-10 Wilco Dijkstra <wdijkstr@arm.com> * testsuite/gcc.target/aarch64/pr90838.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr93207.c b/gcc/testsuite/gcc.target/i386/pr93207.c new file mode 100644 index 0000000..1bd571d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr93207.c @@ -0,0 +1,14 @@ +/* PR inline-asm/93207 */ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +int main (void) { + int f = 0, w; + + asm volatile( + "" + : "+m&l"(f) + : "0a"(&w) + ); + return 0; +} |