[PATCH] D121940: [SLP] Support internal users of splat loads
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 12:49:26 PDT 2022
vporpo added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1179-1194
+ // Retruns true if the users of V1 and V2 won't need to be extracted.
+ auto AllUsersAreInternal = [NumLanes, U1, U2, this](Value *V1,
+ Value *V2) {
+ // Bail out if we have too many uses to save compilation time.
+ static constexpr unsigned VectorUsesLimit = 3;
+ unsigned Limit = VectorUsesLimit * NumLanes + 1;
+ if (V1->hasNUsesOrMore(Limit) || V2->hasNUsesOrMore(Limit))
----------------
ABataev wrote:
> Can this be moved to `getSplatScore` anyhow?
`getSplatScore()` does not seem to check if V1 and V2 form a splat. As far as I understand it checks for a potential splat across all lanes and returns an extra score in that case. Not sure how I could combine this code with `getSplatScore()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121940/new/
https://reviews.llvm.org/D121940
More information about the llvm-commits
mailing list