summaryrefslogtreecommitdiff
path: root/gcc/local-alloc.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-12-12 23:03:54 +0000
committerJeff Law <law@gcc.gnu.org>1998-12-12 16:03:54 -0700
commit941c63ac30be855420bc79b702355594712cff90 (patch)
tree8cb9f662656a67c7745f1ade226aa8d33838a4e0 /gcc/local-alloc.c
parent8d4c79be50f79381b6306600b304ea3182a8d63c (diff)
downloadgcc-941c63ac30be855420bc79b702355594712cff90.tar.gz
rtlanal.c (multiple_sets): New function.
* rtlanal.c (multiple_sets): New function. * rtl.h (multiple_sets): Declare it. * local-alloc.c (wipe_dead_reg): Use it. * global.c (global_conflicts): Likewise. Should fix the m68k bootstrap problems. From-SVN: r24283
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r--gcc/local-alloc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index f7d12d2e1e0..85cb8af555b 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -1876,9 +1876,16 @@ wipe_dead_reg (reg, output_p)
/* If this insn has multiple results,
and the dead reg is used in one of the results,
extend its life to after this insn,
- so it won't get allocated together with any other result of this insn. */
+ so it won't get allocated together with any other result of this insn.
+
+ It is unsafe to use !single_set here since it will ignore an unused
+ output. Just because an output is unused does not mean the compiler
+ can assume the side effect will not occur. Consider if REG appears
+ in the address of an output and we reload the output. If we allocate
+ REG to the same hard register as an unused output we could set the hard
+ register before the output reload insn. */
if (GET_CODE (PATTERN (this_insn)) == PARALLEL
- && !single_set (this_insn))
+ && multiple_sets (this_insn))
{
int i;
for (i = XVECLEN (PATTERN (this_insn), 0) - 1; i >= 0; i--)