1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[Utils] LocalTest: fix SimplifyCFGWithNullAC test to work with -simplifycfg-require-and-preserve-domtree=1

This commit is contained in:
Roman Lebedev 2021-01-02 00:20:50 +03:00
parent 33acace6bb
commit 3bf36d7eef

View File

@ -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) {