Patchwork change_address in rs6000_secondary_reload_inner

login
register
mail settings
Submitter Alan Modra
Date April 24, 2013, 1:07 p.m.
Message ID <20130424130711.GR22536@bubble.grove.modra.org>
Download mbox | patch
Permalink /patch/239201/
State New
Headers show

Comments

Alan Modra - April 24, 2013, 1:07 p.m.
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.
David Edelsohn - April 24, 2013, 1:55 p.m.
On Wed, Apr 24, 2013 at 9:07 AM, Alan Modra <amodra@gmail.com> wrote:
> 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.

This is okay, although probably is not important after LRA replacement.

Thanks, David

Patch

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");
     }