[llvm] [VPlan] Move IV predicate handling to VPlan. (PR #192876)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 10:43:52 PDT 2026
================
@@ -15597,14 +15598,20 @@ bool PredicatedScalarEvolution::hasNoOverflow(
return Flags == SCEVWrapPredicate::IncrementAnyWrap;
}
-const SCEVAddRecExpr *PredicatedScalarEvolution::getAsAddRec(Value *V) {
+const SCEVAddRecExpr *PredicatedScalarEvolution::getAsAddRec(
+ Value *V, SmallVectorImpl<const SCEVPredicate *> *ExtraPreds) {
const SCEV *Expr = this->getSCEV(V);
SmallVector<const SCEVPredicate *, 4> NewPreds;
auto *New = SE.convertSCEVToAddRecWithPredicates(Expr, &L, NewPreds);
if (!New)
return nullptr;
+ if (ExtraPreds) {
+ ExtraPreds->append(NewPreds);
+ return New;
+ }
----------------
fhahn wrote:
@nikic is already included on the review. I think if anything it brings the new helper more in-line with the other related code
https://github.com/llvm/llvm-project/pull/192876
More information about the llvm-commits
mailing list