diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-03-06 02:00:52 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-03-06 02:00:52 +0000 |
commit | 8250d7385a16e8d586f608b3040eb6738bbf8e55 (patch) | |
tree | 7cb5904d88a6b745f65ce273a66296155177a435 | |
parent | afd3d56b9dc791d37120922318293a021bd35598 (diff) |
Avoid finalizeBundles infinite looping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152089 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineInstrBundle.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstrBundle.cpp b/lib/CodeGen/MachineInstrBundle.cpp index d1f2df94b5..73489a7160 100644 --- a/lib/CodeGen/MachineInstrBundle.cpp +++ b/lib/CodeGen/MachineInstrBundle.cpp @@ -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; |