[PATCH] x86-64: Add memcmp/wmemcmp optimized with AVX2
Florian Weimer
fweimer@redhat.com
Fri Jun 2 06:17:00 GMT 2017
On 06/02/2017 12:29 AM, H.J. Lu wrote:
> + /* Use overlapping loads and bswap to avoid branches. */
This comment is outdated. I think the commit message needs a bit of
rewording, too.
Have you benchmarked this version against the original one?
> + HAS_ARCH_FEATURE (Prefer_No_VZEROUPPER)
> + jnz 1f
> + HAS_ARCH_FEATURE (AVX2_Usable)
> + jz 1f
> + HAS_CPU_FEATURE (MOVBE)
> + jz 1f
> + HAS_ARCH_FEATURE (AVX_Fast_Unaligned_Load)
> + jz 1f
> + leaq __memcmp_avx2_movbe(%rip), %rax
> + ret
Do the IFUNC resolvers have to check for the BMI feature, too?
Thanks,
Florian
More information about the Libc-alpha
mailing list