Message ID | 20200826022650.1952808-1-ondra.hosek@gmail.com |
---|---|
State | Committed |
Commit | 23af890b3f04e80da783ba64e6b6d94822e01d54 |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C8EB3857C41; Wed, 26 Aug 2020 02:26:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C8EB3857C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1598408817; bh=X7PFdI86ma6I0w/R9w38NVfMRY62SD2ldiP2LQf4nYM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZvHebcyGAETFDzyAT4T+m4N+ku25DNqYHamnIonZdNUkmaSfRLfTQYaH+JCzOZp9Z e97P+mrH00PIG/+GkdysztJ/DZ6CL5wAgGE8pVXTNhE6pWFcgaaQNrG7hTUGFutw2J p496lm36vvk7LygkAODMPLZeIfxybu9zFHJCeGs4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id 2D9E93857C41 for <libc-alpha@sourceware.org>; Wed, 26 Aug 2020 02:26:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2D9E93857C41 Received: by mail-wm1-x343.google.com with SMTP id g75so245659wme.4 for <libc-alpha@sourceware.org>; Tue, 25 Aug 2020 19:26:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X7PFdI86ma6I0w/R9w38NVfMRY62SD2ldiP2LQf4nYM=; b=REbSCAvMtUesHFjajH8Wk/Kv2Kur84j6Uf1m/SQuWl3WAt1Eiej33vNAaeAihlQzQW Ltw1XUlJKYn9m7JSFoScjk8KKpv2oZYbQmo4+WDPGZrq0b4NnMPaOE1aZ41Xs8NfFIU7 0l6R2D2j4l/ZjgletHelmkkPidERFcdcxxhFUtHqcU4KhfTRQpjEIK/poE5bp14Ja6C6 S3kXwNS4Q5FWO/FQAsu84wkAFrqPB3iYaRqzg2Ak6U+eZluPWjmQ4Um9QBlGRQRPyEES maBQ5fYJDt556AHnPCQXmd2bLLCvzxGaoVSMv+C+OEAwIwFl0CXRVU/syeCLzoVmFjX3 GD3Q== X-Gm-Message-State: AOAM533xnjyvL0wqzJBvW2OWQudxPyjajdndrjuaqW7I7UI0xk4sJRl1 Hnhn/xh8cI5mNPat8kpLB29J9hE09Bo3Qw== X-Google-Smtp-Source: ABdhPJzEepEQ+ksqHxfQge4xr81rFb9H4e5DLLvfp0kb1Ko76Y2eqvl6m0bTXPpKapU4So3BRcw2Xg== X-Received: by 2002:a05:600c:2185:: with SMTP id e5mr4910668wme.73.1598408813797; Tue, 25 Aug 2020 19:26:53 -0700 (PDT) Received: from lothal.kom.tuwien.ac.at (lothal.kom.tuwien.ac.at. [128.130.2.49]) by smtp.gmail.com with ESMTPSA id 188sm8751956wmz.2.2020.08.25.19.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 19:26:53 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] x86-64: Fix FMA4 detection in ifunc [BZ #26534] Date: Wed, 26 Aug 2020 04:26:50 +0200 Message-Id: <20200826022650.1952808-1-ondra.hosek@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: =?utf-8?q?Ond=C5=99ej_Ho=C5=A1ek_via_Libc-alpha?= <libc-alpha@sourceware.org> Reply-To: =?utf-8?b?T25kxZllaiBIb8WhZWs=?= <ondra.hosek@gmail.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
x86-64: Fix FMA4 detection in ifunc [BZ #26534]
|
|
Commit Message
Ondřej Hošek
Aug. 26, 2020, 2:26 a.m. UTC
A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the FMA4 code path to be taken on systems that support FMA, even if they do not support FMA4. Fix this to detect FMA4. --- sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha <libc-alpha@sourceware.org> wrote: > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > FMA4 code path to be taken on systems that support FMA, even if they do > not support FMA4. Fix this to detect FMA4. > --- > sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h > index 7659758972..e5fd5ac9cb 100644 > --- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h > +++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h > @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) > && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) > return OPTIMIZE (fma); > > - if (CPU_FEATURE_USABLE_P (cpu_features, FMA)) > + if (CPU_FEATURE_USABLE_P (cpu_features, FMA4)) > return OPTIMIZE (fma4); > > return OPTIMIZE (sse2); > -- > 2.28.0 > LGTM. Thanks.
On 26/08/2020 00:54, H.J. Lu via Libc-alpha wrote: > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > <libc-alpha@sourceware.org> wrote: >> >> A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the >> FMA4 code path to be taken on systems that support FMA, even if they do >> not support FMA4. Fix this to detect FMA4. >> --- >> sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h >> index 7659758972..e5fd5ac9cb 100644 >> --- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h >> +++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h >> @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) >> && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) >> return OPTIMIZE (fma); >> >> - if (CPU_FEATURE_USABLE_P (cpu_features, FMA)) >> + if (CPU_FEATURE_USABLE_P (cpu_features, FMA4)) >> return OPTIMIZE (fma4); >> >> return OPTIMIZE (sse2); >> -- I think it should be backported to 2.32 as well.
On Wed, Aug 26, 2020 at 5:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > <libc-alpha@sourceware.org> wrote: > > > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > > FMA4 code path to be taken on systems that support FMA, even if they do > > not support FMA4. Fix this to detect FMA4. > > [...] > > LGTM. > > Thanks. A week has elapsed since the last comment; may I ask you to commit the patch? Thanks! Cheers, ~~ Ondra
On Wed, Sep 2, 2020 at 1:19 AM Ondřej Hošek <ondra.hosek@gmail.com> wrote: > > On Wed, Aug 26, 2020 at 5:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > > > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > > <libc-alpha@sourceware.org> wrote: > > > > > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > > > FMA4 code path to be taken on systems that support FMA, even if they do > > > not support FMA4. Fix this to detect FMA4. > > > [...] > > > > LGTM. > > > > Thanks. > > A week has elapsed since the last comment; may I ask you to commit the patch? > > Thanks! > > Cheers, > ~~ Ondra I checked it in for you. Thanks.
On Wed, Sep 2, 2020 at 5:10 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Wed, Sep 2, 2020 at 1:19 AM Ondřej Hošek <ondra.hosek@gmail.com> wrote: > > > > On Wed, Aug 26, 2020 at 5:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > > > > > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > > > <libc-alpha@sourceware.org> wrote: > > > > > > > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > > > > FMA4 code path to be taken on systems that support FMA, even if they do > > > > not support FMA4. Fix this to detect FMA4. > > > > [...] > > > > > > LGTM. > > > > > > Thanks. > > > > A week has elapsed since the last comment; may I ask you to commit the patch? > > > > Thanks! > > > > Cheers, > > ~~ Ondra > > I checked it in for you. > > Thanks. I am backpoing it to 2.32 branch.
diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h index 7659758972..e5fd5ac9cb 100644 --- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h +++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) return OPTIMIZE (fma); - if (CPU_FEATURE_USABLE_P (cpu_features, FMA)) + if (CPU_FEATURE_USABLE_P (cpu_features, FMA4)) return OPTIMIZE (fma4); return OPTIMIZE (sse2);