[libcxx-commits] [libcxx] [libc++] Ensure that we vectorize algorithms on all Clang-based compilers (PR #132090)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 20 10:48:30 PDT 2025
================
@@ -0,0 +1,19 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// We don't know how to vectorize algorithms on GCC
+// XFAIL: gcc
+
+// This test ensures that we enable the vectorization of algorithms on the expected
+// platforms.
+
+#include <algorithm>
+
+#if !_LIBCPP_VECTORIZE_ALGORITHMS
----------------
ldionne wrote:
Since we check for the positive, the test would fail if `_LIBCPP_VECTORIZE_ALGORITHMS` were not defined. I'm not certain what the additional test buys us? I guess I can test the test by adding an `#error` if the macro isn't defined.
https://github.com/llvm/llvm-project/pull/132090
More information about the libcxx-commits
mailing list