]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86-64: Remove Prefer_AVX2_STRCMP
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Oct 2021 19:56:53 +0000 (12:56 -0700)
committerSunil K Pandey <skpgkp2@gmail.com>
Mon, 2 May 2022 20:01:30 +0000 (13:01 -0700)
commitce7859217072eca6cca888b8307d16db8b775ba5
treedeb6944e9c5e3dc59634e60829a84656e9515c6d
parent1a7af4e140f0e8e4633a5938a804d429e9a82d52
x86-64: Remove Prefer_AVX2_STRCMP

Remove Prefer_AVX2_STRCMP to enable EVEX strcmp.  When comparing 2 32-byte
strings, EVEX strcmp has been improved to require 1 load, 1 VPTESTM, 1
VPCMP, 1 KMOVD and 1 INCL instead of 2 loads, 3 VPCMPs, 2 KORDs, 1 KMOVD
and 1 TESTL while AVX2 strcmp requires 1 load, 2 VPCMPEQs, 1 VPMINU, 1
VPMOVMSKB and 1 TESTL.  EVEX strcmp is now faster than AVX2 strcmp by up
to 40% on Tiger Lake and Ice Lake.

(cherry picked from commit 14dbbf46a007ae5df36646b51ad0c9e5f5259f30)
sysdeps/x86/cpu-features.c
sysdeps/x86/cpu-tunables.c
sysdeps/x86/include/cpu-features-preferred_feature_index_1.def
sysdeps/x86_64/multiarch/strcmp.c
sysdeps/x86_64/multiarch/strncmp.c