This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] powerpc: strstr optimization
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Steve Munroe <sjmunroe at us dot ibm dot com>, Rajalakshmi Srinivasaraghavan <raji at linux dot vnet dot ibm dot com>
- Date: Wed, 15 Jul 2015 20:43:43 -0400
- Subject: Re: [PATCH v3] powerpc: strstr optimization
- Authentication-results: sourceware.org; auth=none
- References: <558A5642 dot 5020107 at linux dot vnet dot ibm dot com> <558A5761 dot 2000409 at linux dot vnet dot ibm dot com> <87oajpm8nc dot fsf at totoro dot br dot ibm dot com> <871tgijuri dot fsf at linux dot vnet dot ibm dot com>
On 07/08/2015 03:48 PM, Tulio Magno Quites Machado Filho wrote:
> "Tulio Magno Quites Machado Filho" <tuliom@linux.vnet.ibm.com> writes:
>
>> Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> writes:
>>
>>> I have attached the modified version of the patch calling optimized
>>> strchr() which seems to give better results in both LE and BE.
>>> I have attached the benchresults ran on powerpc64le machine.
>>>
>>> 1) Ran using benchests/bench-strstr.c
>>> 2) Ran using ondrej proposed patches on string optimization and benchtests.
>>
>> This patch looks good to me and has been extensively reviewed in another
>> thread [1].
>>
>> I'm pushing it.
>
> Carlos,
>
> Right after I sent this message, Raji contacted me to inform she had found a
> bug in the POWER 7 implementation of strstr().
>
> The fix is very small and the new version of the patch is attached to this
> email.
>
> Old code:
> and r0, r3, r4
> cmpdi cr7, r0, 0
> beq cr7, L(retnull)
>
> New code:
> cmpdi cr7, r3, 0
> beq cr7, L(retnull)
> cmpdi cr7, r4, 0
> beq cr7, L(retnull)
>
> May I proceed with this commit?
Yes, please commit this for 2.22.
Cheers,
Carlos.