[llvm] [DA] Overflow check in WeakCrossing Delta calculation (PR #185046)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 06:54:30 PDT 2026
================
@@ -1387,7 +1387,10 @@ bool DependenceInfo::weakCrossingSIVtest(const SCEVAddRecExpr *Src,
++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 == nullptr)
+ return false;
----------------
Meinersbur wrote:
```suggestion
if (!Delta)
return false;
```
[nit] consistent style with e.g. `if (!ConstCoeff)` below
https://github.com/llvm/llvm-project/pull/185046
More information about the llvm-commits
mailing list