[llvm-branch-commits] [llvm] 5fe0798 - [Utils] LocalTest: fix SimplifyCFGWithNullAC test to work with `-simplifycfg-require-and-preserve-domtree=1`
Roman Lebedev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 1 14:06:23 PST 2021
Author: Roman Lebedev
Date: 2021-01-02T01:01:18+03:00
New Revision: 5fe0798dee6e2093aad7be11956c2bcaaf61dc8c
URL: https://github.com/llvm/llvm-project/commit/5fe0798dee6e2093aad7be11956c2bcaaf61dc8c
DIFF: https://github.com/llvm/llvm-project/commit/5fe0798dee6e2093aad7be11956c2bcaaf61dc8c.diff
LOG: [Utils] LocalTest: fix SimplifyCFGWithNullAC test to work with `-simplifycfg-require-and-preserve-domtree=1`
Added:
Modified:
llvm/unittests/Transforms/Utils/LocalTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Transforms/Utils/LocalTest.cpp b/llvm/unittests/Transforms/Utils/LocalTest.cpp
index ece83950955a..a57a18ce0be1 100644
--- a/llvm/unittests/Transforms/Utils/LocalTest.cpp
+++ b/llvm/unittests/Transforms/Utils/LocalTest.cpp
@@ -998,8 +998,12 @@ TEST(Local, SimplifyCFGWithNullAC) {
}
ASSERT_TRUE(TestBB);
+ DominatorTree DT(F);
+ DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager);
+
// %test.bb is expected to be simplified by FoldCondBranchOnPHI.
- EXPECT_TRUE(simplifyCFG(TestBB, TTI, /*DTU=*/nullptr, Options));
+ EXPECT_TRUE(simplifyCFG(TestBB, TTI,
+ RequireAndPreserveDomTree ? &DTU : nullptr, Options));
}
TEST(Local, CanReplaceOperandWithVariable) {
More information about the llvm-branch-commits
mailing list