diff mbox

one more patch for PR64110

Message ID 5491F5C6.7070409@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Dec. 17, 2014, 9:29 p.m. UTC
H.J. reported a failure for PR64110 test.

Here is the patch solves it.

The patch was bootstrapped on x86/x86-64/arm.

Committed as rev. 218835.

2014-12-17  Vladimir Makarov  <vmakarov@redhat.com>

         * lra-constraints.c (process_alt_operands): Remove non
         allocatable hard regs when considering
         ira_prohibited_class_mode_regs.
diff mbox

Patch

Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 218760)
+++ lra-constraints.c	(working copy)
@@ -2280,22 +2280,28 @@  process_alt_operands (int only_alternati
 		     not hold the mode value.  */
 		  && ! HARD_REGNO_MODE_OK (ira_class_hard_regs
 					   [this_alternative][0],
-					   GET_MODE (*curr_id->operand_loc[nop]))
+					   GET_MODE (*curr_id->operand_loc[nop])))
+		{
+		  HARD_REG_SET temp;
+		  
+		  COPY_HARD_REG_SET (temp, this_alternative_set);
+		  AND_COMPL_HARD_REG_SET (temp, lra_no_alloc_regs);
 		  /* The above condition is not enough as the first
 		     reg in ira_class_hard_regs can be not aligned for
 		     multi-words mode values.  */
-		  && hard_reg_set_subset_p (this_alternative_set,
-					    ira_prohibited_class_mode_regs
-					    [this_alternative]
-					    [GET_MODE (*curr_id->operand_loc[nop])]))
-		{
-		  if (lra_dump_file != NULL)
-		    fprintf
-		      (lra_dump_file,
-		       "            alt=%d: reload pseudo for op %d "
-		       " can not hold the mode value -- refuse\n",
-		       nalt, nop);
-		  goto fail;
+		  if (hard_reg_set_subset_p (temp,
+					     ira_prohibited_class_mode_regs
+					     [this_alternative]
+					     [GET_MODE (*curr_id->operand_loc[nop])]))
+		    {
+		      if (lra_dump_file != NULL)
+			fprintf
+			  (lra_dump_file,
+			   "            alt=%d: reload pseudo for op %d "
+			   " can not hold the mode value -- refuse\n",
+			   nalt, nop);
+		      goto fail;
+		    }
 		}
 
 	      /* Check strong discouragement of reload of non-constant