This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PowerPC LE memcmp
- From: Alan Modra <amodra at gmail dot com>
- To: Will Schmidt <will_schmidt at vnet dot ibm dot com>
- Cc: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>, libc-alpha at sourceware dot org
- Date: Thu, 15 Aug 2013 17:31:04 +0930
- Subject: Re: PowerPC LE memcmp
- References: <20130809052322 dot GM3294 at bubble dot grove dot modra dot org> <1376518631 dot 3823 dot 39 dot camel at brimstone>
On Wed, Aug 14, 2013 at 05:17:11PM -0500, Will Schmidt wrote:
> > L(bytealigned):
> > mtctr rN
> > - beq cr6,L(zeroLength)
> > +#if 0
> > +/* Huh? We've already branched on cr6! */
> > + beq cr6, L(zeroLength)
> > +#endif
>
> The "We've already branched on cr*" gives me a shiver, but I think in
> those cases the earlier branch should have been on a different
> conditional. (bgtlr, ... beq ). If not, it's a dead path.
> As far as that goes, I think you can go ahead and chop those #if 0
> blocks entirely, unless you think there is more investigation to be done
> on those.
I don't have any doubt about the logic in removing those conditional
branches, ie. that those branches will never be taken. The only
reason you might want to leave them in is if they just happen to
improve timing (eg. by better grouping) in following instructions.
So there is some scope for further investigation.
> I'm assuming that these changes have passed testing. :-)
Yes. :)
> Looks OK to me, thanks,
> -Will
>
>
--
Alan Modra
Australia Development Lab, IBM