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]

a patch for PR61578


The following patch is for s390 regression introduced by the first patch for PR61578:

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

The patch was bootstrapped and tested on x86-64.

Committed as rev. 228154.

2015-09-25  Vladimir Makarov  <vmakarov@redhat.com>

        PR target/61578
* lra-constarints.c (match_reload): Check presence of the input pseudo
        in the output operand.

Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 228097)
+++ lra-constraints.c	(working copy)
@@ -945,6 +945,12 @@ match_reload (signed char out, signed ch
 	= (ins[1] < 0 && REG_P (in_rtx)
 	   && (int) REGNO (in_rtx) < lra_new_regno_start
 	   && find_regno_note (curr_insn, REG_DEAD, REGNO (in_rtx))
+	   /* We can not use the same value if the pseudo is mentioned
+	      in the output, e.g. as an address part in memory,
+	      becuase output reload will actually extend the pseudo
+	      liveness.  We don't care about eliminable hard regs here
+	      as we are interesting only in pseudos.  */
+	   && (out < 0 || regno_use_in (REGNO (in_rtx), out_rtx) == NULL_RTX)
 	   ? lra_create_new_reg (inmode, in_rtx, goal_class, "")
 	   : lra_create_new_reg_with_unique_value (outmode, out_rtx,
 						   goal_class, ""));

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