File tree 1 file changed +5
-1
lines changed
libcxx/include/experimental/__simd 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ inline constexpr bool is_abi_tag_v<simd_abi::__vec_ext<_Np>> = _Np > 0 && _Np <=
37
37
38
38
template <class _Tp , int _Np>
39
39
struct __simd_storage <_Tp, simd_abi::__vec_ext<_Np>> {
40
- _Tp __data __attribute__ ((__vector_size__(std::__bit_ceil((sizeof (_Tp) * _Np)))));
40
+ // This doesn't work in GCC if it is directly inside the __vector_size__ attribute because of a call to
41
+ // __builtin_is_constant_evaluated. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105233
42
+ static constexpr size_t __vector_size = std::__bit_ceil(sizeof (_Tp) * _Np);
43
+
44
+ _Tp __data __attribute__ ((__vector_size__(__vector_size)));
41
45
42
46
_LIBCPP_HIDE_FROM_ABI _Tp __get (size_t __idx) const noexcept {
43
47
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (__idx < _Np, " Index is out of bounds" );
You can’t perform that action at this time.
0 commit comments