[llvm] 09fbfb5 - [VPlan] Remove FoldTail argument for createConsecutiveVecPtr (NFC). (#208550)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 01:13:18 PDT 2026


Author: Florian Hahn
Date: 2026-07-10T09:13:13+01:00
New Revision: 09fbfb5d3e965010ed87b84f7d7e88f9024b9ccc

URL: https://github.com/llvm/llvm-project/commit/09fbfb5d3e965010ed87b84f7d7e88f9024b9ccc
DIFF: https://github.com/llvm/llvm-project/commit/09fbfb5d3e965010ed87b84f7d7e88f9024b9ccc.diff

LOG: [VPlan] Remove FoldTail argument for createConsecutiveVecPtr (NFC). (#208550)

The argument is no longer needed now that we can look up the information
directly from VPlan.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    llvm/lib/Transforms/Vectorize/VPlan.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
index 1e48aea0fc061..e4cfdecfb1acf 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
@@ -527,8 +527,7 @@ class VPBuilder {
   /// with element type \p SourceElementTy.
   VPSingleDefRecipe *createConsecutiveVectorPointer(VPValue *Ptr,
                                                     Type *SourceElementTy,
-                                                    bool Reverse, bool FoldTail,
-                                                    DebugLoc DL);
+                                                    bool Reverse, DebugLoc DL);
 
   VPWidenMemIntrinsicRecipe *createWidenMemIntrinsic(
       Intrinsic::ID VectorIntrinsicID, ArrayRef<VPValue *> CallArguments,

diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6e94d36cd8fb1..a4aae2651ee4c 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6199,8 +6199,7 @@ VPRecipeBase *VPRecipeBuilder::tryToWidenMemory(VPInstruction *VPI,
   if (Consecutive) {
     Builder.setInsertPoint(VPI);
     Ptr = Builder.createConsecutiveVectorPointer(Ptr, getLoadStoreType(I),
-                                                 Reverse, Plan.hasTailFolded(),
-                                                 VPI->getDebugLoc());
+                                                 Reverse, VPI->getDebugLoc());
   }
 
   if (Reverse && Mask)

diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 2088f91657289..7d69b3453cba9 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -1667,8 +1667,7 @@ bool LoopVectorizationPlanner::getDecisionAndClampRange(
 
 VPSingleDefRecipe *
 VPBuilder::createConsecutiveVectorPointer(VPValue *Ptr, Type *SourceElementTy,
-                                          bool Reverse, bool FoldTail,
-                                          DebugLoc DL) {
+                                          bool Reverse, DebugLoc DL) {
   VPlan &Plan = getPlan();
   GEPNoWrapFlags Flags = vputils::getGEPFlagsForPtr(Ptr);
   if (Reverse) {
@@ -1676,8 +1675,9 @@ VPBuilder::createConsecutiveVectorPointer(VPValue *Ptr, Type *SourceElementTy,
     // original scalar loop: drop the GEP no-wrap flags in this case. Otherwise
     // preserve existing flags without no-unsigned-wrap, as we will emit
     // negative indices.
-    GEPNoWrapFlags ReverseFlags =
-        FoldTail ? GEPNoWrapFlags::none() : Flags.withoutNoUnsignedWrap();
+    GEPNoWrapFlags ReverseFlags = Plan.hasTailFolded()
+                                      ? GEPNoWrapFlags::none()
+                                      : Flags.withoutNoUnsignedWrap();
     return tryInsertInstruction(new VPVectorEndPointerRecipe(
         Ptr, &Plan.getVF(), SourceElementTy, /*Stride=*/-1, ReverseFlags, DL));
   }


        


More information about the llvm-commits mailing list