aboutsummaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
authorAndrzej WarzyƄski <andrzej.warzynski@arm.com>2024-01-19 08:54:12 +0000
committerGitHub <noreply@github.com>2024-01-19 08:54:12 +0000
commitee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a (patch)
tree50112a00fa93023fd9cb6c41a061a207e8f4d0a4 /mlir
parentc875567af352716e703a49c9445f5dc1d3cf0063 (diff)
downloadllvm-ee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a.zip
llvm-ee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a.tar.gz
llvm-ee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a.tar.bz2
[mlir][vector] Add 2 invalid tests for vector.xfer Ops (#78608)
Diffstat (limited to 'mlir')
-rw-r--r--mlir/test/Dialect/Vector/invalid.mlir20
1 files changed, 18 insertions, 2 deletions
diff --git a/mlir/test/Dialect/Vector/invalid.mlir b/mlir/test/Dialect/Vector/invalid.mlir
index 3bee9e0..9c73f5a 100644
--- a/mlir/test/Dialect/Vector/invalid.mlir
+++ b/mlir/test/Dialect/Vector/invalid.mlir
@@ -1,7 +1,5 @@
// RUN: mlir-opt %s -split-input-file -verify-diagnostics
-// -----
-
func.func @broadcast_to_scalar(%arg0: f32) -> f32 {
// expected-error@+1 {{custom op 'vector.broadcast' invalid kind of type specified}}
%0 = vector.broadcast %arg0 : f32 to f32
@@ -386,6 +384,15 @@ func.func @test_vector.transfer_read(%arg0: memref<?x?xf32>) {
func.func @test_vector.transfer_read(%arg0: memref<?x?xf32>) {
%c3 = arith.constant 3 : index
%cst = arith.constant 3.0 : f32
+ // expected-error@+1 {{requires 2 indices}}
+ %0 = vector.transfer_read %arg0[%c3], %cst { permutation_map = affine_map<()->(0)> } : memref<?x?xf32>, vector<128xf32>
+}
+
+// -----
+
+func.func @test_vector.transfer_read(%arg0: memref<?x?xf32>) {
+ %c3 = arith.constant 3 : index
+ %cst = arith.constant 3.0 : f32
// expected-error@+1 {{requires a permutation_map with input dims of the same rank as the source type}}
%0 = vector.transfer_read %arg0[%c3, %c3], %cst {permutation_map = affine_map<(d0)->(d0)>} : memref<?x?xf32>, vector<128xf32>
}
@@ -541,6 +548,15 @@ func.func @test_vector.transfer_write(%arg0: memref<?x?xf32>) {
func.func @test_vector.transfer_write(%arg0: memref<?x?xf32>) {
%c3 = arith.constant 3 : index
%cst = arith.constant dense<3.0> : vector<128 x f32>
+ // expected-error@+1 {{requires 2 indices}}
+ vector.transfer_write %cst, %arg0[%c3] {permutation_map = affine_map<()->(0)>} : vector<128xf32>, memref<?x?xf32>
+}
+
+// -----
+
+func.func @test_vector.transfer_write(%arg0: memref<?x?xf32>) {
+ %c3 = arith.constant 3 : index
+ %cst = arith.constant dense<3.0> : vector<128 x f32>
// expected-error@+1 {{requires a permutation_map with input dims of the same rank as the source type}}
vector.transfer_write %cst, %arg0[%c3, %c3] {permutation_map = affine_map<(d0)->(d0)>} : vector<128xf32>, memref<?x?xf32>
}