From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by sourceware.org (Postfix) with ESMTPS id 6B8283858C55 for ; Thu, 23 Jun 2022 16:31:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B8283858C55 Received: by mail-pj1-x102b.google.com with SMTP id w19-20020a17090a8a1300b001ec79064d8dso3123808pjn.2 for ; Thu, 23 Jun 2022 09:31:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=oEYpNi5dtuAyUubUKs5vDulaZuoi3yW1tU+F5iPqkhQ=; b=hRMxBiyo4Q7ukghDAUIkvgwNDFmpd1wztxLMWyt8wIuXflHQtu5sDsqIJZnKoIVhSV 7R7QsEGWZnHB+hlJdZAm2S6nNwFaxPHduuTTCKoslTuHIyKm/FcgfS9+MitlkzEfJl6a V39X1Oa2EUJCrw3nQoNcjXzuA3sd9LpcSHjUq8jIQChuZVqDC/NSJ7t+N2Rwq1JIjG1H 3pkm25gAwiB+HXrtw6f5ke/saaz3aCg0RWe5+9xz5FwY38DDUe5fjEevGCNkZw55MqDl 0mFY96P4V/oW/VDtw365Mc90mMU+r89Gx4v7xpjBrxr0U+boe9wcRbiO6ssTPncUsNpY XJ1g== X-Gm-Message-State: AJIora/9fbY0iHJqR03x9xIAca9oZhHKFmZ7HhKaId9cW1YfLZrSpRPB H3No6SlKQXMGrAPLutXaNMTWZTuUSxccMZ+tcwbOc0Ttnlw= X-Google-Smtp-Source: AGRyM1vzWlZFtB5oNvBtUHRQp7y+/ViIJdyfGZtkocI+tYE36B1IdfGFxmHWne0xbhN8+kU09NnaqhnNAZ10c/W1r6c= X-Received: by 2002:a17:902:b215:b0:168:da4b:c925 with SMTP id t21-20020a170902b21500b00168da4bc925mr40177151plr.155.1656001916454; Thu, 23 Jun 2022 09:31:56 -0700 (PDT) MIME-Version: 1.0 References: <20220623071404.15863-1-lili.cui@intel.com> <6cdbbd05-3305-9595-4aca-e547347c80da@suse.com> <9b1a1333-792c-f520-4f78-e614a829b7a4@suse.com> In-Reply-To: <9b1a1333-792c-f520-4f78-e614a829b7a4@suse.com> From: "H.J. Lu" Date: Thu, 23 Jun 2022 09:31:20 -0700 Message-ID: Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS To: Jan Beulich Cc: "binutils@sourceware.org" , "Cui, Lili" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3025.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2022 16:32:00 -0000 On Thu, Jun 23, 2022 at 9:08 AM Jan Beulich wrote: > > On 23.06.2022 18:04, H.J. Lu wrote: > > On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili wrote: > >> > >> > >> > >>> -----Original Message----- > >>> From: Jan Beulich > >>> Sent: Thursday, June 23, 2022 3:30 PM > >>> To: Cui, Lili > >>> 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 th= ink what > >>> we have is correct: If one disables BW, _all_ its dependents should b= e > >>> disabled as well, which transitively means all dependents of FP16. > >>> > >> Hi Jan, > >> Agree with that " If one disables BW, _all_ its dependents should be d= isabled 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 on= e that uses cpu_flags instead of CPU_ANY* . > >> > >> { "CPU_ANY_AVX512F_FLAGS", > >> "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AV= X512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAV= X512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BI= TALG|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[] =3D > >>>> { "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 de= fine > > another CPU_ANY. > > Why? Imo that's exactly how it should be, as long as the purpose of > CPU_ANY_* is the use for processing of negative .arch directives. > Assuming AVX512_FP16 also requires BMI2, when AVX512F is disabled, AVX512_FP16 should be disabled, but not BMI2. --=20 H.J.