@@ -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
@@ -6845,7 +6845,7 @@ isMaskedLoadCompress(ArrayRef<Value *> VL, ArrayRef<Value *> PointerOps,
68456845/// current graph (for masked gathers extra extractelement instructions
68466846/// might be required).
68476847bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
6848- Align Alignment, int64_t Diff, size_t VecSz ) const {
6848+ Align Alignment, int64_t Diff, size_t Sz ) const {
68496849 // Try to generate strided load node.
68506850 auto IsAnyPointerUsedOutGraph = any_of(PointerOps, [&](Value *V) {
68516851 return isa<Instruction>(V) && any_of(V->users(), [&](User *U) {
@@ -6854,15 +6854,15 @@ bool BoUpSLP::isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
68546854 });
68556855
68566856 const uint64_t AbsoluteDiff = std::abs(Diff);
6857- auto *VecTy = getWidenedType(ScalarTy, VecSz );
6857+ auto *VecTy = getWidenedType(ScalarTy, Sz );
68586858 if (IsAnyPointerUsedOutGraph ||
6859- (AbsoluteDiff > VecSz &&
6860- (VecSz > MinProfitableStridedLoads ||
6861- (AbsoluteDiff <= MaxProfitableLoadStride * VecSz &&
6862- AbsoluteDiff % VecSz == 0 && has_single_bit(AbsoluteDiff / VecSz )))) ||
6863- Diff == -(static_cast<int64_t>(VecSz ) - 1)) {
6864- int64_t Stride = Diff / static_cast<int64_t>(VecSz - 1);
6865- if (Diff != Stride * static_cast<int64_t>(VecSz - 1))
6859+ (AbsoluteDiff > Sz &&
6860+ (Sz > MinProfitableStridedLoads ||
6861+ (AbsoluteDiff <= MaxProfitableLoadStride * Sz &&
6862+ AbsoluteDiff % Sz == 0 && has_single_bit(AbsoluteDiff / Sz )))) ||
6863+ Diff == -(static_cast<int64_t>(Sz ) - 1)) {
6864+ int64_t Stride = Diff / static_cast<int64_t>(Sz - 1);
6865+ if (Diff != Stride * static_cast<int64_t>(Sz - 1))
68666866 return false;
68676867 if (!TTI->isLegalStridedLoadStore(VecTy, Alignment))
68686868 return false;
0 commit comments