From patchwork Tue Mar 21 17:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 72944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1897820wrt; Tue, 21 Mar 2023 10:06:48 -0700 (PDT) X-Google-Smtp-Source: AK7set9rLARqYHcEig0QcBCzi6/IHMRNdZ92pQGS8qyBEd61eOJxtbay+LhZrRJWiiA3NHAptRFk X-Received: by 2002:a17:906:158e:b0:92f:a0d5:211c with SMTP id k14-20020a170906158e00b0092fa0d5211cmr3213020ejd.35.1679418408608; Tue, 21 Mar 2023 10:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679418408; cv=none; d=google.com; s=arc-20160816; b=nNkqZSKAvERdwWf1DtJwiq1jQ9QX4AoSWcC3Aja5w8Io3nryUlLQCJ6bKQd7w3ATdR K+stvGSLLcGAvDz6NQopVGxlaAJema2Y6KL9K9wwNZRTPpZqBCxB7I8fqtBh4iHEglG5 LAkq2cnHpI8wP2uvu8EsEQii1VqXS+p6VTZgpgVTZB8LhDRkW3cs95g1kutPJGH8VsfW xijVvsjKNK+QfLPGImie5WlRc9koeiFJ+PyVrwQD7loPo21Q8fnGgkbKIMhU5FPVXJiP DdjAk+lrFRG6vAM5Q8iDBlXZfwlWn0rJW66dOcZ9I8V11jD0NKI9zD4JuDXzvmSzpJEm NOfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:organization:message-id:date :subject:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Hiaq0lsZS7Cn55KKPK/Je9HcO8lClqY08coVwhMCTsw=; b=Ub7LPEv1opswAFGA+goOfLw5bAOvwPvjpI8sVXUY9++JsyheKD6cC8kauDpt+IamjK ikZfpe7NJTc7YNwqa22/i2t0hqzZCKfuRiWcCwfQXeuJq9wSCRjnwnwkYVqcGM/TMhbn pOGrF1EY4Z9bKTVeyQRUjn+jQ2LFs8G79qYkryYfbSKfj2O0ec6wB2J/83tgFJRlGWOe YI+57+cpoIfkQSO6XtcUlXdSa6tf3ONtJYIU6Cn6Jdz1JAvzI4HXrnp/JSZFe0NpzpC4 evG9XFK8+A55EypyF0j3e1JUqRvmqxJPyIM6f8VHS3NGZxBEZETX+LsXzbGA4ofrAaep 6drQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FbMDtk67; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 2-20020a170906014200b008ca8e21134esi14578150ejh.281.2023.03.21.10.06.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 10:06:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FbMDtk67; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A65F385B516 for ; Tue, 21 Mar 2023 17:06:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A65F385B516 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679418369; bh=Hiaq0lsZS7Cn55KKPK/Je9HcO8lClqY08coVwhMCTsw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=FbMDtk67M4GuIeA/HeI632mGjbb/CniuU8a/ZcIQUKW+7Yyxxh/efy+chDwBG/yDw SUdA57T1MdYE0IKwLuFqsgn9XzAjwNlBUaacFzsMVaymZwI8B2/f9J4X1ovLhJgom4 yO9ND8OsvzDklHB23fZCfxWy78nTBER7qn0TB6xU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id B68F1385B519; Tue, 21 Mar 2023 17:05:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B68F1385B519 Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id F14802051042; Tue, 21 Mar 2023 18:05:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10iDUNmryA8b; Tue, 21 Mar 2023 18:05:23 +0100 (CET) Received: from srvEX6.campus.gsi.de (unknown [10.10.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id D5B902051040; Tue, 21 Mar 2023 18:05:23 +0100 (CET) Received: from minbar.localnet (140.181.3.12) by srvEX6.campus.gsi.de (10.10.4.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 21 Mar 2023 18:05:23 +0100 To: , Subject: [PATCH] libstdc++: Use more precise __RECIPROCAL_MATH__ macro Date: Tue, 21 Mar 2023 18:05:23 +0100 Message-ID: <5914330.taCxCBeP46@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvEX7.Campus.gsi.de (10.10.4.97) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Kretz via Gcc-patches From: Matthias Kretz Reply-To: Matthias Kretz Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760997837282260618?= X-GMAIL-MSGID: =?utf-8?q?1760997837282260618?= Tested on x86_64-pc-linux-gnu. --------- 8< ----------- Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_x86.h (_SimdImplX86::_S_divides): Replace test for __GCC_IEC_559 == 0 with __RECIPROCAL_MATH__. --- libstdc++-v3/include/experimental/bits/simd_x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ────────────────────────────────────────────────────────────────────────── diff --git a/libstdc++-v3/include/experimental/bits/simd_x86.h b/libstdc++-v3/include/experimental/bits/simd_x86.h index 28ba344c2b2..2a3e74d9119 100644 --- a/libstdc++-v3/include/experimental/bits/simd_x86.h +++ b/libstdc++-v3/include/experimental/bits/simd_x86.h @@ -1469,7 +1469,7 @@ _CsrGuard() [&__xf, &__yf](auto __i) _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA -> _SimdWrapper<_Float, __n_intermediate> { -#if __GCC_IEC_559 == 0 +#if __RECIPROCAL_MATH__ // If -freciprocal-math is active, using the `/` operator is // incorrect because it may be translated to an imprecise // multiplication with reciprocal. We need to use inline