[libcxx-commits] [libcxx] [libc++] Fix <__algorithm/find.h> when using -flax-vector-conversions=none (PR #161362)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 30 05:40:42 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/161362.diff
2 Files Affected:
- (modified) libcxx/include/__algorithm/find.h (+2-1)
- (modified) libcxx/utils/libcxx/test/params.py (+3)
``````````diff
diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index 5f32ae8fc9524..0df9598036461 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -26,6 +26,7 @@
#include <__type_traits/is_equality_comparable.h>
#include <__type_traits/is_integral.h>
#include <__type_traits/is_signed.h>
+#include <__type_traits/remove_const.h>
#include <__utility/move.h>
#include <limits>
@@ -69,7 +70,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find_vectorized(_Tp* __first, _Tp* __last,
auto __orig_first = __first;
- auto __values = static_cast<__simd_vector<_Up, __vec_size>>(__value); // broadcast the value
+ auto __values = static_cast<__simd_vector<_Tp, __vec_size>>(__value); // broadcast the value
while (static_cast<size_t>(__last - __first) >= __unroll_count * __vec_size) [[__unlikely__]] {
__vec __lhs[__unroll_count];
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 6f013a75195a8..c02d6df1c47a4 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -75,6 +75,9 @@
# We're not annotating all the APIs, since that's a lot of annotations compared to how many we actually care about
"-Wno-nullability-completeness",
+
+ # Technically not a warning flag, but might as well be:
+ "-flax-vector-conversions=none",
]
_allStandards = ["c++03", "c++11", "c++14", "c++17", "c++20", "c++23", "c++26"]
``````````
</details>
https://github.com/llvm/llvm-project/pull/161362
More information about the libcxx-commits
mailing list