diff options
author | Paul Brook <paul@codesourcery.com> | 2006-02-16 15:14:23 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2006-02-16 15:14:23 +0000 |
commit | b81ac2881e267c356ae502af92da39d9837939de (patch) | |
tree | e799e371d522806c73d0c4723e97a4e288ce8dfe /gcc | |
parent | 4035f24587ce1716adcdafadc5d4a1f7528ddf58 (diff) | |
download | gcc-b81ac2881e267c356ae502af92da39d9837939de.zip gcc-b81ac2881e267c356ae502af92da39d9837939de.tar.gz gcc-b81ac2881e267c356ae502af92da39d9837939de.tar.bz2 |
reload1.c (emit_reload_insns): Invalidate dead input registers used for reloads.
2005-02-16 Paul Brook <paul@codesourcery.com>
* reload1.c (emit_reload_insns): Invalidate dead input registers used
for reloads.
From-SVN: r111137
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reload1.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c424d64..cda729a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-02-16 Paul Brook <paul@codesourcery.com> + + * reload1.c (emit_reload_insns): Invalidate dead input registers used + for reloads. + 2006-02-16 Bernd Schmidt <bernd.schmidt@analog.com> PR rtl-optimization/25636 diff --git a/gcc/reload1.c b/gcc/reload1.c index 7bfd2a1..6746c78 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -7419,13 +7419,18 @@ emit_reload_insns (struct insn_chain *chain) /* If a register gets output-reloaded from a non-spill register, that invalidates any previous reloaded copy of it. But forget_old_reloads_1 won't get to see it, because - it thinks only about the original insn. So invalidate it here. */ - if (i < 0 && rld[r].out != 0 - && (REG_P (rld[r].out) - || (MEM_P (rld[r].out) + it thinks only about the original insn. So invalidate it here. + Also do the same thing for RELOAD_OTHER constraints where the + output is discarded. */ + if (i < 0 + && ((rld[r].out != 0 + && (REG_P (rld[r].out) + || (MEM_P (rld[r].out) + && REG_P (rld[r].out_reg)))) + || (rld[r].out == 0 && rld[r].out_reg && REG_P (rld[r].out_reg)))) { - rtx out = (REG_P (rld[r].out) + rtx out = ((rld[r].out && REG_P (rld[r].out)) ? rld[r].out : rld[r].out_reg); int nregno = REGNO (out); if (nregno >= FIRST_PSEUDO_REGISTER) @@ -7501,7 +7506,7 @@ emit_reload_insns (struct insn_chain *chain) } else { - int num_regs = hard_regno_nregs[nregno][GET_MODE (rld[r].out)]; + int num_regs = hard_regno_nregs[nregno][GET_MODE (out)]; while (num_regs-- > 0) reg_last_reload_reg[nregno + num_regs] = 0; |