[PATCH] D147522: [LoopVectorize] Take vscale into account when deciding to create epilogues
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 05:28:37 PDT 2023
david-arm created this revision.
david-arm added reviewers: sdesmalen, reames, hassnaa-arm, kmclaughlin.
Herald added subscribers: shiva0217, hiraditya.
Herald added a project: All.
david-arm requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, alextsao1999.
Herald added a project: LLVM.
In LoopVectorizationCostModel::isEpilogueVectorizationProfitable we
check to see if the chosen main vector loop VF >= 16. If so, we
decide to create a vector epilogue loop. However, this doesn't
take VScaleForTuning into account because we could be targeting a
CPU where vscale > 1, and hence the runtime VF would be a multiple
of the known minimum value.
This patch multiplies scalable VFs by VScaleForTuning and several
tests have been updated that now produce vector epilogues.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147522
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/intrinsiccost.ll
llvm/test/Transforms/LoopVectorize/AArch64/runtime-check-size-based-threshold.ll
llvm/test/Transforms/LoopVectorize/AArch64/sve-fneg.ll
llvm/test/Transforms/LoopVectorize/AArch64/type-shrinkage-zext-costs.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147522.510758.patch
Type: text/x-patch
Size: 42473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/06da7d90/attachment.bin>
More information about the llvm-commits
mailing list