public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-9651] libstdc++: Fix SFINAE for __is_intrinsic_type on ARM
@ 2023-05-24 19:41 Matthias Kretz
0 siblings, 0 replies; only message in thread
From: Matthias Kretz @ 2023-05-24 19:41 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:2b502c3119c91fe3ba2313f0842a3bedd395bc91
commit r12-9651-g2b502c3119c91fe3ba2313f0842a3bedd395bc91
Author: Matthias Kretz <m.kretz@gsi.de>
Date: Wed May 24 12:50:46 2023 +0200
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)
Diff:
---
libstdc++-v3/include/experimental/bits/simd.h | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h
index c8419156ece..ec142c91c04 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -2369,15 +2369,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 <> \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-24 19:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 19:41 [gcc r12-9651] libstdc++: Fix SFINAE for __is_intrinsic_type on ARM Matthias Kretz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).