InstructionSimplify: Remove now-redundant reachability tests, as dominates() already does them

llvm-svn: 304270
This commit is contained in:
Daniel Berlin 2017-05-31 01:47:24 +00:00
parent b745804bb1
commit 71ff663e1b
1 changed files with 1 additions and 6 deletions

View File

@ -103,13 +103,8 @@ static bool ValueDominatesPHI(Value *V, PHINode *P, const DominatorTree *DT) {
return false;
// If we have a DominatorTree then do a precise test.
if (DT) {
if (!DT->isReachableFromEntry(P->getParent()))
return true;
if (!DT->isReachableFromEntry(I->getParent()))
return false;
if (DT)
return DT->dominates(I, P);
}
// Otherwise, if the instruction is in the entry block and is not an invoke,
// then it obviously dominates all phi nodes.