aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 0b8dcdc..8af17e6 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -1499,7 +1499,7 @@ void PEI::replaceFrameIndicesBackward(MachineBasicBlock *BB,
// Step backwards to get the liveness state at (immedately after) MI.
if (LocalRS)
- LocalRS->backward(MI);
+ LocalRS->backward(I);
bool RemovedMI = false;
for (const auto &[Idx, Op] : enumerate(MI.operands())) {
@@ -1515,11 +1515,6 @@ void PEI::replaceFrameIndicesBackward(MachineBasicBlock *BB,
break;
}
- // Refresh the scavenger's internal iterator in case MI was removed or more
- // instructions were inserted after it.
- if (LocalRS)
- LocalRS->skipTo(std::prev(I));
-
if (!RemovedMI)
--I;
}