Handle dbg_value instructions (i.e., skip them) when generating IT blocks.

rdar://7797940

llvm-svn: 105557
This commit is contained in:
Jim Grosbach 2010-06-07 21:48:47 +00:00
parent 4ecf2cc5ea
commit 723d242a95
1 changed files with 4 additions and 3 deletions

View File

@ -71,8 +71,10 @@ bool Thumb2ITBlockPass::InsertITBlocks(MachineBasicBlock &MBB) {
unsigned Mask = 0, Pos = 3;
// Branches, including tricky ones like LDM_RET, need to end an IT
// block so check the instruction we just put in the block.
while (MBBI != E && Pos &&
(!MI->getDesc().isBranch() && !MI->getDesc().isReturn())) {
for (; MBBI != E && Pos &&
(!MI->getDesc().isBranch() && !MI->getDesc().isReturn()) ; ++MBBI) {
if (MBBI->isDebugValue())
continue;
MachineInstr *NMI = &*MBBI;
MI = NMI;
DebugLoc ndl = NMI->getDebugLoc();
@ -83,7 +85,6 @@ bool Thumb2ITBlockPass::InsertITBlocks(MachineBasicBlock &MBB) {
else
break;
--Pos;
++MBBI;
}
Mask |= (1 << Pos);
// Tag along (firstcond[0] << 4) with the mask.