[gcc(refs/users/aoliva/heads/testme)] libstdc++: simd: map 64-bit long double to double on sse [PR124657]

Alexandre Oliva aoliva@gcc.gnu.org
Wed Apr 22 04:23:31 GMT 2026


https://gcc.gnu.org/g:97b1bbce62e610f4b04bad7b26031f16ed94c87f

commit 97b1bbce62e610f4b04bad7b26031f16ed94c87f
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Apr 22 01:01:29 2026 -0300

    libstdc++: simd: map 64-bit long double to double on sse [PR124657]
    
    When long double is as wide as double on x86 (-mlong-double-64), make
    the __intrinsic_type a vector of double.
    
    
    for  libstdc++-v3/ChangeLog
    
            PR libstdc++/124657
            * include/experimental/bits/simd.h (__intrinsic_type::type):
            Map long double to double.

Diff:
---
 libstdc++-v3/include/experimental/bits/simd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h
index b96818af6e6f..8c30c8af2688 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -2477,7 +2477,8 @@ template <typename _Tp, size_t _Bytes>
     static constexpr size_t _S_VBytes = _Bytes <= 16 ? 16 : _Bytes <= 32 ? 32 : 64;
 
     using type [[__gnu__::__vector_size__(_S_VBytes)]]
-      = conditional_t<is_integral_v<_Tp>, long long int, _Tp>;
+      = conditional_t<is_integral_v<_Tp>, long long int,
+		      conditional_t<is_same_v<_Tp, long double>, double, _Tp> >;
   };
 #endif // _GLIBCXX_SIMD_HAVE_SSE


More information about the Libstdc++-cvs mailing list