[llvm] [LAA] Clean up APInt-overflow related code (NFC) (PR #140048)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu May 15 13:41:53 PDT 2025


================
@@ -2127,14 +2129,15 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
     return Dependence::Forward;
   }
 
-  int64_t MinDistance = SE.getSignedRangeMin(Dist).getSExtValue();
+  std::optional<int64_t> MinDistance =
+      SE.getSignedRangeMin(Dist).trySExtValue();
----------------
fhahn wrote:

Same reasoning as for ConstDist should also apply, could retain `getSExtValue()`?

https://github.com/llvm/llvm-project/pull/140048


More information about the llvm-commits mailing list