[llvm] [VPlan] Connect (MemRuntime|SCEV)Check blocks as VPlan transform (NFC). (PR #143879)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 02:46:41 PDT 2025


================
@@ -7331,6 +7231,11 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   if (hasBranchWeightMD(*OrigLoop->getLoopLatch()->getTerminator()))
     VPlanTransforms::runPass(VPlanTransforms::addBranchWeightToMiddleTerminator,
                              BestVPlan, BestVF);
+
+  if (!VectorizingEpilogue)
+    addRuntimeChecks(BestVPlan, ILV.RTChecks);
----------------
fhahn wrote:

Yes, it can be applied at any earlier point, but done here for now to save compile-time and keep initial VPlan more compact.

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


More information about the llvm-commits mailing list