[PATCH] D148325: [AIX] enable OrcCAPITest

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 04:05:30 PDT 2023


shchenz created this revision.
shchenz added reviewers: hubert.reinterpretcast, PowerPC.
shchenz added a project: LLVM.
Herald added a project: All.
shchenz requested review of this revision.
Herald added a subscriber: llvm-commits.

The case was excluded in D101971 <https://reviews.llvm.org/D101971> because of integrated-as support on AIX.
Now AIX integrated-as improves a lot, we can enable the tests in OrcCAPITest file.

The excluded 4 cases are caused by "LLVM ERROR: Incompatible object format!".
We need to add XCOFF support in `RuntimeDyld::loadObject` for these 4 cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148325

Files:
  llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp


Index: llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
===================================================================
--- llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+++ llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
@@ -122,9 +122,6 @@
     // some may just be failing due to bugs in this testcase.
     if (Triple.startswith("armv7") || Triple.startswith("armv8l"))
       return false;
-    llvm::Triple T(Triple);
-    if (T.isOSAIX() && T.isPPC64())
-      return false;
     return true;
   }
 
@@ -425,7 +422,11 @@
   ASSERT_EQ(ExpectedAddr, OutAddr);
 }
 
+#if defined(_AIX)
+TEST_F(OrcCAPITestBase, DISABLED_ResourceTrackerDefinitionLifetime) {
+#else
 TEST_F(OrcCAPITestBase, ResourceTrackerDefinitionLifetime) {
+#endif
   // This test case ensures that all symbols loaded into a JITDylib with a
   // ResourceTracker attached are cleared from the JITDylib once the RT is
   // removed.
@@ -450,7 +451,11 @@
   LLVMOrcReleaseResourceTracker(RT);
 }
 
+#if defined(_AIX)
+TEST_F(OrcCAPITestBase, DISABLED_ResourceTrackerTransfer) {
+#else
 TEST_F(OrcCAPITestBase, ResourceTrackerTransfer) {
+#endif
   LLVMOrcResourceTrackerRef DefaultRT =
       LLVMOrcJITDylibGetDefaultResourceTracker(MainDylib);
   LLVMOrcResourceTrackerRef RT2 =
@@ -469,7 +474,11 @@
   LLVMOrcReleaseResourceTracker(RT2);
 }
 
+#if defined(_AIX)
+TEST_F(OrcCAPITestBase, DISABLED_AddObjectBuffer) {
+#else
 TEST_F(OrcCAPITestBase, AddObjectBuffer) {
+#endif
   LLVMOrcObjectLayerRef ObjLinkingLayer = LLVMOrcLLJITGetObjLinkingLayer(Jit);
   LLVMMemoryBufferRef ObjBuffer = createTestObject(SumExample, "sum.ll");
 
@@ -485,7 +494,11 @@
   ASSERT_TRUE(!!SumAddr);
 }
 
+#if defined(_AIX)
+TEST_F(OrcCAPITestBase, DISABLED_ExecutionTest) {
+#else
 TEST_F(OrcCAPITestBase, ExecutionTest) {
+#endif
   using SumFunctionType = int32_t (*)(int32_t, int32_t);
 
   // This test performs OrcJIT compilation of a simple sum module


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148325.513529.patch
Type: text/x-patch
Size: 1924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/cd215a42/attachment.bin>


More information about the llvm-commits mailing list