Avoid finalizeBundles infinite looping.

llvm-svn: 152089
This commit is contained in:
Evan Cheng 2012-03-06 02:00:52 +00:00
parent 6a1edd70cf
commit 217a704acc
1 changed files with 2 additions and 0 deletions

View File

@ -229,6 +229,8 @@ bool llvm::finalizeBundles(MachineFunction &MF) {
"First instr cannot be inside bundle before finalization!");
MachineBasicBlock::instr_iterator MIE = MBB.instr_end();
if (MII == MIE)
continue;
for (++MII; MII != MIE; ) {
if (!MII->isInsideBundle())
++MII;