[PATCH] D105817: [LV] Enable vectorization of multiple exit loops w/computable exit counts

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 12 07:57:00 PDT 2021


reames created this revision.
reames added reviewers: Ayal, fhahn, anna.
Herald added subscribers: bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

This change enables vectorization of multiple exit loops when the exit count is statically computable.  That requirement - shared with the rest of LV - in turn requires each exit to be analyzeable and to dominate the latch.

The majority of work to support this was done in a set of previous patches.  In particular,, 72314466 <https://reviews.llvm.org/rG723144665b7f7afe1555e69eeb3c705c8044d7d0> avoids having multiple edges from the middle block to the exits, and 4b33b2387 <https://reviews.llvm.org/rG4b33b2387787aef5020450cdcc8dde231eb0a5fc> which added support for non-latch single exit and multiple exits with a single exiting block.  As a result, this change is basically just removing a bailout and adjusting some tests now that the prerequisite work is done and has stuck in tree for a bit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105817

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  llvm/test/Transforms/LoopVectorize/loop-form.ll
  llvm/test/Transforms/LoopVectorize/loop-legality-checks.ll
  llvm/test/Transforms/LoopVectorize/remarks-multi-exit-loops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105817.357944.patch
Type: text/x-patch
Size: 15098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210712/9529cbb4/attachment.bin>


More information about the llvm-commits mailing list