[PATCH] Fix powerpc -mtune=cell -m64 and insn patterns (PR target/39226)

David Edelsohn dje.gcc@gmail.com
Tue Mar 3 14:25:00 GMT 2009


On Tue, Mar 3, 2009 at 8:59 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>
> Hi!
>
> Unlike the and*3_internal*_mc patterns, the -mtune=cell _nomc patterns
> have almost all variants pessimized with ? or ??, so reload sometimes
> decides to reload an and{,64_2}_operand into a register, which is fatal for
> most 64-bit constants so late (as that means needing TOC register etc.).
> As for -O2 -mtune=cell we don't want the microcoded and with . insns, it is
> IMHO best just to not combine them at all, keep and?i3 insn followed by
> comparison of the result against 0.  The booldi3_internal3 change is needed,
> otherwise with the removed anddi3_internal*_nomc pattern booldi3_internal3
> is matched by combiner, but there is no non-CC clobbering anddi3* insn.
>
> Bootstrapped on powerpc64-linux --with-tune=cell, regtested with both -m32
> and -m64.  Ok for trunk?

Hi, Jakub

If I understand correctly, you are leaving the tests to disable
generation of the
microcoded instructions and removing the combiner patterns that split those
instructions.  I believe the intention of those patterns was to
generate the "and"
and "compare"separately through the splitter, which is what you are trying to
accomplish by removing the patterns.  In other words, both the current machine
description and your change are trying to accomplish the same thing, but you
are saying the current implementation is broken.

Also, if you remove the combine patterns, which always split, I think the
associated splitters should be removed as well.

I would like to hear Andrew and Ben's feedback about this change.

Thanks, David



More information about the Gcc-patches mailing list