[llvm] [SCEV] Preserve divisibility info when creating UMax/SMax expressions. (PR #160012)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 8 13:39:21 PDT 2025
================
@@ -15746,6 +15746,11 @@ void ScalarEvolution::LoopGuards::collectFromBlock(
// DividesBy.
std::function<bool(const SCEV *, const SCEV *&)> HasDivisibiltyInfo =
[&](const SCEV *Expr, const SCEV *&DividesBy) {
+ const APInt &Multiple = SE.getConstantMultiple(Expr);
+ if (!Multiple.isOne()) {
+ DividesBy = SE.getConstant(Multiple);
+ return true;
+ }
----------------
fhahn wrote:
Yeah, removed, thanks
https://github.com/llvm/llvm-project/pull/160012
More information about the llvm-commits
mailing list