summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 74b7c0602b3..b2b52246a7e 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -2385,11 +2385,6 @@ static Value *ensureValueAvailableInSuccessor(Value *V, BasicBlock *BB,
// If AlternativeV is not nullptr, we care about both incoming values in PHI.
// PHI must be exactly: phi <ty> [ %BB, %V ], [ %OtherBB, %AlternativeV]
// where OtherBB is the single other predecessor of BB's only successor.
-
- // If V is not an instruction defined in BB, just return it.
- if (!isa<Instruction>(V) || cast<Instruction>(V)->getParent() != BB)
- return V;
-
PHINode *PHI = nullptr;
BasicBlock *Succ = BB->getSingleSuccessor();
OpenPOWER on IntegriCloud