diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2001-08-11 01:05:24 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-08-10 18:05:24 -0700 |
commit | bb948ad31d95f778cf2ae51b829944f45ebd540c (patch) | |
tree | 5837d122e29c7cd0552daf77dd613179bb98118e /gcc/regmove.c | |
parent | cbf4c36fa373f5c5c3d920098fe28b024a86a3ed (diff) | |
download | gcc-bb948ad31d95f778cf2ae51b829944f45ebd540c.tar.gz |
regmove.c (regmove_optimize): Avoid setting a register twice in a parallel set.
* regmove.c (regmove_optimize): Avoid setting a register twice in
a parallel set.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r44785
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index 587acea6893..ac1675e358f 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -1319,6 +1319,14 @@ regmove_optimize (f, nregs, regmove_dump_file) if (! set) continue; + /* Note that single_set ignores parts of a parallel set for + which one of the destinations is REG_UNUSED. We can't + handle that here, since we can wind up rewriting things + such that a single register is set twice within a single + parallel. */ + if (reg_set_p (src, insn)) + continue; + /* match_no/dst must be a write-only operand, and operand_operand/src must be a read-only operand. */ if (match.use[op_no] != READ |