From: Xie jiamei Date: Tue, 11 Nov 2025 02:28:54 +0000 (+0800) Subject: Set Prefer_No_AVX512 flag for hygon platform X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1707b233822a503f787ae1b4abdd07949c3ee691;p=thirdparty%2Fglibc.git Set Prefer_No_AVX512 flag for hygon platform Benchmarks indicate evex can be more profitable on Hygon hardware than AVX512. So add Prefer_No_AVX512 to make it run with evex. Change-Id: Icc59492f71fde7a783a8bd315714ffd6f7ecaf29 Signed-off-by: Li jing Signed-off-by: Xie jiamei --- diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 5d4437ffdf..ecf10ce44d 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -1129,6 +1129,13 @@ disable_tsx: cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load] &= ~bit_arch_AVX_Fast_Unaligned_Load; } + else if (model == 0x7) + { + /* Benchmarks indicate evex can be more profitable on Hygon + hardware than AVX512. */ + cpu_features->preferred[index_arch_Prefer_No_AVX512] + |= bit_arch_Prefer_No_AVX512; + } } else {