Skip to content

Conversation

@philnik777
Copy link
Contributor

Previously the wrong detection macro has been used to check whether arm NEON is available. This fixes it, and removes a few unnecessary includes from __algorithm/simd_utils.h as a drive-by.

@philnik777 philnik777 marked this pull request as ready for review February 28, 2025 12:38
@philnik777 philnik777 requested a review from a team as a code owner February 28, 2025 12:38
@philnik777 philnik777 merged commit 1a6f9fd into llvm:main Feb 28, 2025
78 of 82 checks passed
@philnik777 philnik777 deleted the fix_arm_neon branch February 28, 2025 12:38
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 28, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

Previously the wrong detection macro has been used to check whether arm NEON is available. This fixes it, and removes a few unnecessary includes from __algorithm/simd_utils.h as a drive-by.


Full diff: https://github.com/llvm/llvm-project/pull/128873.diff

1 Files Affected:

  • (modified) libcxx/include/__algorithm/simd_utils.h (+1-3)
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h
index 4e03723a32854..e3c790998e902 100644
--- a/libcxx/include/__algorithm/simd_utils.h
+++ b/libcxx/include/__algorithm/simd_utils.h
@@ -15,8 +15,6 @@
 #include <__bit/countr.h>
 #include <__config>
 #include <__cstddef/size_t.h>
-#include <__type_traits/is_arithmetic.h>
-#include <__type_traits/is_same.h>
 #include <__utility/integer_sequence.h>
 #include <cstdint>
 
@@ -78,7 +76,7 @@ using __get_as_integer_type_t _LIBCPP_NODEBUG = typename __get_as_integer_type_i
 #  if defined(__AVX__) || defined(__MVS__)
 template <class _Tp>
 inline constexpr size_t __native_vector_size = 32 / sizeof(_Tp);
-#  elif defined(__SSE__) || defined(__ARM_NEON__)
+#  elif defined(__SSE__) || defined(__ARM_NEON)
 template <class _Tp>
 inline constexpr size_t __native_vector_size = 16 / sizeof(_Tp);
 #  elif defined(__MMX__)

cheezeburglar pushed a commit to cheezeburglar/llvm-project that referenced this pull request Feb 28, 2025
Previously the wrong detection macro has been used to check whether arm
NEON is available. This fixes it, and removes a few unnecessary includes
from `__algorithm/simd_utils.h` as a drive-by.
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.

2 participants