[libcxx-commits] [libcxx] adae4e9 - [libcxx] <experimental/simd> Fix CI errors on 32-bits x86
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 13 02:13:01 PDT 2023
Author: Zhangyin
Date: 2023-09-13T17:12:53+08:00
New Revision: adae4e9b5c98172c8c3e6fd261192d6931314748
URL: https://github.com/llvm/llvm-project/commit/adae4e9b5c98172c8c3e6fd261192d6931314748
DIFF: https://github.com/llvm/llvm-project/commit/adae4e9b5c98172c8c3e6fd261192d6931314748.diff
LOG: [libcxx] <experimental/simd> Fix CI errors on 32-bits x86
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D159509
Added:
Modified:
libcxx/include/experimental/__simd/vec_ext.h
Removed:
################################################################################
diff --git a/libcxx/include/experimental/__simd/vec_ext.h b/libcxx/include/experimental/__simd/vec_ext.h
index 13cc4006b5f5d94..c7c2decefad3e40 100644
--- a/libcxx/include/experimental/__simd/vec_ext.h
+++ b/libcxx/include/experimental/__simd/vec_ext.h
@@ -31,11 +31,11 @@ struct __simd_storage<_Tp, simd_abi::__vec_ext<_Np>> {
_Tp __data __attribute__((__vector_size__(std::__bit_ceil((sizeof(_Tp) * _Np)))));
_Tp __get(size_t __idx) const noexcept {
- _LIBCPP_ASSERT_UNCATEGORIZED(__idx > 0 && __idx <= _Np, "Index is out of bounds");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__idx >= 0 && __idx < _Np, "Index is out of bounds");
return __data[__idx];
}
void __set(size_t __idx, _Tp __v) noexcept {
- _LIBCPP_ASSERT_UNCATEGORIZED(__idx > 0 && __idx <= _Np, "Index is out of bounds");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__idx >= 0 && __idx < _Np, "Index is out of bounds");
__data[__idx] = __v;
}
};
More information about the libcxx-commits
mailing list