]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86: Enable Prefer_No_AVX512 for Hygon model 0x8
authorxiejiamei <xiejiamei@hygon.cn>
Wed, 29 Apr 2026 08:20:30 +0000 (08:20 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 30 Apr 2026 16:54:18 +0000 (13:54 -0300)
Extend the Prefer_No_AVX512 tuning to cover Hygon model 0x8.

Benchmarks on Hygon platforms show that EVEX implementations
are often more profitable than AVX512 paths. The existing logic
already enables Prefer_No_AVX512 for model 0x7. Apply the same
preference to model 0x8 to ensure consistent IFUNC selection
behavior across newer Hygon processors.

Signed-off-by: xiejiamei <xiejiamei@hygon.cn>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/x86/cpu-features.c

index 73ee4f2bb83342964f7551246c3d747b6fa1cab8..a453136827cbd997374484e48ea90eaee697fddb 100644 (file)
@@ -1135,7 +1135,7 @@ disable_tsx:
          cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load]
            &= ~bit_arch_AVX_Fast_Unaligned_Load;
        }
-      else if (model == 0x7)
+      else if (model == 0x7 || model == 0x8)
        {
          /* Benchmarks indicate evex can be more profitable on Hygon
             hardware than AVX512.  */