[PATCH v2 1/1] sysdeps/x86: set Prefer_No_AVX512 for Hygon model 0x7
H.J. Lu
hjl.tools@gmail.com
Mon Nov 10 04:20:27 GMT 2025
On Fri, Nov 7, 2025 at 9:52 AM Jiamei Xie <xiejiamei@hygon.cn> wrote:
>
> Hi,
>
> Just a gentle ping on this patch. it has already received a Reviewed-by but has not been merged to master.
> Please let me know if anything else is needed before the merge.
Your patch no longer applies. Please rebase and resubmit.
> Thanks!
> Jiamei
>
> > -----Original Message-----
> > From: H.J. Lu <hjl.tools@gmail.com>
> > Sent: 2025年10月16日 7:41
> > To: Jiamei Xie <xiejiamei@hygon.cn>
> > Cc: libc-alpha@sourceware.org; Jing Li <lijing@hygon.cn>
> > Subject: Re: [PATCH v2 1/1] sysdeps/x86: set Prefer_No_AVX512 for Hygon
> > model 0x7
> >
> > On Tue, Oct 14, 2025 at 5:22 PM Jiamei Xie <xiejiamei@hygon.cn> wrote:
> > >
> > > Benchmarks on Hygon hardware show that EVEX often outperforms AVX-512.
> > > To reflect this, enable the Prefer_No_AVX512 flag for model 0x7 so
> > > that the ifunc selector will favor EVEX paths over AVX-512 for that model.
> > >
> > > Signed-off-by: Li jing <lijing@hygon.cn>
> > > Signed-off-by: Xie jiamei <xiejiamei@hygon.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..4ec4c43718 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;
> > > +
> > > + /* On Hygon model 0x7, benchmarks show EVEX often beats
> > AVX-512 */
> > > + if (model == 0x7)
> > > + cpu_features->preferred[index_arch_Prefer_No_AVX512]
> > > + |= bit_arch_Prefer_No_AVX512;
> > > }
> > > else
> > > {
> > > --
> > > 2.17.1
> > >
> > >
> >
> > LGTM.
> >
> > Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
> >
> > Thanks.
> >
> > --
> > H.J.
>
--
H.J.
More information about the Libc-alpha
mailing list