Skipping over debugvalue instructions to determine whether the split spot is in a...
authorEvan Cheng <evan.cheng@apple.com>
Mon, 21 Feb 2011 23:40:47 +0000 (23:40 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 21 Feb 2011 23:40:47 +0000 (23:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126159 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/Thumb2InstrInfo.cpp

index 2f67257f8fa1100892a1e95b6e7a9f9d4594d54c..836c1baffd40852033edfe039036813b5485bc9a 100644 (file)
@@ -95,6 +95,9 @@ Thumb2InstrInfo::ReplaceTailWithBranchTo(MachineBasicBlock::iterator Tail,
 bool
 Thumb2InstrInfo::isLegalToSplitMBBAt(MachineBasicBlock &MBB,
                                      MachineBasicBlock::iterator MBBI) const {
+  while (MBBI->isDebugValue())
+    ++MBBI;
+
   unsigned PredReg = 0;
   return llvm::getITInstrPredicate(MBBI, PredReg) == ARMCC::AL;
 }