From patchwork Thu Jun 1 08:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 101805 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp146390vqr; Thu, 1 Jun 2023 01:51:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7II/uVQ1KLuGumpfl+TygofQQ+J1jfBHEPSmU/XbBPIxuaxuCJZfG/uOv+pad48quzoV5i X-Received: by 2002:a17:907:3f11:b0:961:b0:3dfd with SMTP id hq17-20020a1709073f1100b0096100b03dfdmr8228798ejc.7.1685609483550; Thu, 01 Jun 2023 01:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685609483; cv=none; d=google.com; s=arc-20160816; b=Z4KChy2W7y55h6T0cpUr7/GaXm09SBNSTEHqsYl0Vj0iwVPGBOG7qDg7AVl6boPhO6 12sgtuxEApS/36mF1QzTHqGzJt/Qlj5PbQs6bJzonrZ/9lK8QrSomAAtuarMXPQsWaHI gDdYOeeKxdWh6VhfzRMdoHV4SiXoWkhAsk3fE1w/j6EffwLE6cir+y2B7miM+20I1d1V xVtKLjy6pzV0GcFLQHcoNBkyS0h6mDOhQpeaeue0FdQjKCz4X/27efOk0oHmnP0O/K7f VgtMRCnFxZEu8joZNdM7EtgpVvhBkd2dNZHBLMhC9FcmYXPK20Yn8OczZYvOGUnWvDTT bpeg== 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=WQxG41SQxJ/v9sOmiBzQE1Qj7bdefzTncZf7P0g1Kuw=; b=Fh/Ga8OLYw4m6rrFvn+rOl/Uvr5X41VvaAmTJ9Szzywt0TNgf5nj6rNM0UCIikJugC iM9gCAgMKLX9DCCL12p93ntIZ1Poc9o1EG0M/wfDK/nSn7RlYbuOVfRbgoM3m7NXqIuY wo7Yht7WwSowAT/CVb+JHTGtRdBL9ZZ19Gha2TUbSefmV1Bv30Ly6j/UOnb/ijcT1Amz 8PiSujmTOvgHmCrdnTvWPxG4rvdI1LAhwWdAe48HXXOGCA7cuoJEtaVpvOAupVc6A4r6 fY5m2dfdz4BFFsIbLbPm28VL5ZBrji5yzjg0AKyNED2gffIVwxKlFGTfPmb8FXCNj3yf ujew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=AcDNwh+d; 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y17-20020a170906471100b009665a6bbd42si4468648ejq.528.2023.06.01.01.51.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 01:51:23 -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=AcDNwh+d; 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 AEB143857342 for ; Thu, 1 Jun 2023 08:51:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEB143857342 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685609481; bh=WQxG41SQxJ/v9sOmiBzQE1Qj7bdefzTncZf7P0g1Kuw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AcDNwh+dDQdi2TtCyXthAt8bN8Ssv1S7dM/UJTxPH2kJARQGJF2oSYjqggBPMtxOv YCJzxLPlyBmv/HfxhYXXmJKnFMPv8Ngr3dgYTKvh1M+wdI6ww4Qakc0K30fToIf9Ep AXwDY6Nz3QRQiXB2njB0LvVrlHJOIJula/rf+q8g= 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 26284385772E; Thu, 1 Jun 2023 08:50:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26284385772E Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id 220472051044; Thu, 1 Jun 2023 10:49:59 +0200 (CEST) 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 KaEr16-nKo1t; Thu, 1 Jun 2023 10:49:59 +0200 (CEST) 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 08A692051040; Thu, 1 Jun 2023 10:49:59 +0200 (CEST) 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; Thu, 1 Jun 2023 10:49:58 +0200 To: , Subject: [committed] libstdc++: Fix condition for supported SIMD types on ARMv8 Date: Thu, 1 Jun 2023 10:49:58 +0200 Message-ID: <5270701.LvFx2qVVIh@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvEX6.Campus.gsi.de (10.10.4.96) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, 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: 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?1767489649873028503?= X-GMAIL-MSGID: =?utf-8?q?1767489649873028503?= pushed to trunk, will backport tested on arm-linux-gnueabihf ---------- 8< ---------- Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR libstdc++/110050 * include/experimental/bits/simd.h (__vectorized_sizeof): With __have_neon_a32 only single-precision float works (in addition to integers). --- libstdc++-v3/include/experimental/bits/simd.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- ────────────────────────────────────────────────────────────────────────── 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.h b/libstdc++-v3/include/experimental/bits/simd.h index f94b8361ab0..834fe923065 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -2808,8 +2808,10 @@ __vectorized_sizeof() return 16; // ARM: - if constexpr (__have_neon_a64 - || (__have_neon_a32 && !is_same_v<_Tp, double>) ) + if constexpr (__have_neon_a64) + return 16; + if constexpr (__have_neon_a32 and (not is_floating_point_v<_Tp> + or is_same_v<_Tp, float>)) return 16; if constexpr (__have_neon && sizeof(_Tp) < 8