]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Set Prefer_No_VZEROUPPER and add Prefer_AVX2_STRCMP
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 26 Feb 2021 13:36:59 +0000 (05:36 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 27 Jan 2022 19:44:17 +0000 (11:44 -0800)
commit293a787c88328bdad56b2cbe5d3b4b87a362bf5d
treeb847618373b19b3adafe36a4e6b889d89009cd20
parent9d868841f870c22c05e5ce11900afc9abd8fda02
x86: Set Prefer_No_VZEROUPPER and add Prefer_AVX2_STRCMP

1. Set Prefer_No_VZEROUPPER if RTM is usable to avoid RTM abort triggered
by VZEROUPPER inside a transactionally executing RTM region.
2. Since to compare 2 32-byte strings, 256-bit EVEX strcmp requires 2
loads, 3 VPCMPs and 2 KORDs while AVX2 strcmp requires 1 load, 2 VPCMPEQs,
1 VPMINU and 1 VPMOVMSKB, AVX2 strcmp is faster than EVEX strcmp.  Add
Prefer_AVX2_STRCMP to prefer AVX2 strcmp family functions.

(cherry picked from commit 1da50d4bda07f04135dca39f40e79fc9eabed1f8)
sysdeps/x86/cpu-features.c
sysdeps/x86/cpu-features.h
sysdeps/x86/cpu-tunables.c