llvm-project
c3e7f989 - [DA] Fix overflow of calculation in weakCrossingSIVtest (#188450)

Commit
31 days ago
[DA] Fix overflow of calculation in weakCrossingSIVtest (#188450) This patch fixes a correctness issue where integer overflow in the upper bound calculation of weakCrossingSIVtest caused the pass to incorrectly prove independence. The previous logic used `SCEV::getMulExpr` to calculate `2 * ConstCoeff * UpperBound` and compared it to `Delta` using `isKnownPredicate`. In the presence of overflow, this could yield unsafe results. This change replaces the SCEV arithmetic with `ConstantRange` to work around calculation overflows, ensures we conservatively assume a dependence if the bounds cannot be proven safe. --------- Signed-off-by: Ruoyu Qiu <cabbaken@outlook.com>
Author
Parents
Loading