[libcxx-commits] [libcxx] [libc++] <experimental/simd> Fix vector_aligned_tag to pass #76610 (PR #76611)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 16 21:01:19 PST 2024
https://github.com/joy2myself updated https://github.com/llvm/llvm-project/pull/76611
>From cc11b09661591974f1d45168b2c67dc551fdd6ef Mon Sep 17 00:00:00 2001
From: Yin Zhang <zhangyin2018 at iscas.ac.cn>
Date: Fri, 29 Dec 2023 16:15:27 +0800
Subject: [PATCH 1/2] [libc++] <experimental/simd> Fix vector_aligned_tag
---
libcxx/include/experimental/__simd/aligned_tag.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libcxx/include/experimental/__simd/aligned_tag.h b/libcxx/include/experimental/__simd/aligned_tag.h
index edbb3b24931f5a..bec2c7652d4a51 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, std::remove_const_t<_Up>>;
template <class _Tp, class _Up>
static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) {
>From 5eaf14b8ce40c2fd5f510062bd36c6659a4f7bff Mon Sep 17 00:00:00 2001
From: ZhangYin <joy2myself at qq.com>
Date: Wed, 17 Jan 2024 13:01:13 +0800
Subject: [PATCH 2/2] Update libcxx/include/experimental/__simd/aligned_tag.h
Co-authored-by: Nikolas Klauser <nikolasklauser at berlin.de>
---
libcxx/include/experimental/__simd/aligned_tag.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/include/experimental/__simd/aligned_tag.h b/libcxx/include/experimental/__simd/aligned_tag.h
index bec2c7652d4a51..31d2b50aa1dd36 100644
--- a/libcxx/include/experimental/__simd/aligned_tag.h
+++ b/libcxx/include/experimental/__simd/aligned_tag.h
@@ -36,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, std::remove_const_t<_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) {
More information about the libcxx-commits
mailing list