commit | 8250d7385a16e8d586f608b3040eb6738bbf8e55 | [log] [tgz] |
---|---|---|
author | Evan Cheng <evan.cheng@apple.com> | Tue Mar 06 02:00:52 2012 +0000 |
committer | Evan Cheng <evan.cheng@apple.com> | Tue Mar 06 02:00:52 2012 +0000 |
tree | 7cb5904d88a6b745f65ce273a66296155177a435 | |
parent | afd3d56b9dc791d37120922318293a021bd35598 [diff] [blame] |
Avoid finalizeBundles infinite looping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152089 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/MachineInstrBundle.cpp b/lib/CodeGen/MachineInstrBundle.cpp index d1f2df9..73489a7 100644 --- a/lib/CodeGen/MachineInstrBundle.cpp +++ b/lib/CodeGen/MachineInstrBundle.cpp
@@ -229,6 +229,8 @@ "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;