[PATCH] x86-64: memcmp-avx2-movbe.S needs saturating subtraction [BZ #21662]

Florian Weimer fweimer@redhat.com
Fri Jun 23 19:28:00 GMT 2017


On 06/23/2017 09:12 PM, H.J. Lu wrote:

>> movzbl -1(%rdi, %rdx), %edi
>> movzbl -1(%rsi, %rdx), %esi
>> orl %edi, %eax
>> orl %esi, %ecx
>>
>> into
>>
>> movb -1(%rdi, %rdx), %al
>> movb -1(%rsi, %rdx), %cl
> 
> Here is the benchmark result on Haswell.
> 
> [hjl@gnu-6 glibc-test]$ make
> ./test
> movb  : 19937666
> movzbl: 21518186
> [hjl@gnu-6 glibc-test]$

Interesting.  So there isn't a steep penalty for partial register writes
anymore?  Your patch is a nice improvement then.

Thanks,
Florian



More information about the Libc-alpha mailing list