From db9a91e32466b7f99fdf7f198d8b736f216bb34d Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 14 Dec 2015 22:36:57 +0000 Subject: 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 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'llvm/lib/Transforms') 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 [ %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(V) || cast(V)->getParent() != BB) - return V; - PHINode *PHI = nullptr; BasicBlock *Succ = BB->getSingleSuccessor(); -- cgit v1.2.3