This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR target/5626 (was Re: Infrastructure for long branches?)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, lucier at math dot purdue dot edu, gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Feb 2002 17:28:59 -0500
- Subject: Re: [PATCH] Fix PR target/5626 (was Re: Infrastructure for long branches?)
- References: <200202072237.g17Mb2Z05676@banach.math.purdue.edu> <20020223225042.F2204@sunsite.ms.mff.cuni.cz> <20020225141246.B27689@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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