diff options
author | Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> | 2001-01-31 01:20:44 +0100 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-01-30 16:20:44 -0800 |
commit | 2f33c6356126df5e17e1f8dcd44e4f4c52278b3b (patch) | |
tree | 6dd380b75a454658841493c82a6924565e7c0558 /gcc/regmove.c | |
parent | 22ef15cf2e871bdd197c6ba366261ce44549deed (diff) | |
download | gcc-2f33c6356126df5e17e1f8dcd44e4f4c52278b3b.zip gcc-2f33c6356126df5e17e1f8dcd44e4f4c52278b3b.tar.gz gcc-2f33c6356126df5e17e1f8dcd44e4f4c52278b3b.tar.bz2 |
regmove.c (try_auto_increment): Change REG_DEAD into REG_UNUSED when register dies in the insn.
* regmove.c (try_auto_increment): Change REG_DEAD into REG_UNUSED
when register dies in the insn.
From-SVN: r39358
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index e3b6cf9..cbbeb83 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -146,6 +146,16 @@ try_auto_increment (insn, inc_insn, inc_insn_set, reg, increment, pre) gen_rtx_fmt_e (inc_code, Pmode, reg), 1); if (apply_change_group ()) { + /* If there is a REG_DEAD note on this insn, we must + change this not to REG_UNUSED meaning that the register + is set, but the value is dead. Failure to do so will + result in a sched1 abort -- when it recomputes lifetime + information, the number of REG_DEAD notes will have + changed. */ + rtx note = find_reg_note (insn, REG_DEAD, reg); + if (note) + PUT_MODE (note, REG_UNUSED); + REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, reg, REG_NOTES (insn)); |