This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING][PATCH][REVISED] Fix PR middle-end/PR28690, modify swap_commutative_operands_p

On Mon, 2007-07-09 at 17:13 -0400, Jakub Jelinek wrote:
> On Fri, Jul 06, 2007 at 10:07:47AM -0500, Peter Bergner wrote:
> > Great, thanks!  Given it's the weekend and I won't be around much, I'm
> > going to wait until Monday before committing this just in case there's
> > any fallout on ports other than the tested {power6464,x86_64}-linux.
> A modified version of the above patch (conditionalized using a TARGET
> macro, so that it doesn't affect non-ppc or non-power6 tuning on ppc)
> on redhat/gcc-4_1-branch caused a regression, see
> for details.

It's a good thing I held off committing the patch then!

> While I haven't tried to reproduce this with your patch on the trunk,
> I think it is fairly likely it will hit the same problem, either on
> the same testcase or on some other one.
> When swap_commutative_operand_p (which was always false before when
> both arguments were REGs), but now prefers lower REGNOs first
> fights against simplify_plus_minus which on the other side prefers
> whatever was originally first in such cases, we can end up with
> endless recursion.

Your testcase doesn't fail using current mainline with the patch,
but I think you're right that it could.  I'll apply both of your
patches on top of mine and do another bootstrap and regtesting.
Thanks for finding and fixing this!

Would it be a good idea to add a comment to both locations stating that
their swapping criteria is interdependent?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]