[llvm] [VPlan] Model first memory runtime checks as VPlan recipes. (PR #221483)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 02:56:25 PDT 2026


================
@@ -6864,8 +6879,37 @@ void LoopVectorizationPlanner::addReductionResultComputation(
   RUN_VPLAN_PASS(VPlanTransforms::clearReductionWrapFlags, *Plan);
 }
 
+/// Return true if \p CG's bounds can be expanded in the check block.
+/// VPSCEVExpander only expands AddRecs of loops enclosing the plan's scope.
+static bool boundsAreVPlanExpandable(const RuntimeCheckingPtrGroup &CG,
+                                     ScalarEvolution &SE) {
+  return !SE.containsAddRecurrence(CG.Low) &&
+         !SE.containsAddRecurrence(CG.High);
+}
----------------
fhahn wrote:

done thanks

https://github.com/llvm/llvm-project/pull/221483


More information about the llvm-commits mailing list