[llvm] [VPlan] Make canonical IV part of the region (PR #156262)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 14 14:18:25 PDT 2026


================
@@ -734,9 +744,11 @@ void VPlanTransforms::createHeaderPhiRecipes(
   };
 
   for (VPRecipeBase &R : make_early_inc_range(HeaderVPBB->phis())) {
-    if (isa<VPCanonicalIVPHIRecipe>(&R))
-      continue;
     auto *PhiR = cast<VPPhi>(&R);
+    // Skip phis without underlying instructions (e.g., the canonical IV created
+    // by addCanonicalIVRecipes).
+    if (!PhiR->getUnderlyingValue())
+      continue;
----------------
fhahn wrote:

Updated to skip the first one. But we should be able to move this after constructing regions as well, after https://github.com/llvm/llvm-project/pull/185305 lands

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


More information about the llvm-commits mailing list