diff options
author | Matthias Kretz <m.kretz@gsi.de> | 2023-05-24 12:50:46 +0200 |
---|---|---|
committer | Matthias Kretz <m.kretz@gsi.de> | 2023-05-25 09:04:03 +0200 |
commit | ad27280442d7979cf9da03d59268919fecfd12f4 (patch) | |
tree | e5ed6eaefa6433a5d80470690235d7d0c729050d /libstdc++-v3 | |
parent | f2299a4b2769941cd995e3a0530ff243153fcea2 (diff) |
libstdc++: Fix SFINAE for __is_intrinsic_type on ARM
On ARM NEON doesn't support double, so __is_intrinsic_type_v<double,
whatever> should say false (instead of being ill-formed).
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
PR libstdc++/109261
* include/experimental/bits/simd.h (__intrinsic_type):
Specialize __intrinsic_type<double, 8> and
__intrinsic_type<double, 16> in any case, but provide the member
type only with __aarch64__.
(cherry picked from commit aa8b363171a95b8f867a74f29c75f9577e9087e1)
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/include/experimental/bits/simd.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index f6e8f3b24c4..7e877e85f80 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -2240,15 +2240,21 @@ template <> struct __intrinsic_type<float, 16, void> { using type = float32x4_t; }; -#if _GLIBCXX_SIMD_HAVE_NEON_A64 template <> struct __intrinsic_type<double, 8, void> - { using type = float64x1_t; }; + { +#if _GLIBCXX_SIMD_HAVE_NEON_A64 + using type = float64x1_t; +#endif + }; template <> struct __intrinsic_type<double, 16, void> - { using type = float64x2_t; }; + { +#if _GLIBCXX_SIMD_HAVE_NEON_A64 + using type = float64x2_t; #endif + }; #define _GLIBCXX_SIMD_ARM_INTRIN(_Bits, _Np) \ template <> \ |