From: Dale Johannesen Date: Tue, 1 Jul 2008 21:50:14 +0000 (+0000) Subject: Fix longstanding thinko: don't exclude X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=62bc8a44868bd86e96bdbd2f0d66dda690cc66ad;p=oota-llvm.git Fix longstanding thinko: don't exclude predessors of exit blocks from tail merging consideration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52985 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index 6825bfb1033..87a77bb14f2 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -697,8 +697,7 @@ bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { // transformations.) for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { - if (!I->succ_empty() && I->pred_size() >= 2 && - I->pred_size() < TailMergeThreshold) { + if (I->pred_size() >= 2 && I->pred_size() < TailMergeThreshold) { MachineBasicBlock *IBB = I; MachineBasicBlock *PredBB = prior(I); MergePotentials.clear();