diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-12 23:03:54 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-12 23:03:54 +0000 |
commit | e6cae665463337cd56a0e525decabf318475f478 (patch) | |
tree | 8cb9f662656a67c7745f1ade226aa8d33838a4e0 /gcc/local-alloc.c | |
parent | 75fa5daee01b4b7cd52b956d94a5a8afc26c9cf9 (diff) | |
download | gcc-e6cae665463337cd56a0e525decabf318475f478.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24283 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r-- | gcc/local-alloc.c | 11 |
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--) |