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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Berlin 2017-05-31 01:47:24 +00:00
parent d65b57cf6b
commit 9c46696cd4

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.