[SCEV] Add and use SCEVConstant::getAPInt; NFCI
[oota-llvm.git] / lib / Transforms / Scalar / LoopRerollPass.cpp
index 4ba041b7599b462b618309d8bf5fc03345801497..27c2d8824df06eed3b1c6130baaad46f3458f34a 100644 (file)
@@ -480,7 +480,7 @@ void LoopReroll::collectPossibleIVs(Loop *L,
         continue;
       if (const SCEVConstant *IncSCEV =
           dyn_cast<SCEVConstant>(PHISCEV->getStepRecurrence(*SE))) {
-        const APInt &AInt = IncSCEV->getValue()->getValue().abs();
+        const APInt &AInt = IncSCEV->getAPInt().abs();
         if (IncSCEV->getValue()->isZero() || AInt.uge(MaxInc))
           continue;
         IVToIncMap[&*I] = IncSCEV->getValue()->getSExtValue();