From f8956178af08b08562ad38cedef6bc244dc86c1b Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Fri, 18 May 2007 01:28:58 +0000 Subject: Remove some unneeded branches. (spotted by Evan, thanks) llvm-svn: 37198 --- llvm/lib/CodeGen/BranchFolding.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 7b4aaae4824..d8ec3406921 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -595,6 +595,7 @@ bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { // Reinsert an unconditional branch if needed. // The 1 below can be either an original single predecessor, or a result // of removing blocks in TryMergeBlocks. + PredBB = prior(I); // this may have been changed in TryMergeBlocks if (MergePotentials.size()==1 && (MergePotentials.begin())->second != PredBB) FixTail((MergePotentials.begin())->second, I, TII); -- cgit v1.2.3