aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 8a37a1e..6272adc 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -961,9 +961,10 @@ MachineBasicBlock *MachineBasicBlock::splitAt(MachineInstr &MI,
if (UpdateLiveIns) {
// Make sure we add any physregs we define in the block as liveins to the
// new block.
+ MachineBasicBlock::iterator Prev(&MI);
LiveRegs.init(*MF->getSubtarget().getRegisterInfo());
LiveRegs.addLiveOuts(*this);
- for (auto I = rbegin(), E = SplitPoint.getReverse(); I != E; ++I)
+ for (auto I = rbegin(), E = Prev.getReverse(); I != E; ++I)
LiveRegs.stepBackward(*I);
}