[llvm] [VPlan] Materialize VectorTripCount in narrowInterleaveGroups. (PR #182146)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 12:50:48 PST 2026


================
@@ -5454,21 +5471,30 @@ VPlanTransforms::narrowInterleaveGroups(VPlan &Plan,
   // original iteration.
   auto *CanIV = VectorLoop->getCanonicalIV();
   auto *Inc = cast<VPInstruction>(CanIV->getBackedgeValue());
-  VPBuilder PHBuilder(Plan.getVectorPreheader());
+  VPBasicBlock *VectorPH = Plan.getVectorPreheader();
+  VPBuilder PHBuilder(VectorPH, VectorPH->begin());
----------------
fhahn wrote:

The adjustment is needed to ensure proper dominance when using the generic transform to materialize the vector trip count.

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


More information about the llvm-commits mailing list