diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 9afa0bd02b5..9bc3aa93539 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1430,7 +1430,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl &Ops, return Mul; Ops[i] = Mul; Ops.erase(Ops.begin()+i+1, Ops.begin()+i+Count); - i -= Count - 1; e -= Count - 1; + --i; e -= Count - 1; FoundMatch = true; } if (FoundMatch)