Patchwork [lra] patch to fix ia64 testsuite regressions

login
register
mail settings
Submitter Vladimir Makarov
Date July 3, 2012, 4:11 p.m.
Message ID <4FF319C2.3020206@redhat.com>
Download mbox | patch
Permalink /patch/168840/
State New
Headers show

Comments

Vladimir Makarov - July 3, 2012, 4:11 p.m.
The following patch fixes all testsuite regressions on ia64 in 
comparison with reload.

The patch was successfully bootstrapped on ia64 and x86/x86-64.

Committed as rev. 189235.

2012-07-03  Vladimir Makarov <vmakarov@redhat.com>

         * lra-eliminations.c (lra_eliminate_regs_1): Use Pmode for
         plus_constant calls.
         (eliminate_regs_in_insn): Ditto.

Patch

Index: lra-eliminations.c
===================================================================
--- lra-eliminations.c	(revision 189016)
+++ lra-eliminations.c	(working copy)
@@ -304,12 +304,12 @@  lra_eliminate_regs_1 (rtx x, enum machin
 	  if ((ep = get_elimination (regno)) != NULL)
 	    {
 	      rtx to = subst_p ? ep->to_rtx : ep->from_rtx;
-	      
+
 	      if (update_p)
-		return plus_constant (GET_MODE (x), to,
+		return plus_constant (Pmode, to,
 				      ep->offset - ep->previous_offset);
 	      else if (full_p)
-		return plus_constant (GET_MODE (x), to, ep->offset);
+		return plus_constant (Pmode, to, ep->offset);
 	      else
 		return to;
 	    }
@@ -843,8 +843,7 @@  eliminate_regs_in_insn (rtx insn, bool r
 		      rtx src;
 		      
 		      offset -= (ep->offset - ep->previous_offset);
-		      src = plus_constant (GET_MODE (SET_SRC (old_set)),
-					   ep->to_rtx, offset);
+		      src = plus_constant (Pmode, ep->to_rtx, offset);
 		      
 		      /* First see if this insn remains valid when we
 			 make the change.  If not, keep the INSN_CODE
@@ -930,8 +929,7 @@  eliminate_regs_in_insn (rtx insn, bool r
 	     before.  */
 	  if (offset == 0 || plus_src)
 	    {
-	      rtx new_src = plus_constant (GET_MODE (XEXP (plus_cst_src, 0)),
-					   to_rtx, offset);
+	      rtx new_src = plus_constant (GET_MODE (to_rtx), to_rtx, offset);
 	      
 	      old_set = single_set (insn);