[llvm] [SLPVectorizer] Move size checks (NFC). (PR #161867)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 09:28:18 PDT 2025
================
@@ -6875,6 +6880,26 @@ bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
return false;
}
+bool BoUpSLP::analyzeRtStrideCandidate(ArrayRef<Value *> PointerOps,
+ Type *ScalarTy, Align CommonAlignment,
+ SmallVectorImpl<unsigned> &SortedIndices,
+ StridedPtrInfo &SPtrInfo) const {
+ const unsigned Sz = PointerOps.size();
+ // TODO: VecSz may change if we widen the strided load.
+ unsigned VecSz = Sz;
+ FixedVectorType *StridedLoadTy = getWidenedType(ScalarTy, VecSz);
+ if (!(Sz > MinProfitableStridedLoads && TTI->isTypeLegal(StridedLoadTy) &&
+ TTI->isLegalStridedLoadStore(StridedLoadTy, CommonAlignment)))
----------------
alexey-bataev wrote:
Invert checks to avoid not before the condition
https://github.com/llvm/llvm-project/pull/161867
More information about the llvm-commits
mailing list