[llvm] [DA] Require `nsw` for AddRecs involved in GCD test (PR #186892)
Ehsan Amiri via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 10:46:10 PDT 2026
================
@@ -2099,6 +2099,8 @@ static const SCEV *analyzeCoefficientsForGCD(const SCEV *Coefficients,
while (const SCEVAddRecExpr *AddRec =
dyn_cast<SCEVAddRecExpr>(Coefficients)) {
const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
+ if (!AddRec->hasNoSignedWrap())
+ return nullptr;
----------------
amehsan wrote:
going to move this code one above the previous line
https://github.com/llvm/llvm-project/pull/186892
More information about the llvm-commits
mailing list