[PATCH] D146219: [NFC][LoopVectorize] Change trip counts for some tests to guarantee a scalar tail

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 04:57:17 PDT 2023


david-arm created this revision.
david-arm added reviewers: sdesmalen, reames, fhahn.
Herald added subscribers: luke, shiva0217, StephenFan, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson.
Herald added a project: All.
david-arm requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, alextsao1999, MaskRay.
Herald added a project: LLVM.

Quite a few vectoriser tests were using a trip count of 1024,
which meant:

1. For fixed-length VFs we would never actually tail-fold, e.g. see Transforms/LoopVectorize/RISCV/uniform-load-store.ll. This is because we can prove at compile-time there will never be a scalar tail.
2. As of D146199 <https://reviews.llvm.org/D146199> the same optimisation mentioned above will also apply to scalable VFs too.

I've changed all such trip counts to be 1025 instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146219

Files:
  llvm/test/Transforms/LoopVectorize/AArch64/masked-call.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-optsize.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding.ll
  llvm/test/Transforms/LoopVectorize/RISCV/scalable-tailfold.ll
  llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146219.505772.patch
Type: text/x-patch
Size: 117143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230316/2a9c429f/attachment.bin>


More information about the llvm-commits mailing list