diff options
| author | Louis Dionne <ldionne.2@gmail.com> | 2025-03-24 13:22:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 13:22:40 -0400 |
| commit | aa80388cf9d2444c82e7a1a8c73ddf14930be318 (patch) | |
| tree | 2dfe9ce64b7a90a23b112dcaf21c56ceed2b20f4 /libcxx/include/__algorithm | |
| parent | ef4f479dab2ef1fc42a461583025e9b5c34a2f7c (diff) | |
[libc++] Ensure that we vectorize algorithms on all Clang-based compilers (#132090)
Otherwise, we wouldn't vectorize on compilers like AppleClang when in
reality we know perfectly well how to do it.
Diffstat (limited to 'libcxx/include/__algorithm')
| -rw-r--r-- | libcxx/include/__algorithm/simd_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h index 6ee7bd4bcbd9..47942a09e67c 100644 --- a/libcxx/include/__algorithm/simd_utils.h +++ b/libcxx/include/__algorithm/simd_utils.h @@ -26,7 +26,9 @@ _LIBCPP_PUSH_MACROS #include <__undef_macros> // TODO: Find out how altivec changes things and allow vectorizations there too. -#if _LIBCPP_STD_VER >= 14 && defined(_LIBCPP_CLANG_VER) && !defined(__ALTIVEC__) +// TODO: Simplify this condition once we stop building with AppleClang 15 in the CI. +#if _LIBCPP_STD_VER >= 14 && defined(_LIBCPP_COMPILER_CLANG_BASED) && !defined(__ALTIVEC__) && \ + !(defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1600) # define _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS 1 #else # define _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS 0 |
