[llvm] [VPlan] Run removeDeadRecipes early. (PR #190191)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 09:19:09 PDT 2026


================
@@ -3683,6 +3689,15 @@ void VPlanTransforms::createInterleaveGroups(
   // single VPInterleaveRecipe at its insertion point.
   VPDominatorTree VPDT(Plan);
   for (const auto *IG : InterleaveGroups) {
+    // Skip interleave groups where members don't have recipes. This can happen
+    // when removeDeadRecipes removes recipes that are part of interleave groups
+    // but have no users.
+    if (llvm::any_of(llvm::seq(0u, IG->getFactor()), [&](unsigned I) {
----------------
artagnon wrote:

```suggestion
    if (llvm::any_of(llvm::seq(IG->getFactor()), [&RecipeBuilder](unsigned I) {
```

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


More information about the llvm-commits mailing list