[PATCH] D149742: [SLP]Improve isGatherShuffledEntry by trying per-register shuffle.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 14:44:02 PDT 2023
reames added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8908
-std::optional<TargetTransformInfo::ShuffleKind>
-BoUpSLP::isGatherShuffledEntry(const TreeEntry *TE, ArrayRef<Value *> VL,
- SmallVectorImpl<int> &Mask,
- SmallVectorImpl<const TreeEntry *> &Entries) {
+SmallVector<std::optional<TargetTransformInfo::ShuffleKind>>
+BoUpSLP::isGatherShuffledEntry(
----------------
Stylistic suggestion here. This function is quite complicated, and following all the changes through are tricky. I *think* this is just performing the same operation for each sub-range (divided by register). If so, I'd suggest leaving the function alone, and introducing a wrapper which just calls the old version with a sub-range of the VLs, and builds up the vector results.
If this works here, then applying the same basic idea throughout the patch would make it much easier to follow and review.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149742/new/
https://reviews.llvm.org/D149742
More information about the llvm-commits
mailing list