From: Matthias Kretz Date: Thu, 1 Jun 2023 08:40:14 +0000 (+0200) Subject: libstdc++: Fix condition for supported SIMD types on ARMv8 X-Git-Tag: basepoints/gcc-15~8676 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index f94b8361ab06..834fe923065b 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