[llvm] [VPlan] Materialize Build(Struct)Vectors for VPReplicateRecipes. (NFCI) (PR #151487)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 01:53:49 PDT 2025


================
@@ -513,6 +523,8 @@ void VPlanTransforms::replicateByVF(VPlan &Plan, ElementCount VF) {
       vp_depth_first_shallow(Plan.getVectorLoopRegion()->getEntry()));
   auto VPBBsToUnroll =
       concat<VPBasicBlock *>(VPBBsOutsideLoopRegion, VPBBsInsideLoopRegion);
+  DenseMap<VPValue *, SmallVector<VPValue *>> Def2LaneDefs;
+  SmallVector<VPRecipeBase *> ToRemove;
----------------
ayalz wrote:

```suggestion
  // The removal of current recipes being replaced by new ones needs to be delayed after Def2LaneDefs is no longer in use.
  SmallVector<VPRecipeBase *> ToRemove;
```

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


More information about the llvm-commits mailing list