[PATCH] D120827: [VPlan] Helper to check if a recipe only uses scalar values of op.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 06:33:58 PST 2022
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:776
+
+ /// Returns true if the recipe only uses scalars of operand \p Op.
+ virtual bool usesScalars(const VPValue *Op) const {
----------------
Can drop "only" from comment too (here and below).
Add "Conservatively returns if only first (scalar) lane is used, as default" ?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1921
+ /// Returns true if the recipe only uses the first lane of operand \p Op.
+ /// Conservatively returns false.
+ bool onlyFirstLaneUsed(const VPValue *Op) const override {
----------------
drop " /// Conservatively returns false."
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1644
+
+ /// Returns true if the recipe only uses scalars of operand \p Op.
+ bool onlyScalarsUsed(const VPValue *Op) const override {
----------------
fhahn wrote:
> Ayal wrote:
> > VPPredInstPHIRecipe has only PredInst as an operand, which is surely scalar.
> Yes. Are you referring to the generic comment?
Just clarifying the behavior here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120827/new/
https://reviews.llvm.org/D120827
More information about the llvm-commits
mailing list