[all-commits] [llvm/llvm-project] fec0a0: [SVE][LoopVectorize] Add support for extracting th...
david-arm via All-commits
all-commits at lists.llvm.org
Fri Mar 5 01:58:19 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fec0a0adac544aeb43da758749c463ff5151ac1e
https://github.com/llvm/llvm-project/commit/fec0a0adac544aeb43da758749c463ff5151ac1e
Author: David Sherwood <david.sherwood at arm.com>
Date: 2021-03-05 (Fri, 05 Mar 2021)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/lib/Transforms/Vectorize/VPlan.cpp
M llvm/lib/Transforms/Vectorize/VPlan.h
A llvm/test/Transforms/LoopVectorize/AArch64/sve-extract-last-veclane.ll
A llvm/test/Transforms/LoopVectorize/extract-last-veclane.ll
Log Message:
-----------
[SVE][LoopVectorize] Add support for extracting the last lane of a scalable vector
There are certain loops like this below:
for (int i = 0; i < n; i++) {
a[i] = b[i] + 1;
*inv = a[i];
}
that can only be vectorised if we are able to extract the last lane of the
vectorised form of 'a[i]'. For fixed width vectors this already works since
we know at compile time what the final lane is, however for scalable vectors
this is a different story. This patch adds support for extracting the last
lane from a scalable vector using a runtime determined lane value. I have
added support to VPIteration for runtime-determined lanes that still permit
the caching of values. I did this by introducing a new class called VPLane,
which describes the lane we're dealing with and provides interfaces to get
both the compile-time known lane and the runtime determined value. Whilst
doing this work I couldn't find any explicit tests for extracting the last
lane values of fixed width vectors so I added tests for both scalable and
fixed width vectors.
Differential Revision: https://reviews.llvm.org/D95139
More information about the All-commits
mailing list