[PATCH] D94175: [VPlan] Move reduction start value creation to widenPHIRecipe.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 09:53:23 PST 2021
fhahn added a comment.
In D94175#2487083 <https://reviews.llvm.org/D94175#2487083>, @gilr wrote:
> LGTM, with a nit.
> (Seems reduction might be worth splitting widenPhiInstruction() and its own Recipe, but that's beyond the scope of this patch)
> Thanks!
Thanks Gil! Yes I think we can think about splitting them up as follow-ups.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4587
+
+ if (RdxDesc) {
+ RecurKind RK = RdxDesc->getRecurrenceKind();
----------------
gilr wrote:
> To be on the safe side I'd check here for `Legal->isReductionVariable(P)` and assert that RdxDesc and StartV are not null inside.
I added an assertion that `Legal->isReductionVariable(P)` and `StartV` must be true. I also added another assertion below to ensure we do not miss legal induction variables for which `RdxDesc` is not set.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94175/new/
https://reviews.llvm.org/D94175
More information about the llvm-commits
mailing list