[llvm] [LV] Support strided memory accesses with a stride of -1 (PR #128718)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 12 06:42:49 PDT 2025


================
@@ -1571,12 +1571,15 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags,
                               public VPUnrollPartAccessor<1> {
   Type *IndexedTy;
 
+  /// Indicate whether to compute the pointer for strided memory accesses.
+  bool Strided;
+
 public:
-  VPVectorPointerRecipe(VPValue *Ptr, Type *IndexedTy, GEPNoWrapFlags GEPFlags,
-                        DebugLoc DL)
+  VPVectorPointerRecipe(VPValue *Ptr, Type *IndexedTy, bool Strided,
----------------
Mel-Chen wrote:

I agree that I should update the description of `VPVectorPointerRecipe`, but I'm not sure if `VPReverseVectorPointerRecipe` also needs to be modified. 
To me, `VPReverseVectorPointerRecipe` behaves like extracting the last pointer of each Part. 
If the comment for `VPReverseVectorPointerRecipe` needs to be updated, do you have any suggested new description?
217571003d0071186efdfe8c312c9c0cf2cd333c

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


More information about the llvm-commits mailing list