[PATCH] Fix PR target/5626 (was Re: Infrastructure for long branches?)
Jakub Jelinek
jakub@redhat.com
Mon Feb 25 15:08:00 GMT 2002
On Mon, Feb 25, 2002 at 02:12:46PM -0800, Richard Henderson wrote:
> On Sat, Feb 23, 2002 at 10:50:42PM +0100, Jakub Jelinek wrote:
> > - brz,a,pt %o0, .LL2468
> > + brnz,pn %o0, .+16
> > + nop
> > + ba,pt %xcc, .LL2468
>
> If you consider %xcc clobbered for these types of branches, you
> can represent this as
>
> cmp %o0, 0
> beq,a,pt %xcc, .LL2468
>
> which is a bit smaller and avoids the double branch.
Sure, but this means punishing all code for the sake of 0.001% of
all such branches. I think not using integer CC is the most important property
of these branches.
output_v9branch could of course check whether integer CC are live over
it and use the shorter sequence if it is not live, but I don't think
this happens too often to justify it.
The double branch shouldn't be that expensive because branch always is
predicted always correctly and thus doesn't generate additional bubbles.
Jakub
More information about the Gcc-patches
mailing list