diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 7b77954e3a4ff..1b8a80d2b3c94 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -3898,7 +3898,7 @@ class BoUpSLP { /// When ReuseReorderShuffleIndices is empty it just returns position of \p /// V within vector of Scalars. Otherwise, try to remap on its reuse index. - int findLaneForValue(Value *V) const { + unsigned findLaneForValue(Value *V) const { unsigned FoundLane = getVectorFactor(); for (auto *It = find(Scalars, V), *End = Scalars.end(); It != End; std::advance(It, 1)) { @@ -4344,7 +4344,7 @@ class BoUpSLP { /// This POD struct describes one external user in the vectorized tree. struct ExternalUser { - ExternalUser(Value *S, llvm::User *U, const TreeEntry &E, int L) + ExternalUser(Value *S, llvm::User *U, const TreeEntry &E, unsigned L) : Scalar(S), User(U), E(E), Lane(L) {} /// Which scalar in our function. @@ -4357,7 +4357,7 @@ class BoUpSLP { const TreeEntry &E; /// Which lane does the scalar belong to. - int Lane; + unsigned Lane; }; using UserList = SmallVector; @@ -7901,7 +7901,7 @@ void BoUpSLP::buildExternalUses( // Check if the scalar is externally used as an extra arg. const auto ExtI = ExternallyUsedValues.find(Scalar); if (ExtI != ExternallyUsedValues.end()) { - int FoundLane = Entry->findLaneForValue(Scalar); + unsigned FoundLane = Entry->findLaneForValue(Scalar); LLVM_DEBUG(dbgs() << "SLP: Need to extract: Extra arg from lane " << FoundLane << " from " << *Scalar << ".\n"); ScalarToExtUses.try_emplace(Scalar, ExternalUses.size()); @@ -7949,7 +7949,7 @@ void BoUpSLP::buildExternalUses( if (U && Scalar->hasNUsesOrMore(UsesLimit)) U = nullptr; - int FoundLane = Entry->findLaneForValue(Scalar); + unsigned FoundLane = Entry->findLaneForValue(Scalar); LLVM_DEBUG(dbgs() << "SLP: Need to extract:" << *UserInst << " from lane " << FoundLane << " from " << *Scalar << ".\n");