[PATCH] D95139: [SVE][LoopVectorize] Add support for extracting the last lane of a scalable vector
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 03:17:31 PST 2021
sdesmalen added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2943
(Cost->isUniformAfterVectorization(Operand, State.VF)))
- InputInstance.Lane = 0;
+ InputInstance.Lane.set(0, VPLane::Kind::First);
auto *NewOp = State.get(User.getOperand(op), InputInstance);
----------------
nit: maybe add a `static VPIteration::getFirstLane`? (seems to be useful in several places).
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:239
+ return Data
+ .PerPartScalars[Def][Instance.Part][Instance.Lane.getKnownLane()];
----------------
should this use `mapToCacheIndex` ?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:185
- VPIteration(unsigned Part, unsigned Lane) : Part(Part), Lane(Lane) {}
+ VPIteration(unsigned Part, VPLane Lane) : Part(Part), Lane(Lane) {}
----------------
nit: `const VPLane &`
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:187
- bool isFirstIteration() const { return Part == 0 && Lane == 0; }
+ bool isFirstIteration() const { return Part == 0 && Lane.isFirstLane(); }
};
----------------
nit: is `isFirstIteration` unused now?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95139/new/
https://reviews.llvm.org/D95139
More information about the llvm-commits
mailing list