[PATCH] D90445: [SLP] Make SLPVectorizer to use `llvm.masked.gather` intrinsic
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 14:29:10 PST 2020
ABataev 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);
----------------
I think it will crash if Bundle is `None`
================
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,
----------------
1. Better to make `Optional<std::pair<EntryState, ScheduleData *>>`.
2. I would add `assert(!StateAndBundle || StateAndBundle.getValue().first != NeedToGather && "...");
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