[llvm] [DA] factor out repetitive code in GCD test (NFCI) (PR #189461)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 05:59:26 PDT 2026


================
@@ -2178,6 +2212,25 @@ bool DependenceInfo::accumulateCoefficientsGCD(const SCEV *Expr,
   return accumulateCoefficientsGCD(Start, CurLoop, CurLoopCoeff, RunningGCD);
 }
 
+/// Compute \p RunningGCD and return the start value of the innermost
+/// \p SCEVAddRecExpr. In order to calculate the return value we do not
+/// return immediately if it is proved that \p RunningGCD = 1.
+const SCEV *analyzeCoefficientsForGCD(const SCEV *Coefficients,
----------------
kasuga-fj wrote:

I'll take care of it myself...

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


More information about the llvm-commits mailing list