summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-22 19:37:31 +0000
committerChris Lattner <sabre@nondot.org>2004-02-22 19:37:31 +0000
commit19aef9e75758f38de90b5917d1315b4f1a7b475a (patch)
tree3aec370cfeb5d45dd15485417f351049ba644f03 /llvm/lib/CodeGen/RegAllocLocal.cpp
parent8358cc573de46e1e8620ad3b1fc5f8f1d12e347a (diff)
downloadbcm5719-llvm-19aef9e75758f38de90b5917d1315b4f1a7b475a.tar.gz
bcm5719-llvm-19aef9e75758f38de90b5917d1315b4f1a7b475a.zip
Another bug fix for empty MBB's
llvm-svn: 11716
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocLocal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp
index 23063461d70..38e00733602 100644
--- a/llvm/lib/CodeGen/RegAllocLocal.cpp
+++ b/llvm/lib/CodeGen/RegAllocLocal.cpp
@@ -653,7 +653,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
const TargetInstrInfo &TII = TM->getInstrInfo();
MI = MBB.end();
while (MI != MBB.begin() && TII.isTerminatorInstr((--MI)->getOpcode()));
- ++MI;
+ if (MI != MBB.end()) ++MI;
// Spill all physical registers holding virtual registers now.
for (unsigned i = 0, e = RegInfo->getNumRegs(); i != e; ++i)
OpenPOWER on IntegriCloud