[PATCH] D121940: [SLP] Support internal users of splat loads

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 07:03:39 PDT 2022


vporpo added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1184
+            static constexpr unsigned VectorUsesLimit = 3;
+            unsigned Limit = VectorUsesLimit * NumLanes + 1;
+            if (V1->hasNUsesOrMore(Limit) || V2->hasNUsesOrMore(Limit))
----------------
ABataev wrote:
> Same question here
This sets the limit of users of a broadcast that will be checked. Instead of having a fixed hard limit of say 10 users, this is taking into account the number of lanes, because the more the lanes, the higher the limit should be to avoid it being over-conservative. For example, if we only have 2 lanes then this corresponds to a limit of 7, but if we have 4 lanes then this becomes 13.
Anyway, I don't think this is super important, we could just set a hard limit of 10. What do you think?


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