[SCEV] Add and use SCEVConstant::getAPInt; NFCI
[oota-llvm.git] / lib / Transforms / Scalar / LoopLoadElimination.cpp
index c5bce7ae29da45940444c5df2fa80dde7ae9ecb9..1064d088514d5eda5555d89d5a86916132bd20d1 100644 (file)
@@ -82,7 +82,7 @@ struct StoreToLoadForwardingCandidate {
     // dependence wouldn't be valid if these weren't monotonic accesses.
     auto *Dist = cast<SCEVConstant>(
         PSE.getSE()->getMinusSCEV(StorePtrSCEV, LoadPtrSCEV));
-    const APInt &Val = Dist->getValue()->getValue();
+    const APInt &Val = Dist->getAPInt();
     return Val.abs() == TypeByteSize;
   }