diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index c1735f7..1115b0b 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1090,18 +1090,6 @@ bool llvm::TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB, } } - // We cannot fold the block if it's a branch to an already present callbr - // successor because that creates duplicate successors. - for (BasicBlock *PredBB : predecessors(BB)) { - if (auto *CBI = dyn_cast<CallBrInst>(PredBB->getTerminator())) { - if (Succ == CBI->getDefaultDest()) - return false; - for (unsigned i = 0, e = CBI->getNumIndirectDests(); i != e; ++i) - if (Succ == CBI->getIndirectDest(i)) - return false; - } - } - LLVM_DEBUG(dbgs() << "Killing Trivial BB: \n" << *BB); SmallVector<DominatorTree::UpdateType, 32> Updates; |