[llvm] 01fbbda - [LV] Strengthen assert: VPlan0 doesn't have WidenPHIs (NFC) (#165715)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 11:32:37 PDT 2025


Author: Ramkumar Ramachandra
Date: 2025-10-30T18:32:33Z
New Revision: 01fbbda62c85cd7f42d15959a88dd71ec02a2586

URL: https://github.com/llvm/llvm-project/commit/01fbbda62c85cd7f42d15959a88dd71ec02a2586
DIFF: https://github.com/llvm/llvm-project/commit/01fbbda62c85cd7f42d15959a88dd71ec02a2586.diff

LOG: [LV] Strengthen assert: VPlan0 doesn't have WidenPHIs (NFC) (#165715)

VPWidenCanonicalIV and VPBlend recipes are created by VPPredicator, and
VPCanonicalIVPHI and VPInstruction recipes are created by
VPlanConstruction. WidenPHIs are never created.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 8ebc108080271..505fb435e91e6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -8340,11 +8340,7 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
               &R) ||
           (isa<VPInstruction>(&R) && !UnderlyingValue))
         continue;
-
-      // FIXME: VPlan0, which models a copy of the original scalar loop, should
-      // not use VPWidenPHIRecipe to model the phis.
-      assert((isa<VPWidenPHIRecipe>(&R) || isa<VPInstruction>(&R)) &&
-             UnderlyingValue && "unsupported recipe");
+      assert(isa<VPInstruction>(&R) && UnderlyingValue && "unsupported recipe");
 
       // TODO: Gradually replace uses of underlying instruction by analyses on
       // VPlan.


        


More information about the llvm-commits mailing list