From 62bc8a44868bd86e96bdbd2f0d66dda690cc66ad Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Tue, 1 Jul 2008 21:50:14 +0000 Subject: [PATCH] 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 --- lib/CodeGen/BranchFolding.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(); -- 2.34.1