aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-07 21:48:47 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-07 21:48:47 +0000
commit1f4a831994cc33a23be2716f312e0c568791d48b (patch)
tree8668e2b839c0cb1a61ff1dd66e5399576775f44c /lib
parentb707a4216bd16b7a7ef16d6d34bfa6478ef822e7 (diff)
downloadexternal_llvm-1f4a831994cc33a23be2716f312e0c568791d48b.zip
external_llvm-1f4a831994cc33a23be2716f312e0c568791d48b.tar.gz
external_llvm-1f4a831994cc33a23be2716f312e0c568791d48b.tar.bz2
Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
rdar://7797940 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/Thumb2ITBlockPass.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/ARM/Thumb2ITBlockPass.cpp b/lib/Target/ARM/Thumb2ITBlockPass.cpp
index f36d4ef..065f657 100644
--- a/lib/Target/ARM/Thumb2ITBlockPass.cpp
+++ b/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.