[PATCH] D113183: [LV] Patch up induction phis after VPlan execution.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 08:52:12 PST 2021


fhahn updated this revision to Diff 389514.
fhahn added a comment.

Rebased, all tests should be passing now!

In D113183#3146716 <https://reviews.llvm.org/D113183#3146716>, @Ayal wrote:

> Would it be easier to first keep LastInduction in its original place in the header and then sink it to the latch as a VPlan-to-VPlan transformation after all blocks have been formed? Such a patch should refer to the original D22416 <https://reviews.llvm.org/D22416>.

In this patch, there is still no recipe to represent LastInduction, so unfortuantely I don't think it could be sunk just yet. But D113223 <https://reviews.llvm.org/D113223> (next patch in stack after the current one) introduces new VPInstruction opcodes `InductionIncrementNUW`/`InductionIncrement` and uses them to explicitly model LastInduction.

he patch then can simplify add it to the last block of the plan. The exit condition & branch get a similar treatment in D113224 <https://reviews.llvm.org/D113224>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113183/new/

https://reviews.llvm.org/D113183

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113183.389514.patch
Type: text/x-patch
Size: 11863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211124/ce8cd5bb/attachment.bin>


More information about the llvm-commits mailing list