[PATCH] D101076: [SVE][LoopVectorize] Add support for scalable vectorization of first-order recurrences
Kerry McLaughlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 08:38:30 PDT 2021
kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, david-arm, c-rhodes, dmgreen, fhahn, DavidTruby.
Herald added subscribers: psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Adds support for scalable vectorization of loops containing first-order recurrences, e.g:
for(int i = 0; i < n; i++)
b[i] = a[i] + a[i - 1]
This patch changes fixFirstOrderRecurrence for scalable vectors to take vscale into
account when inserting into and extracting from the last lane of a vector.
CreateVectorSplice has been added to construct a vector for the recurrence, which
returns a splice intrinsic for scalable types. For fixed-width the behaviour
remains unchanged as CreateVectorSplice will return a shufflevector instead.
The tests included here are the same as test/Transform/LoopVectorize/first-order-recurrence.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101076
Files:
llvm/include/llvm/IR/IRBuilder.h
llvm/lib/IR/IRBuilder.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101076.339654.patch
Type: text/x-patch
Size: 31976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210422/011fe3fb/attachment.bin>
More information about the llvm-commits
mailing list