[PATCH] x86 fix avx loads slower for Hygon model 1 model 2 and model 3 processors.
litenglong
litenglong@kylinos.cn
Fri Oct 17 02:12:31 GMT 2025
Reviewed-by: gaoxiang <gaoxiang@kylinos.cn>
Signed-off-by: litenglong <litenglong@kylinos.cn>
---
sysdeps/x86/cpu-features.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index b67ef541dd..286cbfb1e2 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -1123,6 +1123,11 @@ disable_tsx:
hardware. */
cpu_features->preferred[index_arch_Avoid_Non_Temporal_Memset]
&= ~bit_arch_Avoid_Non_Temporal_Memset;
+ if (model < 0x4) {
+ /* Unaligned AVX loads are slower. */
+ cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load]
+ &= ~bit_arch_AVX_Fast_Unaligned_Load;
+ }
}
else
{
--
2.25.1
More information about the Libc-alpha
mailing list