[PATCH] D125301: [LoopVectorize] Add option to use active lane mask for loop control flow
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 4 06:20:57 PDT 2022
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:1552
+ &*State.CFG.PrevBB->getFirstInsertionPt());
+ EntryPart->addIncoming(StartMask, VectorPH);
+ EntryPart->setDebugLoc(DL);
----------------
fhahn wrote:
> david-arm wrote:
> > Hi @fhahn, if I use VPWidenPHIRecipe instead it's not obvious how I add the incoming start mask. It looks like VPWidenPHIRecipe::execute doesn't add it - do you know how?
> I think D128937 should do the trick, together with the snippet below. If D128937 allows `VPWidenPHIRecipe` to be used here I'll send it for review.
>
> ```
> diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
> index d8fb7a9c12b0..1ba76bf52cc6 100644
> --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
> +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
> @@ -3646,8 +3646,7 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State,
> truncateToMinimalBitwidths(State);
>
> // Fix widened non-induction PHIs by setting up the PHI operands.
> - if (EnableVPlanNativePath)
> - fixNonInductionPHIs(Plan, State);
> + fixNonInductionPHIs(Plan, State);
>
> // At this point every instruction in the original loop is widened to a
> // vector form. Now we need to fix the recurrences in the loop. These PHI
> ```
Hi @fhahn, if you're happy with everything else in the patch, would you be ok with submitting this patch as it is now, then look into using VPWidenPHIRecipe as a follow-on piece of refactoring? We're quite keen to get this work submitted soonish so we can get sufficient testing in the run-up to the LLVM 15 release. We also have quite a few other pieces of work on-going that depend upon this too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125301/new/
https://reviews.llvm.org/D125301
More information about the llvm-commits
mailing list