[llvm] [LV] Unconditionally run materializeConstVTC in ::executePlan (PR #191299)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 02:55:37 PDT 2026


================
@@ -7348,6 +7348,10 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
          "Trying to execute plan with unsupported UF");
   if (BestVPlan.hasEarlyExit())
     ++LoopsEarlyExitVectorized;
+
+  RUN_VPLAN_PASS(VPlanTransforms::materializeConstantVectorTripCount, BestVPlan,
+                 BestVF, BestUF, PSE);
----------------
fhahn wrote:

The main user is `optimizeForVFAndUF`, I sunk it here.

The ohers cannot be moved at the moment, as we need to materialize the VPSymbolicValues late

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


More information about the llvm-commits mailing list