[llvm] [VPlan] - Generalize dead cycle removal in removeDeadRecipes. (PR #213632)

Pawan Nirpal via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 02:53:16 PDT 2026


================
@@ -687,6 +687,32 @@ static void removeRedundantInductionCasts(VPlan &Plan) {
   }
 }
 
+/// If R is a phi-like recipe starting a dead cycle of recipes, erase all
+/// reachable recipes of the dead cycle.
+static void tryToRemoveDeadCycle(VPRecipeBase *R) {
+  auto *PhiR = dyn_cast<VPSingleDefRecipe>(R);
+  if (!PhiR || !isa<VPPhi, VPReductionPHIRecipe>(R))
----------------
pawan-nirpal-031 wrote:

I'm sorry I'm a bit confused if you mean the original test reported in the issue, the dead_anyof_reduction test is already the reduced reproducer for the original crash (taken from the print-before=lv of the c test from the issue) it's minimal, or am I missing something, apologies. 

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


More information about the llvm-commits mailing list