[llvm] [SCEV] Updates for getUDivExactExpr() to improve handling of MulExpr numerators/denominators (PR #195704)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 08:30:39 PDT 2026
================
@@ -3745,6 +3745,39 @@ const SCEV *ScalarEvolution::getUDivExactExpr(SCEVUse LHS, SCEVUse RHS) {
// just deal with u/exact (multiply, constant). See SCEVDivision towards the
// end of this file for inspiration.
+ if (LHS == RHS)
+ return getConstant(LHS->getType(), 1);
----------------
bababuck wrote:
Thanks, will move the entirety of the changes in this MR to `getUDivExpr` once that is merged to `main` and I can rebase on top of it.
https://github.com/llvm/llvm-project/pull/195704
More information about the llvm-commits
mailing list