This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR46556 (poor address generation)
On Thu, 2011-10-06 at 09:47 +0200, Paolo Bonzini wrote:
> And IIUC the other address is based on pseudo 125 as well, but the
> combination is (plus (plus (reg 126) (reg 128)) (const_int X)) and
> cannot be represented on ppc. I think _this_ is the problem, so I'm
> afraid your patch could cause pessimizations on x86 for example. On
> x86, which has a cheap REG+REG+CONST addressing mode, it is much better
> to propagate pseudo 125 so that you can delete the set altogether.
>
> However, indeed there is no downstream pass that undoes the
> transformation. Perhaps we can do it in CSE, since this _is_ CSE after
> all. :) The attached untested (uncompiled) patch is an attempt.
>
> Paolo
Thanks, Paolo! This makes good sense. I will play with your (second :)
patch and let you know how it goes.
Bill