aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstrBundle.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-03-06 02:00:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-03-06 02:00:52 +0000
commit217a704accf1440cb745f075d8aaff44dc4744ee (patch)
tree0f92ab2732a7bf66bf07e2157749c398c387d382 /llvm/lib/CodeGen/MachineInstrBundle.cpp
parent6a1edd70cf55d8fec47c9aba01fbab38ce56c5f3 (diff)
downloadllvm-217a704accf1440cb745f075d8aaff44dc4744ee.zip
llvm-217a704accf1440cb745f075d8aaff44dc4744ee.tar.gz
llvm-217a704accf1440cb745f075d8aaff44dc4744ee.tar.bz2
Avoid finalizeBundles infinite looping.
llvm-svn: 152089
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstrBundle.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstrBundle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstrBundle.cpp b/llvm/lib/CodeGen/MachineInstrBundle.cpp
index d1f2df9..73489a7 100644
--- a/llvm/lib/CodeGen/MachineInstrBundle.cpp
+++ b/llvm/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;