diff options
author | Matthias Kretz <m.kretz@gsi.de> | 2024-04-17 09:11:25 +0200 |
---|---|---|
committer | Matthias Kretz <m.kretz@gsi.de> | 2024-04-17 10:33:56 +0200 |
commit | 0fc7f3c6adc8543f55ec35b309016d9d9c4ddd35 (patch) | |
tree | 55a11d6b0ac8f9a926beb3546437a83b9d3bf661 | |
parent | 299d14a54672a4d12c1abbe4031a732bb56cddaa (diff) | |
download | gcc-0fc7f3c6adc8543f55ec35b309016d9d9c4ddd35.zip gcc-0fc7f3c6adc8543f55ec35b309016d9d9c4ddd35.tar.gz gcc-0fc7f3c6adc8543f55ec35b309016d9d9c4ddd35.tar.bz2 |
libstdc++: Avoid ill-formed types on ARM
This resolves failing tests in check-simd.
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
PR libstdc++/114750
* include/experimental/bits/simd_builtin.h
(_SimdImplBuiltin::_S_load, _S_store): Fall back to copying
scalars if the memory type cannot be vectorized for the target.
-rw-r--r-- | libstdc++-v3/include/experimental/bits/simd_builtin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/experimental/bits/simd_builtin.h b/libstdc++-v3/include/experimental/bits/simd_builtin.h index 28227a5..af0c488 100644 --- a/libstdc++-v3/include/experimental/bits/simd_builtin.h +++ b/libstdc++-v3/include/experimental/bits/simd_builtin.h @@ -1464,7 +1464,7 @@ template <typename _Abi, typename> [&](auto __i) constexpr { return static_cast<_Tp>(__i < _Np ? __mem[__i] : 0); }); - else if constexpr (sizeof(_Up) > 8) + else if constexpr (sizeof(_Up) > 8 or __vectorized_sizeof<_Up>() <= sizeof(_Up)) return __generate_vector<_Tp, _SimdMember<_Tp>::_S_full_size>( [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { return static_cast<_Tp>(__i < _Np ? __mem[__i] : 0); @@ -1536,7 +1536,7 @@ template <typename _Abi, typename> for (size_t __i = 0; __i < _Np; ++__i) __mem[__i] = __v[__i]; } - else if constexpr (sizeof(_Up) > 8) + else if constexpr (sizeof(_Up) > 8 or __vectorized_sizeof<_Up>() <= sizeof(_Up)) __execute_n_times<_Np>([&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { __mem[__i] = __v[__i]; }); |