[Openmp-commits] [PATCH] D138738: [openmp] [test] XFAIL many-microtask-args.c on ARM

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 28 13:51:06 PST 2022


mstorsjo updated this revision to Diff 478364.
mstorsjo added a comment.

Make sure OPENMP_TEST_COMPILER_FEATURES is defined properly in all other test subdirectories other than runtime/test.

Also remove accidental commas from the end of entries in OPENMP_TEST_COMPILER_FEATURE_LIST.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138738/new/

https://reviews.llvm.org/D138738

Files:
  openmp/cmake/OpenMPTesting.cmake
  openmp/runtime/test/CMakeLists.txt
  openmp/runtime/test/misc_bugs/many-microtask-args.c


Index: openmp/runtime/test/misc_bugs/many-microtask-args.c
===================================================================
--- openmp/runtime/test/misc_bugs/many-microtask-args.c
+++ openmp/runtime/test/misc_bugs/many-microtask-args.c
@@ -1,6 +1,11 @@
 // RUN: %libomp-compile-and-run
 #include <stdio.h>
 
+// This test fails with Clang unless __kmp_invoke_microtask supports at least
+// 17 arguments. On ARM, the fallback C implementation of __kmp_invoke_microtask
+// is used, and that one only currently supports up to 15 arguments.
+// XFAIL: arm
+
 int main()
 {
 
Index: openmp/runtime/test/CMakeLists.txt
===================================================================
--- openmp/runtime/test/CMakeLists.txt
+++ openmp/runtime/test/CMakeLists.txt
@@ -24,6 +24,9 @@
   endif()
 endmacro()
 
+list(APPEND OPENMP_TEST_COMPILER_FEATURE_LIST "${LIBOMP_ARCH}")
+update_test_compiler_features()
+
 pythonize_bool(LIBOMP_USE_HWLOC)
 pythonize_bool(LIBOMP_OMPT_SUPPORT)
 pythonize_bool(LIBOMP_OMPT_OPTIONAL)
Index: openmp/cmake/OpenMPTesting.cmake
===================================================================
--- openmp/cmake/OpenMPTesting.cmake
+++ openmp/cmake/OpenMPTesting.cmake
@@ -159,6 +159,20 @@
 endif()
 
 # Function to set compiler features for use in lit.
+function(update_test_compiler_features)
+  set(FEATURES "[")
+  set(first TRUE)
+  foreach(feat IN LISTS OPENMP_TEST_COMPILER_FEATURE_LIST)
+    if (NOT first)
+      string(APPEND FEATURES ", ")
+    endif()
+    set(first FALSE)
+    string(APPEND FEATURES "'${feat}'")
+  endforeach()
+  string(APPEND FEATURES "]")
+  set(OPENMP_TEST_COMPILER_FEATURES ${FEATURES} PARENT_SCOPE)
+endfunction()
+
 function(set_test_compiler_features)
   if ("${OPENMP_TEST_COMPILER_ID}" STREQUAL "GNU")
     set(comp "gcc")
@@ -168,9 +182,10 @@
     # Just use the lowercase of the compiler ID as fallback.
     string(TOLOWER "${OPENMP_TEST_COMPILER_ID}" comp)
   endif()
-  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)
+  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)
 endfunction()
 set_test_compiler_features()
+update_test_compiler_features()
 
 # Function to add a testsuite for an OpenMP runtime library.
 function(add_openmp_testsuite target comment)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138738.478364.patch
Type: text/x-patch
Size: 2545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221128/5da55ca9/attachment.bin>


More information about the Openmp-commits mailing list