[llvm] 2ae2b4e - [ConstantHoisting][test] Adjust lit test to hopefully work on windows (2nd attempt)

Bjorn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 06:15:30 PDT 2023


Author: Bjorn Pettersson
Date: 2023-08-14T15:15:18+02:00
New Revision: 2ae2b4ec1a52aa61728bff379d1790f526c76fe1

URL: https://github.com/llvm/llvm-project/commit/2ae2b4ec1a52aa61728bff379d1790f526c76fe1
DIFF: https://github.com/llvm/llvm-project/commit/2ae2b4ec1a52aa61728bff379d1790f526c76fe1.diff

LOG: [ConstantHoisting][test] Adjust lit test to hopefully work on windows (2nd attempt)

Problem seem to be that on windows it says
  "Assertion failed: ...."
while one linux we get
  "Assertion ... failed."

Anyway, this fixup also limits the test case to x86_64-linux to
avoid buildbot failures due to such problems.

Added: 
    

Modified: 
    llvm/test/Transforms/ConstantHoisting/X86/pr52689-not-all-uses-rebased.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/ConstantHoisting/X86/pr52689-not-all-uses-rebased.ll b/llvm/test/Transforms/ConstantHoisting/X86/pr52689-not-all-uses-rebased.ll
index 7e1d1e0ab96ef3..2941583594656d 100644
--- a/llvm/test/Transforms/ConstantHoisting/X86/pr52689-not-all-uses-rebased.ll
+++ b/llvm/test/Transforms/ConstantHoisting/X86/pr52689-not-all-uses-rebased.ll
@@ -2,6 +2,10 @@
 
 ; REQUIRES: asserts
 
+; Matching assertion strings is not easy as they might 
diff er on 
diff erent
+; platforms. So limit this to x86_64-linux.
+; REQUIRES: x86_64-linux
+
 ; This is a reproducer for https://github.com/llvm/llvm-project/issues/52689
 ;
 ; opt: ../lib/Transforms/Scalar/ConstantHoisting.cpp:919: bool llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable *): Assertion `UsesNum == (ReBasesNum + NotRebasedNum) && "Not all uses are rebased"' failed.
@@ -9,8 +13,6 @@
 ; CHECK: Assertion
 ; CHECK-SAME: UsesNum == (ReBasesNum + NotRebasedNum)
 ; CHECK-SAME: Not all uses are rebased
-; CHECK-SAME: failed.
-
 
 @g_77 = external global [5 x i32]
 


        


More information about the llvm-commits mailing list