diff options
author | ZhangYin <zhangyin2018@iscas.ac.cn> | 2024-01-18 13:59:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 13:59:01 +0800 |
commit | 9917d39dfceb6a436cd0e370392f9001f30758f1 (patch) | |
tree | 899bf37d5a975884c4eac0d4e9eb177e35480fe6 /libcxx/include/experimental | |
parent | d83d1cb89cf80cda9d85e61c7b43f69446638865 (diff) | |
download | llvm-9917d39dfceb6a436cd0e370392f9001f30758f1.zip llvm-9917d39dfceb6a436cd0e370392f9001f30758f1.tar.gz llvm-9917d39dfceb6a436cd0e370392f9001f30758f1.tar.bz2 |
[libc++] <experimental/simd> Fix vector_aligned_tag (#76611)
Co-authored-by: Nikolas Klauser <nikolasklauser@berlin.de>
Diffstat (limited to 'libcxx/include/experimental')
-rw-r--r-- | libcxx/include/experimental/__simd/aligned_tag.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/experimental/__simd/aligned_tag.h b/libcxx/include/experimental/__simd/aligned_tag.h index edbb3b24..31d2b50 100644 --- a/libcxx/include/experimental/__simd/aligned_tag.h +++ b/libcxx/include/experimental/__simd/aligned_tag.h @@ -11,6 +11,7 @@ #define _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H #include <__memory/assume_aligned.h> +#include <__type_traits/remove_const.h> #include <cstddef> #include <experimental/__config> #include <experimental/__simd/traits.h> @@ -35,7 +36,7 @@ inline constexpr bool is_simd_flag_type_v<element_aligned_tag> = true; struct vector_aligned_tag { template <class _Tp, class _Up = typename _Tp::value_type> - static constexpr size_t __alignment = memory_alignment_v<_Tp, _Up>; + static constexpr size_t __alignment = memory_alignment_v<_Tp, remove_const_t<_Up>>; template <class _Tp, class _Up> static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) { |