[PATCH] D80491: [LV] Clamp MaxVF to power of 2

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 09:36:27 PDT 2020


Ayal created this revision.
Ayal added reviewers: fhahn, gilr.
Herald added subscribers: llvm-commits, rkruppe, hiraditya.
Herald added a project: LLVM.

If a loop has a constant trip count known to be a multiple of MaxVF (times user UF), LV infers that no tail will be generated for any chosen VF. This relies on the chosen VF's being powers of 2 bound by MaxVF, and assumes MaxVF is a power of 2.
Make sure the latter holds, in particular when MaxVF is set by a memory dependence distance which may not be a power of 2.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80491

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/memdep-fold-tail.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80491.265933.patch
Type: text/x-patch
Size: 6675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200524/788828d8/attachment-0001.bin>


More information about the llvm-commits mailing list