Jonathan Wakely [Thursday, 26 March 2026, 01:18:04 GMT]: > On Wed, 25 Mar 2026, 12:50 Alexandre Oliva, <[email protected]> wrote: > > On Mar 25, 2026, Jonathan Wakely <[email protected]> wrote: > > > On Tue, 24 Mar 2026 at 06:30, Alexandre Oliva <[email protected]> wrote: > > >> template <typename _Tp, size_t _Bytes> > > >> > > >> struct __intrinsic_type<_Tp, _Bytes, > > > > enable_if_t<__is_vectorizable_v<_Tp> && _Bytes <= 64>> > > > > >> { > > >> > > >> - static_assert(!is_same_v<_Tp, long double>, > > >> + // allow _Tp == long double with -mlong-double-64 > > >> + static_assert(!(is_same_v<_Tp, long double> > > >> + && sizeof(long double) > sizeof(double)), > > >> "no __intrinsic_type support for long double on x86"); > > > > > > Would this be a little easier to understand as: > > > > > > if constexpr (sizeof(long double) > sizeof(double)) > > > > > > static_assert(!is_same_v<_Tp, long double>, "..."); > > > > It would be nicer indeed, but... > > we can't do that in class scope, can we? > > Oh sorry, I misread the context. The patch is fine then
For whatever reason, this is the first email I received of this thread. I fear that this might lead to problems further down in the implementation. I think this should rather map '__intrinsic_type<long double, N>' to '[[gnu::vector_size(16/32/64)]] double'. PPC has to do a similar thing (below). - Matthias -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Center for Heavy Ion Research https://gsi.de std::simd ──────────────────────────────────────────────────────────────────────────
