change_address in rs6000_secondary_reload_inner

Alan Modra amodra@gmail.com
Wed Apr 24 13:55:00 GMT 2013


This one is in response to a comment made by Ulrich Weigand.  Refer
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01804.html for why
replace_equiv_address_nv is better than change_address in this reload
related function.  Bootstrapped etc. powerpc64-linux.

	* config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Use
	replace_equiv_address_nv.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 198174)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -14433,7 +14417,7 @@
   /* Adjust the address if it changed.  */
   if (addr != XEXP (mem, 0))
     {
-      mem = change_address (mem, mode, addr);
+      mem = replace_equiv_address_nv (mem, addr);
       if (TARGET_DEBUG_ADDR)
 	fprintf (stderr, "\nrs6000_secondary_reload_inner, mem adjusted.\n");
     }

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Gcc-patches mailing list