[PATCH v3] powerpc: strstr optimization

Tulio Magno Quites Machado Filho tuliom@linux.vnet.ibm.com
Wed Jul 8 19:48:00 GMT 2015


"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?

-- 
Tulio Magno

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PATCH-powerpc-strstr-optimization.patch
Type: text/x-patch
Size: 19347 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150708/5e4db000/attachment.bin>


More information about the Libc-alpha mailing list