[PATCH] D95039: [SVE] Add support for scalable vectorization of loops with selects and cmps
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 05:54:07 PST 2021
david-arm created this revision.
david-arm added reviewers: sdesmalen, CarolineConcatto, kmclaughlin, c-rhodes.
Herald added subscribers: NickHung, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
I have removed an unnecessary assert in LoopVectorizationCostModel::getInstructionCost
that prevented a cost being calculated for select instructions when using
scalable vectors. In addition, I have changed AArch64TTIImpl::getCmpSelInstrCost
to only do special cost calculations for fixed width vectors and fall
back to the base version for scalable vectors.
I have added a simple cost model test for cmps and selects:
test/Analysis/CostModel/sve-cmpsel.ll
and some simple tests that show we vectorize loops with cmp and select:
test/Transforms/LoopVectorize/AArch64/sve-basic-vec.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95039
Files:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Analysis/CostModel/sve-cmpsel.ll
llvm/test/Transforms/LoopVectorize/AArch64/sve-basic-vec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95039.317853.patch
Type: text/x-patch
Size: 18303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210120/9d4f4f03/attachment.bin>
More information about the llvm-commits
mailing list