diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 0f84fe05ef0..4e508988e33 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2283,8 +2283,8 @@ LoopVectorizationCostModel::calculateRegisterUsage() { // Remove all of the instructions that end at this location. InstrList &List = TransposeEnds[i]; - for (unsigned int i=0, e = List.size(); i < e; ++i) - OpenIntervals.erase(List[i]); + for (unsigned int j=0, e = List.size(); j < e; ++j) + OpenIntervals.erase(List[j]); // Count the number of live interals. MaxUsage = std::max(MaxUsage, OpenIntervals.size());