Avoid finalizeBundles infinite looping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2012-03-06 02:00:52 +00:00
parent afd3d56b9d
commit 8250d7385a

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;