diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-12-06 07:14:12 -0800 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2022-05-14 23:11:51 +0200 |
commit | 8a54a1fb6c2833d1e51417a45917e1ab3592319c (patch) | |
tree | 8743f29166d44ffb4187361dbb152e2ba817560e | |
parent | x86-64: Use notl in EVEX strcmp [BZ #28646] (diff) | |
download | glibc-8a54a1fb6c2833d1e51417a45917e1ab3592319c.tar.gz glibc-8a54a1fb6c2833d1e51417a45917e1ab3592319c.tar.bz2 glibc-8a54a1fb6c2833d1e51417a45917e1ab3592319c.zip |
x86: Don't set Prefer_No_AVX512 for processors with AVX512 and AVX-VNNI
Don't set Prefer_No_AVX512 on processors with AVX512 and AVX-VNNI since
they won't lower CPU frequency when ZMM load and store instructions are
used.
(cherry picked from commit ceeffe968c01b1202e482f4855cb6baf5c6cb713)
(cherry picked from commit f3a99b2216114f89b20329ae7664b764248b4bbd)
-rw-r--r-- | sysdeps/x86/cpu-features.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index f4d4049e39..09590d8794 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -566,8 +566,11 @@ disable_tsx: |= bit_arch_Prefer_No_VZEROUPPER; else { - cpu_features->preferred[index_arch_Prefer_No_AVX512] - |= bit_arch_Prefer_No_AVX512; + /* Processors with AVX512 and AVX-VNNI won't lower CPU frequency + when ZMM load and store instructions are used. */ + if (!CPU_FEATURES_CPU_P (cpu_features, AVX_VNNI)) + cpu_features->preferred[index_arch_Prefer_No_AVX512] + |= bit_arch_Prefer_No_AVX512; /* Avoid RTM abort triggered by VZEROUPPER inside a transactionally executing RTM region. */ |