[llvm] [DA] Fix signed overflow bugs in weak-crossing SIV test (PR #188100)

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 14:05:12 PDT 2026


================
@@ -1388,7 +1382,10 @@ bool DependenceInfo::weakCrossingSIVtest(const SCEV *Coeff,
   ++WeakCrossingSIVapplications;
   assert(0 < Level && Level <= CommonLevels && "Level out of range");
   Level--;
-  const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
+  const SCEV *Delta = minusSCEVNoSignedOverflow(DstConst, SrcConst, *SE);
+  if (!Delta)
+    return false;
+
----------------
amehsan wrote:

> so we do not work on the same thing

To be clear, my concern is about the case of having two patches that implement the same thing.

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


More information about the llvm-commits mailing list