On Fri, Feb 14, 2014 at 2:18 AM, Alan Modra <amo...@gmail.com> wrote: > On Wed, Feb 12, 2014 at 06:47:37PM +0100, Ulrich Weigand wrote: >> Note that find_replacement itself already recurses into both sides >> of a PLUS. > > Thanks, I missed seeing that. I'd analysed the bug and knew what > needed doing from past forays into reload, so went looking for ways to > get at the reloads, ie. "replacements" at that stage of reload. Lo > and behold, there's a function tailor made to do just that! So I > plugged in find_replacements() wherever it seemed necessary. > >> So it might be >> easier and cheaper overall to just do a find_replacement within >> the PRE_MODIFY clause ... > > That's a good idea, since PRE_MODIFY doesn't occur that often. > Here is the revised patch with your recommendations. Bootstrapped > and regression tested powerpc64-linux. > > PR target/58675 > PR target/57935 > * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Use > find_replacement on parts of insn rtl that might be reloaded.
Okay, this is a cleaner solution. - David