diff options
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16InstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PIC16/PIC16InstrInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16InstrInfo.cpp b/llvm/lib/Target/PIC16/PIC16InstrInfo.cpp index 2fb405e947f..da16e8383c3 100644 --- a/llvm/lib/Target/PIC16/PIC16InstrInfo.cpp +++ b/llvm/lib/Target/PIC16/PIC16InstrInfo.cpp @@ -226,6 +226,11 @@ bool PIC16InstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, // Get the terminator instruction. --I; + while (I->isDebugValue()) { + if (I == MBB.begin()) + return true; + --I; + } // Handle unconditional branches. If the unconditional branch's target is // successor basic block then remove the unconditional branch. if (I->getOpcode() == PIC16::br_uncond && AllowModify) { |