diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2023-09-07 15:33:27 +0000 |
---|---|---|
committer | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2023-09-07 15:58:44 +0000 |
commit | 8dffb71cbada73c5f9c1e9df7891566be0ff762d (patch) | |
tree | dfd5254656b128334ae6fa0f487d39760a2ac39f /llvm/lib/Transforms/Utils/Debugify.cpp | |
parent | 6255157d24e27c604bda8fe8ce26e896f54785c0 (diff) | |
download | llvm-8dffb71cbada73c5f9c1e9df7891566be0ff762d.zip llvm-8dffb71cbada73c5f9c1e9df7891566be0ff762d.tar.gz llvm-8dffb71cbada73c5f9c1e9df7891566be0ff762d.tar.bz2 |
[mlir][VectorOps] Add lowering for vector.shape_cast of scalable vectors
This adds a lowering similar to the general shape_cast lowering, but
instead moves elements a (scalable) subvector at a time via
vector.scalable.extract/insert. It is restricted to the case where both
the source and result vector types have a single trailing scalable
dimension (due to limitations of the insert/extract ops).
The current lowerings are now disabled for scalable vectors, as they
produce incorrect results at runtime (due to assuming a fixed number
of elements).
Examples of casts that now work:
// Flattening:
%v = vector.shape_cast %arg0 : vector<4x[8]xi8> to vector<[32]xi8>
// Un-flattening:
%v = vector.shape_cast %arg0 : vector<[8]xi32> to vector<2x1x[4]xi32>
Reviewed By: awarzynski, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D159217
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
0 files changed, 0 insertions, 0 deletions