This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86-64: Add memcmp/wmemcmp optimized with AVX2
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