Out of bound reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34461 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-02-21 02:27:39 +00:00
parent 957840b3e1
commit 788fb1c103

View File

@ -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;