summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-21 02:27:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-21 02:27:39 +0000
commite563c7eb279c48e558d76f600233305e889d372f (patch)
tree880ee3013b2710fa39b863bcf75563810b37aced /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parentde037a821a262e4adc968c52b9adda73496511ea (diff)
downloadbcm5719-llvm-e563c7eb279c48e558d76f600233305e889d372f.tar.gz
bcm5719-llvm-e563c7eb279c48e558d76f600233305e889d372f.zip
Out of bound reference.
llvm-svn: 34461
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 1a598e8ea91..85ff1c182dc 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud