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

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 06:37:14 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());
----------------
artagnon wrote:

Why do we need to insert it in the beginning, as opposed to the end?

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


More information about the llvm-commits mailing list