[llvm] [SLPVectorizer] Widen constant strided loads. (PR #162324)

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 09:35:35 PDT 2025


================
@@ -6921,36 +6920,105 @@ bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
 }
 
 bool BoUpSLP::analyzeConstantStrideCandidate(
-    const ArrayRef<Value *> PointerOps, Type *ScalarTy, Align Alignment,
+    ArrayRef<Value *> PointerOps, Type *ElemTy, Align Alignment,
     const SmallVectorImpl<unsigned> &SortedIndices, const int64_t Diff,
     Value *Ptr0, Value *PtrN, StridedPtrInfo &SPtrInfo) const {
-  const size_t Sz = PointerOps.size();
-  if (!isStridedLoad(PointerOps, ScalarTy, Alignment, Diff, Sz))
-    return false;
+  const unsigned Sz = PointerOps.size();
----------------
mgudim wrote:

In the latest version the first line of this function is const size_t Sz = PointerOps.size();, not sure what this diff is. Maybe you're looking at older commit?

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


More information about the llvm-commits mailing list