[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 9 09:15:20 PST 2020
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2847
+ ReuseShuffleIndicies);
+ TE->State = TreeEntry::ScatterVectorize;
+ TE->setOperandsInOrder();
----------------
Better to modify `Bundle` parameter in `newTreeEntry` function, something like `Optional<std::pair<EntryState, Bundle>>` and pass `EntryState` directly at function call. You can implement it as a separate NFC patch.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3698
+ } else { // TreeEntry::ScatterVectorize
+ VecLdCost = TTI->getGatherScatterOpCost(
+ Instruction::Load, VecTy, cast<LoadInst>(VL0)->getPointerOperand(),
----------------
Add assert here for `E->State == TreeEntry::ScatterVectorize`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4537
+ } else { // TreeEntry::ScatterVectorize
+ Value *VecPtr = vectorizeTree(E->getOperand(0));
+ NewLI = Builder.CreateMaskedGather(VecPtr, LI->getAlign());
----------------
Add assert here for `E->State == TreeEntry::ScatterVectorize`
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