Skip to content

Commit c826894

Browse files
committed
[CodeGen][X86] LiveRangeShrink: fix increment after end
This fixes the infinite loop discovered in #114195. Since we skip debug instructions at the start of the loop we do not need to skip them again at the end of the loop.
1 parent 9f79615 commit c826894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/LiveRangeShrink.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ bool LiveRangeShrink::runOnMachineFunction(MachineFunction &MF) {
246246
if (MI.getOperand(0).isReg())
247247
for (; EndIter != MBB.end() && EndIter->isDebugValue() &&
248248
EndIter->hasDebugOperandForReg(MI.getOperand(0).getReg());
249-
++EndIter, ++Next)
249+
++EndIter)
250250
IOM[&*EndIter] = NewOrder;
251251
MBB.splice(I, &MBB, MI.getIterator(), EndIter);
252252
}

0 commit comments

Comments
 (0)