[PATCH] D142894: [LoopVectorize] Use overflow-check analysis to improve tail-folding.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 06:51:32 PST 2023


sdesmalen created this revision.
sdesmalen added reviewers: david-arm, fhahn, dmgreen, paulwalker-arm.
Herald added subscribers: shiva0217, StephenFan, hiraditya.
Herald added a project: All.
sdesmalen requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

This work follows on from D142109 <https://reviews.llvm.org/D142109> and addresses a possible regression
when we know the loop iteration counter cannot overflow.

When we know the overflow-check always evaluates to false, it's better to
use the other style of tail folding where it assumes a runtime check was
added, because that avoids having to calculate a modified trip-count.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142894

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-optsize.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-overflow-checks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142894.493306.patch
Type: text/x-patch
Size: 22142 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/57e6a079/attachment.bin>


More information about the llvm-commits mailing list