[PATCH] x86 fix avx loads slower for Hygon model 1 2 3 process. Reviewed-by: gaoxiang <gaoxiang@kylinos.cn>

litenglong litenglong@kylinos.cn
Thu Oct 16 10:14:45 GMT 2025


---
 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