This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]