diff options
author | Andrzej Warzyński <andrzej.warzynski@arm.com> | 2025-04-16 13:16:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-16 13:16:04 +0200 |
commit | 1e61b374ba3ba2891dc1abda732b0b9263216785 (patch) | |
tree | 6e15fc857f728b0836efc8ace9f7003d46938b46 /clang/lib/AST/ByteCode/Compiler.cpp | |
parent | 41c97afea055a5b7264167ec47b8c14c0f471f2f (diff) | |
download | llvm-1e61b374ba3ba2891dc1abda732b0b9263216785.zip llvm-1e61b374ba3ba2891dc1abda732b0b9263216785.tar.gz llvm-1e61b374ba3ba2891dc1abda732b0b9263216785.tar.bz2 |
[mlir][vector] Tighten the semantics of vector.gather (#135749)
This patch restricts `vector.gather` to only accept tensors and memrefs
as valid sources. Currently, the source is typed as `AnyShaped`, which
also includes vectors—allowing the following (invalid) construct to pass
verification:
```mlir
%0 = vector.gather %base[%c0][%indices], %mask, %pass_thru
: vector<16xf32>, vector<16xi32>, vector<16xi1>, vector<16xf32> into vector<16xf32>
```
(Note: the source %base here is a vector, which is incorrect.)
In contrast, `vector.scatter` currently only accepts memrefs, so some
asymmetry remains between the two ops. This PR is a step toward aligning
their semantics.
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
0 files changed, 0 insertions, 0 deletions