summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-05-18 01:28:58 +0000
committerDale Johannesen <dalej@apple.com>2007-05-18 01:28:58 +0000
commitf8956178af08b08562ad38cedef6bc244dc86c1b (patch)
treebad91477e98f04cdc8065f6dc808fd5084d7e36a /llvm/lib/CodeGen/BranchFolding.cpp
parentea623560f8252cbe63eeac4a38abfd1e774eee42 (diff)
downloadbcm5719-llvm-f8956178af08b08562ad38cedef6bc244dc86c1b.tar.gz
bcm5719-llvm-f8956178af08b08562ad38cedef6bc244dc86c1b.zip
Remove some unneeded branches. (spotted by Evan, thanks)
llvm-svn: 37198
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp1
1 files changed, 1 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud