summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2017-05-31 01:47:24 +0000
committerDaniel Berlin <dberlin@dberlin.org>2017-05-31 01:47:24 +0000
commit71ff663e1b98d3c2948096c60ebc9ee2f01550c1 (patch)
tree8eb65b32a34502c61ee803231561edc091d0ad93 /llvm/lib
parentb745804bb197fef660d5130c18e6e4c99049bb9d (diff)
downloadbcm5719-llvm-71ff663e1b98d3c2948096c60ebc9ee2f01550c1.tar.gz
bcm5719-llvm-71ff663e1b98d3c2948096c60ebc9ee2f01550c1.zip
InstructionSimplify: Remove now-redundant reachability tests, as dominates() already does them
llvm-svn: 304270
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 122442bafb1..66ac847455c 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -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.
OpenPOWER on IntegriCloud