patch to fix PR80017

Submitted by Vladimir Makarov on March 15, 2017, 11:06 p.m.

Details

Message ID 12e4796d-0870-5dbf-f119-5e6db93b877e@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov March 15, 2017, 11:06 p.m.
The following patch fixes

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80017

The patch was successfully bootstrapped and tested on x86-64, ppc64, and 
aarch64.

Committed as rev. 246181.

Patch hide | download patch | download mbox

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 246180)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@ 
+2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR target/80017
+	* lra-constraints.c (process_alt_operands): Increase reject for
+	reloading an input/output operand.
+
 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
 	PR target/79038
Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 246180)
+++ lra-constraints.c	(working copy)
@@ -2713,6 +2713,15 @@  process_alt_operands (int only_alternati
 
 	      if (MEM_P (op) && offmemok)
 		addr_losers++;
+	      else if (curr_static_id->operand[nop].type == OP_INOUT)
+		{
+		  if (lra_dump_file != NULL)
+		    fprintf
+		      (lra_dump_file,
+		       "            %d Input/Output reload: reject+=%d\n",
+		       nop, LRA_LOSER_COST_FACTOR);
+		  reject += LRA_LOSER_COST_FACTOR;
+		}
 	    }
 
 	  if (early_clobber_p && ! scratch_p)