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, Feb 20, 2013 at 7:44 PM, Siddhesh Poyarekar
<siddhesh.poyarekar@gmail.com> wrote:
> On 20 February 2013 23:16, Ryan Arnold <rsa@us.ibm.com> wrote:
>> 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 tried this on a P730 --with-cpu=power7.  I did not hand-check the
> generated code.  I simply used a sha1sum of the entire library to
> check if the code was the same.  When I said the code was identical, I
> had a typo in my configure line which led to the use of generic code
> instead of the power4+ code, because of which the resulting libraries
> were identical.
>
>> 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.
>
> OK, I'll check --with-cpu=power6 also before I check in.

It's more of a curiosity.  I expect that the compiler handles the
builtin_expect appropriately for Power7.

You can commit without checking Power6.

Ryan


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