[llvm] [SCEV] Fold (C * A /u C) -> A, if A is a multiple of C and C a pow-of-2. (PR #156730)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 10:18:49 PDT 2025
================
@@ -3215,6 +3215,15 @@ const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl<const SCEV *> &Ops,
return getZeroExtendExpr(Res, Ops[1]->getType(), Depth + 1);
};
}
+
+ // Try to fold (C * D /u C) -> D, if C is a power-of-2 and D is a multiple
----------------
preames wrote:
> Would you like me to include either generalization here or OK as followup?
Followups are totally fine.
https://github.com/llvm/llvm-project/pull/156730
More information about the llvm-commits
mailing list