Skip to content

Conversation

philnik777
Copy link
Contributor

No description provided.

@philnik777 philnik777 requested a review from a team as a code owner September 30, 2025 12:39
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 30, 2025
@philnik777
Copy link
Contributor Author

CC @mstorsjo

@llvmbot
Copy link
Member

llvmbot commented Sep 30, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

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 --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"]

Copy link

github-actions bot commented Sep 30, 2025

⚠️ Python code formatter, darker found issues in your code. ⚠️

You can test this locally with the following command:
darker --check --diff -r origin/main...HEAD libcxx/utils/libcxx/test/params.py

⚠️
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing origin/main to the base branch/commit you want to compare against.
⚠️

View the diff from darker here.
--- params.py	2025-10-01 08:08:31.000000 +0000
+++ params.py	2025-10-01 08:11:44.771114 +0000
@@ -73,11 +73,10 @@
     # This doesn't make sense in real code, but we have to test it because the standard requires us to not break
     "-Wno-self-move",
 
     # 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"]

@mstorsjo
Copy link
Member

This fixes my build issues, thanks! I can't comment on the contents of the change itself though.

@philnik777 philnik777 force-pushed the fix_no_lax_vec_conversions branch from a9db36c to a6c5984 Compare October 1, 2025 07:35
@philnik777 philnik777 force-pushed the fix_no_lax_vec_conversions branch from a6c5984 to 474759d Compare October 1, 2025 08:09
@philnik777 philnik777 merged commit 66558d7 into llvm:main Oct 2, 2025
68 of 78 checks passed
@philnik777 philnik777 deleted the fix_no_lax_vec_conversions branch October 2, 2025 08:05
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants