This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: patch solving PR37514
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jeffrey Law <law at redhat dot com>, Bernd Schmidt <bernds_cb1 at t-online dot de>, Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Mon, 24 Nov 2008 17:37:38 -0500
- Subject: RFA: patch solving PR37514
The following patch fixes a latent reload inheritance bug triggered
by IRA. The details of the bug could be found in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37514
The patch was successfully tested on sh and itanium (as one more target
using INC/DEC in addressing). Is it ok to commit?
2008-11-24 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/37514
* reload1.c (emit_input_reload_insns): Invalidate reg_last_reload
for input register too.
Index: reload1.c
===================================================================
--- reload1.c (revision 142061)
+++ reload1.c (working copy)
@@ -6914,6 +6914,12 @@ emit_input_reload_insns (struct insn_cha
new_spill_reg_store[REGNO (reloadreg)]
= inc_for_reload (reloadreg, oldequiv, rl->out,
rl->inc);
+ /* Forget where is the input register. We could do it only for
+ reg_last_reload_reg value before inc_for_reload but because
+ inc_for_reload code does not bother to track
+ incremented/decremented values we don't do it too. */
+ if (REG_P (old))
+ reg_last_reload_reg[REGNO (old)] = NULL_RTX;
}
/* If we are reloading a pseudo-register that was set by the previous