[llvm] [VPlan] Strip TODO to consolidate (ActiveLaneMask|Widen)PHI (PR #171392)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 02:49:20 PST 2025


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/171392

They cannot be consolidated, as WidenPHI is not a header PHI, while ActtiveLaneMaskPHI is.

>From 0acafc2afcfdbafa5ae86105d70aca7f042bd3b5 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Tue, 9 Dec 2025 10:46:21 +0000
Subject: [PATCH] [VPlan] Strip TODO to consolidate (ActiveLaneMask|Widen)PHI

They cannot be consolidated, as WidenPHI is not a header PHI, while
ActtiveLaneMaskPHI is.
---
 llvm/lib/Transforms/Vectorize/VPlan.h          | 2 --
 llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp | 2 --
 2 files changed, 4 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 972823137023f..1ffaf3601efd6 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3600,8 +3600,6 @@ class VPCanonicalIVPHIRecipe : public VPHeaderPHIRecipe {
 
 /// A recipe for generating the active lane mask for the vector loop that is
 /// used to predicate the vector operations.
-/// TODO: It would be good to use the existing VPWidenPHIRecipe instead and
-/// remove VPActiveLaneMaskPHIRecipe.
 class VPActiveLaneMaskPHIRecipe : public VPHeaderPHIRecipe {
 public:
   VPActiveLaneMaskPHIRecipe(VPValue *StartMask, DebugLoc DL)
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 519a104b9484f..b0c8564ad231a 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -4407,8 +4407,6 @@ void VPWidenPHIRecipe::printRecipe(raw_ostream &O, const Twine &Indent,
 }
 #endif
 
-// TODO: It would be good to use the existing VPWidenPHIRecipe instead and
-// remove VPActiveLaneMaskPHIRecipe.
 void VPActiveLaneMaskPHIRecipe::execute(VPTransformState &State) {
   BasicBlock *VectorPH =
       State.CFG.VPBB2IRBB.at(getParent()->getCFGPredecessor(0));



More information about the llvm-commits mailing list