From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 0CFEB3856DE6 for ; Fri, 24 Jun 2022 01:56:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0CFEB3856DE6 Received: by mail-pl1-x62a.google.com with SMTP id jb13so811432plb.9 for ; Thu, 23 Jun 2022 18:56:44 -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=C8rnOiMmmlWpUc7J3Yww0IxjmSmwD5slBPjGQ+qbc1A=; b=fdkfXexFrEEum8mVctQyyfdcCPNlLr0Xag/JJw1RllFK1vlxdi1XjmJybymUCFB5PA jROMXZGlzfY2THu1MpEJU1m0jXsXSAJ/tbI7lchEMPxA0me3IlP1f8pWtLQilWKoOtXU PwI0vPNTyGIa/dmd8f4z/ECz3XvtCIrpC7lRAIRMq9w+/ujXTWgqmr8+JE++vmbmSuCS Go4HzhMAaAR3GzhLNdmfQHjEOc09Z6nQqhxocn0+RZkqmlPLgvnFmzJWcg8Q0vzzbivb AjfVXid/TMwEDolIs6/OMpHY0DVWHAm+EjxfmyIjP62K3x3vKCcaRa2R9CePpW0cLE61 TmDQ== X-Gm-Message-State: AJIora+1ZxKCYiyXi8kBmMqP8FxstuWAW989cVCWci5qnl/8kJagp/eD iWUUtLjdwJc5dWsSdB9lWIRVBCLKeIqBOcaCKhHo6R9YpDc= X-Google-Smtp-Source: AGRyM1se5TRvv7+cVVtbBk4tq6UdH0LbEeE4SEEJq6gRpePFQfBbrviaOCdjfXKU3SBQzXRMdwuQCmr9iiSNY5CM+NA= X-Received: by 2002:a17:90b:2316:b0:1ec:7b32:55bd with SMTP id mt22-20020a17090b231600b001ec7b3255bdmr1038884pjb.217.1656035803008; Thu, 23 Jun 2022 18:56:43 -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: From: "H.J. Lu" Date: Thu, 23 Jun 2022 18:56:07 -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=-3024.8 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: Fri, 24 Jun 2022 01:56:45 -0000 On Thu, Jun 23, 2022 at 9:31 AM H.J. Lu wrote: > > 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 = 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 consisten= t with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. Bu= t 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|Cpu= AVX512_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[] =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 = define > > > 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. > I was wrong. The current code isn't wrong since { "CPU_ANY_AVX512BW_FLAGS", "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, indicates that disabling AVX512BW will also disable AVX512BW + AVX512F16 + any ISAs which depend on AVX512FP16. If there is another ISA which depends on AVX512FP16, we don't need to change CPU_ANY_AVX512BW_FLAGS. --=20 H.J.