From: Alexandre Oliva Date: Mon, 23 Mar 2026 01:32:55 +0000 (-0300) Subject: libstdc++: simd: allow x86 -mlong-double-64 X-Git-Tag: basepoints/gcc-17~490 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35bd360eedefe761435a85a2867ff9859720e398;p=thirdparty%2Fgcc.git libstdc++: simd: allow x86 -mlong-double-64 On a target that defaults to -mlong-double-64 -msse, standard_abi_usable.cc and other tests fail to compile because of the assert that rejects long double. As on ppc, we can trivially make things work for -mlong-double-64. for libstdc++-v3/ChangeLog * include/experimental/bits/simd.h (__intrinsic_type): Accept 64-bit long doubles on x86 SSE. --- diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index c2ac5adedac..b96818af6e6 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -2469,7 +2469,9 @@ template <> template 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"); static constexpr size_t _S_VBytes = _Bytes <= 16 ? 16 : _Bytes <= 32 ? 32 : 64;