From patchwork Thu Feb 23 08:49:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 60851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp207733wrd; Thu, 23 Feb 2023 00:54:50 -0800 (PST) X-Google-Smtp-Source: AK7set+tSJEwEnlRPSsO226a6TLokoGmD/37jG2nH73DSmaIvuXlCRpJlZ6WOllTstYLlzYwV5kg X-Received: by 2002:a17:907:2d21:b0:8cf:fda0:5b9b with SMTP id gs33-20020a1709072d2100b008cffda05b9bmr18216013ejc.22.1677142490692; Thu, 23 Feb 2023 00:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677142490; cv=none; d=google.com; s=arc-20160816; b=Ti4h+kQUHNAcsST8iTU8JQcVEWRIaAbbSBFAOeoU6oZ3CpNFaYKPURf+aJM78NAmGA rQ+PMW5xPGhdKnO+3xzdc1OcjoPN1pzNt/5wIvex2oarJRRREv9/JkM03dAN+/+O4ahe W17girkMIv7TvVM2XKwT5wazBdOBqj1Vn8+sfFogCIsdJz/EQTyEXAdrgPfgHvzFRSD9 OxBTUL3xiuify5uYtm8YBThyn8M/OS4Su8cKcVWX7OjioHnuDQKrDlz21Od7yzN3sVIR NyvZKl5rXWOYJ1yKMK36VFaqW+lnol8hUR8pDtcwPD2A+t/8kQUDyKVA2vL5pBDbJyiw IDmA== 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:references:in-reply-to :organization:message-id:date:subject:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=AgxscoKFy/CekB/YLpVJE+jSMMWy3oUOwZus4r2DXjs=; b=axo8ZG5PhNAaWT7ewIgNVfWbxc1ngZkk9WNDf2LfsSpeY1tqlDArNCcWqqTb1T+QE/ U19oObJWEXTA/YF3H0YyA6Q1e19RDPbeKx70cD4HzaAeB3XqIbwq0XCOPjlHUMOIdE72 jOKIEyQeB0u9XgJCb+ZGqa9ByjYtN11k6sXpEGvBbPHo0h1nv8J1tvIOM0IP+6UA+Yd/ XbYtupqiVGG/T8+UEXtLydqnOI0qsARdteYaZsptFArLsFEUEMeH7jYeQ0aTEEwsgEBO xK9H19AaN4CfUUGwqdNpJJx0PnyHGjQyvOx8f4iMtkILqu7C7UpAdDSPwsQp2jFHmxCq uU8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=aA7crae8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e28-20020a170906749c00b008d4aec3e62bsi15061387ejl.233.2023.02.23.00.54.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 00:54:50 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=aA7crae8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 F110A383EC76 for ; Thu, 23 Feb 2023 08:52:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F110A383EC76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677142364; bh=AgxscoKFy/CekB/YLpVJE+jSMMWy3oUOwZus4r2DXjs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=aA7crae86xvTyqqTYyGGF+9nToyeGL9DzxX8+BTQRT19SI/Gfu3RFK/KCyCqzDfXn 9Ovvb5byC3hn8Qt/RhUgflciDYWWPTYX01JHgw7shEuS5nj16zRIPuFv5ngFMAAK0w dsp36X5uz2gmiDmtaAbnzN6UWhL5R4umtvnBrgTg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout2.gsi.de (lxmtout2.gsi.de [140.181.3.112]) by sourceware.org (Postfix) with ESMTPS id 4E22A385B53E; Thu, 23 Feb 2023 08:50:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E22A385B53E Received: from localhost (localhost [127.0.0.1]) by lxmtout2.gsi.de (Postfix) with ESMTP id 76F4B2038F9E; Thu, 23 Feb 2023 09:50:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout2.gsi.de Received: from lxmtout2.gsi.de ([127.0.0.1]) by localhost (lxmtout2.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id f6SPiRUlsljK; Thu, 23 Feb 2023 09:50:53 +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 lxmtout2.gsi.de (Postfix) with ESMTPS id 5AA5F203E7FB; Thu, 23 Feb 2023 09:50:53 +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.25; Thu, 23 Feb 2023 09:50:53 +0100 To: , Subject: [PATCH 2/8] libstdc++: Fix simd build failure on clang Date: Thu, 23 Feb 2023 09:49:29 +0100 Message-ID: <3152270.5fSG56mABF@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research In-Reply-To: <2218250.iZASKD2KPV@minbar> References: <2218250.iZASKD2KPV@minbar> MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvex5.Campus.gsi.de (10.10.4.95) 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?1758611364362807834?= X-GMAIL-MSGID: =?utf-8?q?1758611364362807834?= Clang does not support __attribute__ on lambdas. Therefore, only set _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA if __clang__ is not defined. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR libstdc++/108030 * include/experimental/bits/simd_detail.h (_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA): Define as empty for __clang__. --- libstdc++-v3/include/experimental/bits/simd_detail.h | 3 ++- 1 file changed, 2 insertions(+), 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_detail.h b/libstdc++-v3/include/experimental/bits/simd_detail.h index a0ad10efe0f..30cc1ef0eef 100644 --- a/libstdc++-v3/include/experimental/bits/simd_detail.h +++ b/libstdc++-v3/include/experimental/bits/simd_detail.h @@ -254,15 +254,16 @@ namespace experimental #ifdef __clang__ #define _GLIBCXX_SIMD_NORMAL_MATH +#define _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA #else #define _GLIBCXX_SIMD_NORMAL_MATH \ [[__gnu__::__optimize__("finite-math-only,no-signed-zeros")]] +#define _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA __attribute__((__always_inline__)) #endif #define _GLIBCXX_SIMD_NEVER_INLINE [[__gnu__::__noinline__]] #define _GLIBCXX_SIMD_INTRINSIC \ [[__gnu__::__always_inline__, __gnu__::__artificial__]] inline #define _GLIBCXX_SIMD_ALWAYS_INLINE [[__gnu__::__always_inline__]] inline -#define _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA __attribute__((__always_inline__)) #define _GLIBCXX_SIMD_IS_UNLIKELY(__x) __builtin_expect(__x, 0) #define _GLIBCXX_SIMD_IS_LIKELY(__x) __builtin_expect(__x, 1)