On Mon, Feb 10, 2014 at 8:33 PM, Alan Modra <amo...@gmail.com> wrote: > On Mon, Feb 10, 2014 at 07:01:03PM -0500, David Edelsohn wrote: >> On Mon, Feb 10, 2014 at 5:18 PM, Alan Modra <amo...@gmail.com> wrote: >> >> Shouldn't addr_op2 also be set from find_replacement? > > Sorry, I thought after I sent the email that I should have added some > explanation of why certain parts need find_replacement and others > don't. We want just those parts of addresses that might have been > reloaded. > > There's the case of the entire address being reloaded (actually, I'm > not sure this one is needed) and then all the ones we do in the rs6000 > backend in legitimize_reload_address. I think I found all the > required parts but it certainly won't hurt if you check too. Calling > find_replacement when not strictly necessary will slow down gcc a > little..
I cannot tell if either branch of the PLUS could contain an address that previously was replaced. I want to avoid slow downs, but I also want to avoid leaving a latent bug, either now or a future change to reload or IRA. Is there an ENABLE_CHECKING assert of some form that could test addr_op2 to ensure that it does contain part of the address that was reloaded when not configured as a Release? Thanks, David