[PATCH] D90445: [SLP] Make SLPVectorizer to use `llvm.masked.gather` intrinsic
Anton Afanasyev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 15:22:44 PST 2020
anton-afanasyev marked 2 inline comments as done.
anton-afanasyev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1755
+ Bundle ? TreeEntry::Vectorize : TreeEntry::NeedToGather;
+ return newTreeEntry(VL, std::make_pair(EntryState, Bundle.getValue()), S,
+ UserTreeIdx, ReuseShuffleIndices, ReorderIndices);
----------------
ABataev wrote:
> I think it will crash if Bundle is `None`
Thank you, fixed!
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1761
+ ArrayRef<Value *> VL,
+ std::pair<TreeEntry::EntryState, Optional<ScheduleData *>> StateAndBundle,
+ const InstructionsState &S, const EdgeInfo &UserTreeIdx,
----------------
ABataev wrote:
> 1. Better to make `Optional<std::pair<EntryState, ScheduleData *>>`.
> 2. I would add `assert(!StateAndBundle || StateAndBundle.getValue().first != NeedToGather && "...");
1. I tried to get rid of `std::pair` again, now looks better, doesn't it?
2. Thanks, added.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90445/new/
https://reviews.llvm.org/D90445
More information about the llvm-commits
mailing list