[llvm] [VPlan] Move initial skeleton construction earlier (NFC). (PR #150848)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 04:53:50 PDT 2025
================
@@ -488,12 +488,46 @@ void VPlanTransforms::prepareForVectorization(
addCanonicalIVRecipes(Plan, HeaderVPBB, LatchVPBB, InductionTy, IVDL);
- [[maybe_unused]] bool HandledUncountableEarlyExit = false;
+ // Create SCEV and VPValue for the trip count.
+ // We use the symbolic max backedge-taken-count, which works also when
+ // vectorizing loops with uncountable early exits.
+ const SCEV *BackedgeTakenCountSCEV = PSE.getSymbolicMaxBackedgeTakenCount();
+ assert(!isa<SCEVCouldNotCompute>(BackedgeTakenCountSCEV) &&
+ "Invalid loop count");
----------------
fhahn wrote:
Updated. Yes, we had the same assert before. A computable max backedge taken count is a requirement checked by Legal
https://github.com/llvm/llvm-project/pull/150848
More information about the llvm-commits
mailing list