mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-03 11:08:32 +00:00
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:
parent
d65b57cf6b
commit
9c46696cd4
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user