[PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS
H.J. Lu
hjl.tools@gmail.com
Thu Jun 23 16:04:26 GMT 2022
On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili <lili.cui@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Jan Beulich <jbeulich@suse.com>
> > Sent: Thursday, June 23, 2022 3:30 PM
> > To: Cui, Lili <lili.cui@intel.com>
> > Cc: binutils@sourceware.org; hjl.tools@gmail.com
> > Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS
> >
> > On 23.06.2022 09:14, Cui,Lili wrote:
> > > This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS.
> > > Make check-gas is ok.
> > > Ok for master?
> > >
> > > Thanks,
> > > Lili.
> > >
> > > Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16"
> >
> > You don't say what's wrong with what there is right now. I for one think what
> > we have is correct: If one disables BW, _all_ its dependents should be
> > disabled as well, which transitively means all dependents of FP16.
> >
> Hi Jan,
> Agree with that " If one disables BW, _all_ its dependents should be disabled as well ".
> I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" to be the only one that uses cpu_flags instead of CPU_ANY* .
>
> { "CPU_ANY_AVX512F_FLAGS",
> "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INTERSECT" },
>
> Regards,
> Lili.
>
> > Jan
> >
> > > opcodes/
> > >
> > > * i386-gen.c (cpu_flag_init): Change cpu_flags of
> > > CPU_ANY_AVX512BW_FLAGS.
> > > ---
> > > opcodes/i386-gen.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index
> > > d18a7d2754..5dc224efdb 100644
> > > --- a/opcodes/i386-gen.c
> > > +++ b/opcodes/i386-gen.c
> > > @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] =
> > > { "CPU_ANY_AVX512DQ_FLAGS",
> > > "CpuAVX512DQ" },
> > > { "CPU_ANY_AVX512BW_FLAGS",
> > > - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" },
> > > + "CpuAVX512BW|CpuAVX512_FP16" },
> > > { "CPU_ANY_AVX512VL_FLAGS",
> > > "CpuAVX512VL" },
> > > { "CPU_ANY_AVX512IFMA_FLAGS",
>
Since CPU_ANY_AVX512_FP16_FLAGS is the same as CpuAVX512_FP16,
this change is nop. On the other hand, CPU_ANY shouldn't be used to define
another CPU_ANY. Please also replace CPU_ANY_AVX512BW_FLAGS with
CpuAVX512BW|CpuAVX512_FP16 for CPU_ANY_AVX512F_FLAGS.
Thanks.
--
H.J.
More information about the Binutils
mailing list