[PATCH] D98206: [TTI] Add a Mask to getShuffleCost
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 10 15:59:44 PST 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3876
+
+ SmallVector<int> Mask;
+ for (unsigned i = 0, e = E->Scalars.size(); i < e; ++i) {
----------------
`Mask(E->Scalars.size());`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3877
+ SmallVector<int> Mask;
+ for (unsigned i = 0, e = E->Scalars.size(); i < e; ++i) {
+ auto *OpInst = cast<Instruction>(E->Scalars[i]);
----------------
`for (unsigned I = 0, End = E->Scalars.size(); I < End; ++I) {`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3880
+ assert(E->isOpcodeOrAlt(OpInst) && "Unexpected main/alternate opcode");
+ Mask.push_back(i + (OpInst->getOpcode() == E->getAltOpcode() ? e : 0));
+ }
----------------
`Mask[I] = ....;`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98206/new/
https://reviews.llvm.org/D98206
More information about the llvm-commits
mailing list