public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [lra] Fix rtl checking failure, part 2
@ 2012-10-18 13:42 Richard Sandiford
  2012-10-18 20:49 ` Vladimir Makarov
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2012-10-18 13:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: vmakarov

Another simple patch for an rtl checking problem.  We were trying to
apply REGNO to something that was no longer a register (because of
equiv substitution).

Tested on x86_64-linux-gnu.  OK for lra branch?

Richard


gcc/
	* lra-constraints.c (check_and_process_move): Only apply REGNO
	to registers.

Index: gcc/lra-constraints.c
===================================================================
--- gcc/lra-constraints.c	2012-10-18 09:49:57.000000000 +0100
+++ gcc/lra-constraints.c	2012-10-18 11:59:22.153426568 +0100
@@ -1145,14 +1145,18 @@ check_and_process_move (bool *change_p,
   /* Set up hard register for a reload pseudo for hook
      secondary_reload because some targets just ignore unassigned
      pseudos in the hook.  */
-  dregno = REGNO (dreg);
-  if (dclass != NO_REGS && lra_get_regno_hard_regno (dregno) < 0)
-    reg_renumber[dregno] = ira_class_hard_regs[dclass][0];
+  if (dclass != NO_REGS && lra_get_regno_hard_regno (REGNO (dreg)) < 0)
+    {
+      dregno = REGNO (dreg);
+      reg_renumber[dregno] = ira_class_hard_regs[dclass][0];
+    }
   else
     dregno = -1;
-  sregno = REGNO (sreg);
-  if (sclass != NO_REGS && lra_get_regno_hard_regno (sregno) < 0)
-    reg_renumber[sregno] = ira_class_hard_regs[sclass][0];
+  if (sclass != NO_REGS && lra_get_regno_hard_regno (REGNO (sreg)) < 0)
+    {
+      sregno = REGNO (sreg);
+      reg_renumber[sregno] = ira_class_hard_regs[sclass][0];
+    }
   else
     sregno = -1;
   if (sclass != NO_REGS)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lra] Fix rtl checking failure, part 2
  2012-10-18 13:42 [lra] Fix rtl checking failure, part 2 Richard Sandiford
@ 2012-10-18 20:49 ` Vladimir Makarov
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Makarov @ 2012-10-18 20:49 UTC (permalink / raw)
  To: gcc-patches, rdsandiford

On 10/18/2012 09:33 AM, Richard Sandiford wrote:
> Another simple patch for an rtl checking problem.  We were trying to
> apply REGNO to something that was no longer a register (because of
> equiv substitution).
>
> Tested on x86_64-linux-gnu.  OK for lra branch?
>
>
Yes.  Thanks, Richard.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-18 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 13:42 [lra] Fix rtl checking failure, part 2 Richard Sandiford
2012-10-18 20:49 ` Vladimir Makarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).