[PATCH] D121595: [LoopVectorize] Permit tail-folding for low trip counts using scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 04:44:25 PDT 2022


david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, frasercrmck, peterwaller-arm.
Herald added subscribers: luke957, ctetreau, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, kristof.beyls.
Herald added a project: All.
david-arm requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999, pcwang-thead, MaskRay.
Herald added a project: LLVM.

When the loop vectoriser encounters a known low trip count it tries
to create a single predicated loop in order to get the benefit of
vectorisation and eliminate the scalar tail. However, until now the
vectoriser prevented the use of scalable vectors in this case due
to concerns in the past about stability. I believe that tail-folded
loops using scalable vectors are now sufficiently well tested that
we can enable this.

Tests added here:

Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll
Transforms/LoopVectorize/RISCV/low-trip-count.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121595

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll
  llvm/test/Transforms/LoopVectorize/RISCV/low-trip-count.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121595.415063.patch
Type: text/x-patch
Size: 6392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220314/b8c193d5/attachment.bin>


More information about the llvm-commits mailing list