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: [PATCH] Mark inputs being ZERO as unlikely __mul in powerpc


On Wed, 2013-02-20 at 19:48 +0530, Siddhesh Poyarekar wrote:
> On Wed, Feb 20, 2013 at 07:19:21PM +0530, Siddhesh Poyarekar wrote:
> > Hi,
> > 
> > The patch below marks the case of X or Y being ZERO as unlikely on
> > powerpc.  This makes no difference to the generated code.  The only
> > purpose is to sync up the code with the default code.  OK to commit?
> > 
> 
> Sorry, this does not result in identical code.  It improves
> performance by a tiny bit (0.3%), similar to that on x86.  OK to
> commit?
Do you mean that there were no branch hints generated from the
'unlikely' call?

Which platform (--with-cpu value) did you test this on?

I wouldn't be surprised if the code gen was different between Power[4|5|
6] and Power7.  Power7 has different characteristics regarding branch
hints and the compiler may chose to exclude the explicit hints on that
platform (since they often negatively impact performance vs. what the
machine can predict itself).  I'd be interested to see if there's a code
gen difference between power6 and power7.

In principle I think this change is fine.

Ryan 


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