[PATCH v4 1/1] Set Prefer_No_AVX512 flag for hygon platform

H.J. Lu hjl.tools@gmail.com
Tue Nov 11 02:49:23 GMT 2025


On Tue, Nov 11, 2025 at 10:30 AM Jiamei Xie <xiejiamei@hygon.cn> wrote:
>
> From: Xie jiamei <xiejiamei@hygon.cn>
>
> 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 <lijing@hygon.cn>
> Signed-off-by: Xie jiamei <xiejiamei@hygon.cn>
> ---
>  sysdeps/x86/cpu-features.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
> index 5d4437ffdf..a404f598ad 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
>      {
> --
> 2.42.0
>
>

This is the patch I am checking in with the formatting change.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-Prefer_No_AVX512-flag-for-hygon-platform.patch
Type: text/x-patch
Size: 1140 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20251111/0dbb137b/attachment.bin>


More information about the Libc-alpha mailing list