[PATCH] D121940: [SLP] Support internal users of splat loads
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 16:27:11 PDT 2022
ABataev 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))
----------------
Can this be moved to `getSplatScore` anyhow?
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