diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index 3d985ab8852..077f67bcc2f 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -143,7 +143,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) { // IF the step is by one, just return the inserted IV. if (ConstantInt *CI = dyn_cast(F)) - if (CI->getZExtValue() == 1) + if (CI->getValue() == 1) return I; // If the insert point is directly inside of the loop, emit the multiply at