Commit b81ac288 by Paul Brook Committed by Paul Brook

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
parent 4035f245
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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment