diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-22 19:37:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-22 19:37:31 +0000 |
commit | d0d1c8f830afbdbb708096be27d35101e13414a6 (patch) | |
tree | 413cf513f98a80ac5f7f02ace9528badafac012e /lib/CodeGen/RegAllocLocal.cpp | |
parent | 890f92328d5478e050d2eba8f4de24737a04a812 (diff) |
Another bug fix for empty MBB's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLocal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 23063461d7..38e0073360 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/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) |