diff mbox

Fix PR rtl-optimization/54644

Message ID 2200105.jWuU9Ae6vR@polaris
State New
Headers show

Commit Message

Eric Botcazou Sept. 21, 2012, 11:03 a.m. UTC
It's the regression of gcc.c-torture/execute/multi-ix.c at -O1 on Alpha 
reported by Uros and comes from a thinko in my fix for PR rtl-opt/54290.

Tested on x86-64/Linux, applied on the mainline.


2012-09-21  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/54290
	PR rtl-optimization/54644
	* reload1.c (choose_reload_regs): Fix thinko in previous change.
diff mbox

Patch

Index: reload1.c
===================================================================
--- reload1.c	(revision 191596)
+++ reload1.c	(working copy)
@@ -6991,16 +6991,17 @@  choose_reload_regs (struct insn_chain *c
 	     If we succeeded removing some reload and we are doing a preliminary
 	     pass just to remove such reloads, make another pass, since the
 	     removal of one reload might allow us to inherit another one.  */
-	  else if (pass
-		   && rld[r].in
+	  else if (rld[r].in
 		   && rld[r].out != rld[r].in
 		   && remove_address_replacements (rld[r].in))
-	    pass = 2;
+	    {
+	      if (pass)
+	        pass = 2;
+	    }
 #ifdef SECONDARY_MEMORY_NEEDED
 	  /* If we needed a memory location for the reload, we also have to
 	     remove its related reloads.  */
-	  else if (pass
-	           && rld[r].in
+	  else if (rld[r].in
 		   && rld[r].out != rld[r].in
 		   && (tem = replaced_subreg (rld[r].in), REG_P (tem))		   
 		   && REGNO (tem) < FIRST_PSEUDO_REGISTER
@@ -7009,7 +7010,10 @@  choose_reload_regs (struct insn_chain *c
 		   && remove_address_replacements
 		      (get_secondary_mem (tem, rld[r].inmode, rld[r].opnum,
 					  rld[r].when_needed)))
-	    pass = 2;
+	    {
+	      if (pass)
+	        pass = 2;
+	    }
 #endif
 	}
     }