@@ -2242,7 +2242,7 @@ class BoUpSLP {
22422242 /// may not be necessary.
22432243 bool isLoadCombineCandidate(ArrayRef<Value *> Stores) const;
22442244 bool isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
2245- Align Alignment, int64_t Diff, size_t VecSz ) const;
2245+ Align Alignment, int64_t Diff, size_t Sz ) const;
22462246 /// Given a set of pointers, check if they can be rearranged as follows (%s is
22472247 /// a constant):
22482248 /// %b + 0 * %s + 0
@@ -6870,7 +6870,7 @@ isMaskedLoadCompress(ArrayRef<Value *> VL, ArrayRef<Value *> PointerOps,
68706870/// current graph (for masked gathers extra extractelement instructions
68716871/// might be required).
68726872bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
6873- Align Alignment, int64_t Diff, size_t VecSz ) const {
6873+ Align Alignment, int64_t Diff, size_t Sz ) const {
68746874 // Try to generate strided load node.
68756875 auto IsAnyPointerUsedOutGraph = any_of(PointerOps, [&](Value *V) {
68766876 return isa<Instruction>(V) && any_of(V->users(), [&](User *U) {
@@ -6879,15 +6879,15 @@ bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
68796879 });
68806880
68816881 const uint64_t AbsoluteDiff = std::abs(Diff);
6882- auto *VecTy = getWidenedType(ScalarTy, VecSz );
6882+ auto *VecTy = getWidenedType(ScalarTy, Sz );
68836883 if (IsAnyPointerUsedOutGraph ||
6884- (AbsoluteDiff > VecSz &&
6885- (VecSz > MinProfitableStridedLoads ||
6886- (AbsoluteDiff <= MaxProfitableLoadStride * VecSz &&
6887- AbsoluteDiff % VecSz == 0 && has_single_bit(AbsoluteDiff / VecSz )))) ||
6888- Diff == -(static_cast<int64_t>(VecSz ) - 1)) {
6889- int64_t Stride = Diff / static_cast<int64_t>(VecSz - 1);
6890- if (Diff != Stride * static_cast<int64_t>(VecSz - 1))
6884+ (AbsoluteDiff > Sz &&
6885+ (Sz > MinProfitableStridedLoads ||
6886+ (AbsoluteDiff <= MaxProfitableLoadStride * Sz &&
6887+ AbsoluteDiff % Sz == 0 && has_single_bit(AbsoluteDiff / Sz )))) ||
6888+ Diff == -(static_cast<int64_t>(Sz ) - 1)) {
6889+ int64_t Stride = Diff / static_cast<int64_t>(Sz - 1);
6890+ if (Diff != Stride * static_cast<int64_t>(Sz - 1))
68916891 return false;
68926892 if (!TTI->isLegalStridedLoadStore(VecTy, Alignment))
68936893 return false;
0 commit comments