Skip to content

Commit 03bf001

Browse files
committed
[openmp] [test] XFAIL many-microtask-args.c on ARM
On ARM, a C fallback version of __kmp_invoke_microtask is used, which only handles up to a fixed number of arguments - while many-microtask-args.c tests that the function can handle an arbitrarily large number of arguments (the testcase produces 17 arguments). On the CMake level, we can't add ${LIBOMP_ARCH} directly to OPENMP_TEST_COMPILER_FEATURES in OpenMPTesting.cmake, since that file is parsed before LIBOMP_ARCH is set. Instead convert the feature list into a proper CMake list, and append ${LIBOMP_ARCH} into it before serializing it to an Python array. Differential Revision: https://reviews.llvm.org/D138738
1 parent 63f0fdc commit 03bf001

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

openmp/cmake/OpenMPTesting.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function(set_test_compiler_features)
168168
# Just use the lowercase of the compiler ID as fallback.
169169
string(TOLOWER "${OPENMP_TEST_COMPILER_ID}" comp)
170170
endif()
171-
set(OPENMP_TEST_COMPILER_FEATURES "['${comp}', '${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR}', '${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR}', '${comp}-${OPENMP_TEST_COMPILER_VERSION}']" PARENT_SCOPE)
171+
set(OPENMP_TEST_COMPILER_FEATURE_LIST ${comp}, ${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR}, ${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR}, ${comp}-${OPENMP_TEST_COMPILER_VERSION} PARENT_SCOPE)
172172
endfunction()
173173
set_test_compiler_features()
174174

openmp/runtime/test/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ macro(pythonize_bool var)
2424
endif()
2525
endmacro()
2626

27+
list(APPEND OPENMP_TEST_COMPILER_FEATURE_LIST "${LIBOMP_ARCH}")
28+
set(OPENMP_TEST_COMPILER_FEATURES "[")
29+
set(first TRUE)
30+
foreach(feat IN LISTS OPENMP_TEST_COMPILER_FEATURE_LIST)
31+
if (NOT first)
32+
string(APPEND OPENMP_TEST_COMPILER_FEATURES ", ")
33+
endif()
34+
set(first FALSE)
35+
string(APPEND OPENMP_TEST_COMPILER_FEATURES "'${feat}'")
36+
endforeach()
37+
string(APPEND OPENMP_TEST_COMPILER_FEATURES "]")
38+
2739
pythonize_bool(LIBOMP_USE_HWLOC)
2840
pythonize_bool(LIBOMP_OMPT_SUPPORT)
2941
pythonize_bool(LIBOMP_OMPT_OPTIONAL)

openmp/runtime/test/misc_bugs/many-microtask-args.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// RUN: %libomp-compile-and-run
22
#include <stdio.h>
33

4+
// This test fails with Clang unless __kmp_invoke_microtask supports at least
5+
// 17 arguments. On ARM, the fallback C implementation of __kmp_invoke_microtask
6+
// is used, and that one only currently supports up to 15 arguments.
7+
// XFAIL: arm
8+
49
int main()
510
{
611

0 commit comments

Comments
 (0)