[PATCH] D93865: [LV] Vectorize (some) early and multiple exit loops w/tail folding

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 28 10:36:59 PST 2020


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

This is a follow up to e4df6a.  As noted in my last comment on the review, I realized that supporting tail folding of multiple exit loops was much more straight forward than I first realized.  The hard part is forming the predicate masks, and the code already knows how to do that.

The only slightly tricky bit here is getting the conditions right (e.g. using the proper form requiresScalarEpilogue() vs foldTailByMasking in each place since this is effectively a three way decision)

This should be entirely orthogonal to D93725 <https://reviews.llvm.org/D93725> and can landed in either order.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93865

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/loop-form.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93865.313873.patch
Type: text/x-patch
Size: 30613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201228/5e074cd5/attachment-0001.bin>


More information about the llvm-commits mailing list