aboutsummaryrefslogtreecommitdiff
path: root/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
commit788fb1c103f1d1b8ec7e7f96df01fbfc1a5005d9 (patch)
tree2a35f0d310761c58397ab001302e068e5b24ea0c /lib/CodeGen/LiveIntervalAnalysis.cpp
parent957840b3e14938fc86c306fda99ac039d1777a4c (diff)
Out of bound reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp4
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;