diff options
author | Petar Jovanovic <petar.jovanovic@mips.com> | 2018-01-08 18:21:15 +0000 |
---|---|---|
committer | Petar Jovanovic <petar.jovanovic@mips.com> | 2018-01-08 18:21:15 +0000 |
commit | e9500ba745b76adf0c35d31b3d4fb21af151383c (patch) | |
tree | 8ce1388ced8d9b66fd6cd78910d6a2b2b794843d /llvm/lib/CodeGen/LiveDebugValues.cpp | |
parent | b9efca3257823b9fff3dff30848f9c5e8856c5bc (diff) | |
download | bcm5719-llvm-e9500ba745b76adf0c35d31b3d4fb21af151383c.tar.gz bcm5719-llvm-e9500ba745b76adf0c35d31b3d4fb21af151383c.zip |
[LiveDebugValues] Change condition for block termination recognition
The last iterator of MBB should be recognized as MBB.end() not as
MBB.instr_end() which could return bundled instruction that is not iterable
with basic iterator.
Patch by Nikola Prica.
Differential Revision: https://reviews.llvm.org/D41626
llvm-svn: 322015
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugValues.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp index 19ec281079c..abd863f20b9 100644 --- a/llvm/lib/CodeGen/LiveDebugValues.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues.cpp @@ -497,7 +497,7 @@ bool LiveDebugValues::transferTerminatorInst(MachineInstr &MI, const VarLocMap &VarLocIDs) { bool Changed = false; const MachineBasicBlock *CurMBB = MI.getParent(); - if (!(MI.isTerminator() || (&MI == &CurMBB->instr_back()))) + if (!(MI.isTerminator() || (&MI == &CurMBB->back()))) return false; if (OpenRanges.empty()) |