@@ -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
@@ -6865,7 +6865,7 @@ isMaskedLoadCompress(ArrayRef<Value *> VL, ArrayRef<Value *> PointerOps,
68656865/// current graph (for masked gathers extra extractelement instructions
68666866/// might be required).
68676867bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
6868- Align Alignment, int64_t Diff, size_t VecSz ) const {
6868+ Align Alignment, int64_t Diff, size_t Sz ) const {
68696869 // Try to generate strided load node.
68706870 auto IsAnyPointerUsedOutGraph = any_of(PointerOps, [&](Value *V) {
68716871 return isa<Instruction>(V) && any_of(V->users(), [&](User *U) {
@@ -6874,15 +6874,15 @@ bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
68746874 });
68756875
68766876 const uint64_t AbsoluteDiff = std::abs(Diff);
6877- auto *VecTy = getWidenedType(ScalarTy, VecSz );
6877+ auto *VecTy = getWidenedType(ScalarTy, Sz );
68786878 if (IsAnyPointerUsedOutGraph ||
6879- (AbsoluteDiff > VecSz &&
6880- (VecSz > MinProfitableStridedLoads ||
6881- (AbsoluteDiff <= MaxProfitableLoadStride * VecSz &&
6882- AbsoluteDiff % VecSz == 0 && has_single_bit(AbsoluteDiff / VecSz )))) ||
6883- Diff == -(static_cast<int64_t>(VecSz ) - 1)) {
6884- int64_t Stride = Diff / static_cast<int64_t>(VecSz - 1);
6885- if (Diff != Stride * static_cast<int64_t>(VecSz - 1))
6879+ (AbsoluteDiff > Sz &&
6880+ (Sz > MinProfitableStridedLoads ||
6881+ (AbsoluteDiff <= MaxProfitableLoadStride * Sz &&
6882+ AbsoluteDiff % Sz == 0 && has_single_bit(AbsoluteDiff / Sz )))) ||
6883+ Diff == -(static_cast<int64_t>(Sz ) - 1)) {
6884+ int64_t Stride = Diff / static_cast<int64_t>(Sz - 1);
6885+ if (Diff != Stride * static_cast<int64_t>(Sz - 1))
68866886 return false;
68876887 if (!TTI->isLegalStridedLoadStore(VecTy, Alignment))
68886888 return false;
0 commit comments