aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kretz <m.kretz@gsi.de>2023-06-01 10:40:14 +0200
committerMatthias Kretz <m.kretz@gsi.de>2023-06-01 10:45:10 +0200
commit2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef (patch)
treefca88b0da8544996ec45be4d887d66223dd1a2f1
parent12e71b593ea0c64d919df525cd75ea10b7be8a4b (diff)
downloadgcc-2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef.zip
gcc-2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef.tar.gz
gcc-2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef.tar.bz2
libstdc++: Fix condition for supported SIMD types on ARMv8
Signed-off-by: Matthias Kretz <m.kretz@gsi.de> 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).
-rw-r--r--libstdc++-v3/include/experimental/bits/simd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h
index f94b836..834fe92 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -2808,8 +2808,10 @@ template <typename _Tp>
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