diff options
author | Stefan Maksimovic <stefan.maksimovic@mips.com> | 2018-02-09 14:03:26 +0000 |
---|---|---|
committer | Stefan Maksimovic <stefan.maksimovic@mips.com> | 2018-02-09 14:03:26 +0000 |
commit | 991af7a5589347a99c42307a9cef89cb4009340f (patch) | |
tree | d9b8b17fc9a6d0032ab22bf3939eaa848a69634f /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | dc66ae78c68f7a3094d4667bc103a216d2bd52ac (diff) | |
download | llvm-991af7a5589347a99c42307a9cef89cb4009340f.zip llvm-991af7a5589347a99c42307a9cef89cb4009340f.tar.gz llvm-991af7a5589347a99c42307a9cef89cb4009340f.tar.bz2 |
[DebugInfo] Don't insert DEBUG_VALUE after terminators
r314974 introduced insertion of DEBUG_VALUEs after
each redefinition of debug value register in the slot index range.
In case the instruction redefining the debug value register
was a terminator, machine verifier would complain since it
enforces the rule of no non-terminator instructions
following the first terminator.
Differential Revision: https://reviews.llvm.org/D42801
llvm-svn: 324734
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 75e3d35..09168b6 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -1097,7 +1097,7 @@ findNextInsertLocation(MachineBasicBlock *MBB, unsigned Reg = LocMO.getReg(); // Find the next instruction in the MBB that define the register Reg. - while (I != MBB->end()) { + while (I != MBB->end() && !I->isTerminator()) { if (!LIS.isNotInMIMap(*I) && SlotIndex::isEarlierEqualInstr(StopIdx, LIS.getInstructionIndex(*I))) break; |