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

H.J. Lu hjl.tools@gmail.com
Thu Oct 16 22:18:19 GMT 2025


On Thu, Oct 16, 2025 at 6:15 PM litenglong <litenglong@kylinos.cn> wrote:
>
> ---
>  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
>

Please fix your commit subject/message.   Reviewed-by should be in
commit message, not commit subject.

-- 
H.J.


More information about the Libc-alpha mailing list