This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: PowerPC LE memcmp


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


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