summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-12-14 22:36:57 +0000
committerReid Kleckner <rnk@google.com>2015-12-14 22:36:57 +0000
commitdb9a91e32466b7f99fdf7f198d8b736f216bb34d (patch)
treeda5b39f3a1df17f0c2ab681f52c443ee6515a67d /llvm/lib/Transforms
parent08ce75b6c653c8af6b4c43b91ee6aa61b61d1222 (diff)
downloadbcm5719-llvm-db9a91e32466b7f99fdf7f198d8b736f216bb34d.tar.gz
bcm5719-llvm-db9a91e32466b7f99fdf7f198d8b736f216bb34d.zip
Revert "Don't create unnecessary PHIs"
This reverts commit r255489. It causes test failures in Chromium and does not appear to respect the AlternativeV parameter. llvm-svn: 255562
Diffstat (limited to 'llvm/lib/Transforms')
-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