[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 db753269d9
commit 5fe0798dee
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 5 additions and 1 deletions

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