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]

Re: [PATCH] fix target/44606, reload bug on SPE


On Fri, Oct 01, 2010 at 12:16:50AM +0200, Eric Botcazou wrote:
> > Bootstrapping in progress on x86-64.  OK to commit and backport to 4.5
> > and 4.4?
> >
> > gcc/
> > 	* reload1.c (emit_reload_insns): Adjust prototype.  Check for
> > 	inherited output reloads.
> 
> The return value must be documented.
> 
> > 	(reload_as_needed): Delete insn if emit_reload_insns returns
> > 	true.
> > 	(choose_reload_regs): Save equiv in reload_override_in for
> > 	output reloads.  Set reg_rtx from reload_override_in.
> 
> I think that deleting new insns in reload is too risky on the branches.  Can't 
> we tighten the above condition instead on the branches so that it will return 
> false in this case?

Returning to this thread, are you indicating that the deleting insns
approach is OK for trunk (I will post another patch addressing comments
if so), but you'd like to see something like the following (untested)
patch for release branches?  Or would you like to see something
different for trunk as well?  Please clarify.  Thanks.

-Nathan

	PR target/44606
	* reload.c (find_equiv_reg): Delete code that attempts to find
	equivalences from CONST_DOUBLEs.

Index: reload.c
===================================================================
--- reload.c	(revision 300577)
+++ reload.c	(working copy)
@@ -6838,33 +6838,9 @@ find_equiv_reg (rtx goal, rtx insn, enum
 		     into a reg, we can use that reg.  */
 		  || (goal_const && REG_NOTES (p) != 0
 		      && (tem = find_reg_note (p, REG_EQUIV, NULL_RTX))
-		      && ((rtx_equal_p (XEXP (tem, 0), goal)
-			   && (valueno
-			       = true_regnum (valtry = SET_DEST (pat))) >= 0)
-			  || (REG_P (SET_DEST (pat))
-			      && GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE
-			      && SCALAR_FLOAT_MODE_P (GET_MODE (XEXP (tem, 0)))
-			      && CONST_INT_P (goal)
-			      && 0 != (goaltry
-				       = operand_subword (XEXP (tem, 0), 0, 0,
-							  VOIDmode))
-			      && rtx_equal_p (goal, goaltry)
-			      && (valtry
-				  = operand_subword (SET_DEST (pat), 0, 0,
-						     VOIDmode))
-			      && (valueno = true_regnum (valtry)) >= 0)))
-		  || (goal_const && (tem = find_reg_note (p, REG_EQUIV,
-							  NULL_RTX))
-		      && REG_P (SET_DEST (pat))
-		      && GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE
-		      && SCALAR_FLOAT_MODE_P (GET_MODE (XEXP (tem, 0)))
-		      && CONST_INT_P (goal)
-		      && 0 != (goaltry = operand_subword (XEXP (tem, 0), 1, 0,
-							  VOIDmode))
-		      && rtx_equal_p (goal, goaltry)
-		      && (valtry
-			  = operand_subword (SET_DEST (pat), 1, 0, VOIDmode))
-		      && (valueno = true_regnum (valtry)) >= 0)))
+		      && (rtx_equal_p (XEXP (tem, 0), goal)
+			  && (valueno
+			      = true_regnum (valtry = SET_DEST (pat))) >= 0))))
 	    {
 	      if (other >= 0)
 		{


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