diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-06-07 21:48:47 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-06-07 21:48:47 +0000 |
commit | 723d242a958840ff8ae7e4c36801eeb9dcf24f9f (patch) | |
tree | ac5db27142d76d74e78f2ca94fccaedf7ec26d4c /llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp | |
parent | 4ecf2cc5eae546861bcf614f4d12c2cd887038a5 (diff) | |
download | bcm5719-llvm-723d242a958840ff8ae7e4c36801eeb9dcf24f9f.tar.gz bcm5719-llvm-723d242a958840ff8ae7e4c36801eeb9dcf24f9f.zip |
Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
rdar://7797940
llvm-svn: 105557
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp index f36d4ef7567..065f657f5d6 100644 --- a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp +++ b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp @@ -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. |