diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 44aa5082b1c..f8b2d78bbef 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -2922,8 +2922,7 @@ ScalarEvolution::getUnsignedRange(const SCEV *S) { if (const SCEVConstant *C = dyn_cast(AddRec->getStart())) if (!C->isZero()) ConservativeResult = - ConstantRange(C->getValue()->getValue(), - APInt(getTypeSizeInBits(C->getType()), 0)); + ConstantRange(C->getValue()->getValue(), APInt(BitWidth, 0)); // TODO: non-affine addrec if (AddRec->isAffine()) {