From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7857) id B7D693858D33; Thu, 1 Jun 2023 08:49:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7D693858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685609379; bh=wTVxGhoIXEXFN+ZscRIU84+pwlWO45FzBcUC6zMNPxo=; h=From:To:Subject:Date:From; b=WpB2JH6siF3K+iZJJGJoA/hhYtdMWx1UI/y3JrIjJ2jk3jmuxaM3Bs8a5pm0MSG/B lXd0u72FOpgcSusej7vW2Oi1mxakn8toaFZa7mJ/cDzbJ8h7wfHWFyXOnBF+e7O720 AEnxgWlqRcDbgXVcdt/ogXvyfdaBv4/r3JFj68n8= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Matthias Kretz To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-1463] libstdc++: Fix condition for supported SIMD types on ARMv8 X-Act-Checkin: gcc X-Git-Author: Matthias Kretz X-Git-Refname: refs/heads/master X-Git-Oldrev: 12e71b593ea0c64d919df525cd75ea10b7be8a4b X-Git-Newrev: 2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef Message-Id: <20230601084939.B7D693858D33@sourceware.org> Date: Thu, 1 Jun 2023 08:49:39 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef commit r14-1463-g2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef Author: Matthias Kretz Date: Thu Jun 1 10:40:14 2023 +0200 libstdc++: Fix condition for supported SIMD types on ARMv8 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). Diff: --- libstdc++-v3/include/experimental/bits/simd.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 @@ template 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