From bb948ad31d95f778cf2ae51b829944f45ebd540c Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Sat, 11 Aug 2001 01:05:24 +0000 Subject: [PATCH] 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 From-SVN: r44785 --- gcc/ChangeLog | 6 ++++++ gcc/regmove.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d9bbe1d495..29440f54283 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-08-10 Roman Zippel + Richard Henderson + + * regmove.c (regmove_optimize): Avoid setting a register twice in + a parallel set. + 2001-08-10 Richard Henderson * doc/extend.texi (Arrays and pointers implementation): Document 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 -- 2.30.2