[llvm] [SCEV] Improve handling of divisibility information from loop guards. (PR #163021)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 14 14:15:51 PDT 2025
================
@@ -15932,7 +15945,12 @@ void ScalarEvolution::LoopGuards::collectFromBlock(
EnterIfTrue ? Cmp->getPredicate() : Cmp->getInversePredicate();
const auto *LHS = SE.getSCEV(Cmp->getOperand(0));
const auto *RHS = SE.getSCEV(Cmp->getOperand(1));
- CollectCondition(Predicate, LHS, RHS, Guards.RewriteMap);
+ // If LHS is a constant, apply information to the other expression.
----------------
fhahn wrote:
Yep, that currently just preserves the current behavior. I added a TODO
https://github.com/llvm/llvm-project/pull/163021
More information about the llvm-commits
mailing list