[llvm] [DA] Check for overflow in strong SIV test (PR #166223)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 04:09:23 PST 2025


================
@@ -1686,7 +1695,11 @@ bool DependenceInfo::strongSIVtest(const SCEV *Coeff, const SCEV *SrcConst,
   assert(0 < Level && Level <= CommonLevels && "level out of range");
   Level--;
 
-  const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst);
+  const SCEV *Delta = minusSCEVNoSignedOverflow(SrcConst, DstConst, *SE);
+  if (!Delta) {
+    Result.Consistent = false;
----------------
kasuga-fj wrote:

Does `Consistent` need to be set to false?

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


More information about the llvm-commits mailing list