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]

[patch 4.2] Fix PR middle-end/34762 - reload bug


The enclosed change fixes PR middle-end/34762.  The rtx's x and mem
need to be compared using rtx_equal_p as is done on the trunk.

Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu with no
observed regressions.

Ok to apply to 4.2 branch?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2008-01-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR middle-end/34762
	* reload.c (find_reloads_toplev): Use rtx_equal_p to compare x and mem.

Index: reload.c
===================================================================
--- reload.c	(revision 131351)
+++ reload.c	(working copy)
@@ -4574,7 +4574,7 @@
 	      x = mem;
 	      i = find_reloads_address (GET_MODE (x), &x, XEXP (x, 0), &XEXP (x, 0),
 					opnum, type, ind_levels, insn);
-	      if (x != mem)
+	      if (!rtx_equal_p (x, mem))
 		push_reg_equiv_alt_mem (regno, x);
 	      if (address_reloaded)
 		*address_reloaded = i;


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