[PATCH] D92284: [VPlan] Manage induction value creation using VPValues.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 24 07:49:40 PST 2021
fhahn marked 4 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1951
Instruction *CastInst = *Casts.begin();
+ assert(CastDef);
if (Lane < UINT_MAX)
----------------
gilr wrote:
> && "error message"
I removed the assert as it should not be needed & also removed `CastInst`.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8077
+ IsTrunc ? cast<TruncInst>(getVPValue(0)->getUnderlyingValue()) : nullptr,
+ getVPValue(0), getNumDefinedValues() == 2 ? getVPValue(1) : nullptr,
+ State);
----------------
gilr wrote:
> Might be good to have named getters for the trunc and the cast defs.
Added helpers and removed `IsTrunc` field.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8319
+
+ if (hasScalarValue(Def, {Part, 0})) {
+ Value *ScalarValue = get(Def, {Part, 0});
----------------
gilr wrote:
> - Make this an early exit?
> - Worth leaving a TODO for replacing the IF with an assertion once all scalar recipes are VPDef'ed and throwing away that callback.
The early exit is much better & I also added a TODO. thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92284/new/
https://reviews.llvm.org/D92284
More information about the llvm-commits
mailing list