diff options
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 1a598e8ea9..85ff1c182d 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1451,10 +1451,10 @@ bool LiveIntervals::differingRegisterClasses(unsigned RegA, /// reg between indexes Start and End. bool LiveIntervals::hasRegisterUse(unsigned Reg, unsigned Start, unsigned End) { - for (unsigned Index = Start+InstrSlots::NUM; Index != End; + for (unsigned Index = Start+InstrSlots::NUM; Index < End; Index += InstrSlots::NUM) { // Skip deleted instructions - while (Index != End && !getInstructionFromIndex(Index)) + while (Index < End && !getInstructionFromIndex(Index)) Index += InstrSlots::NUM; if (Index >= End) break; |