[Mlir-commits] [mlir] [mlir][vector] Add 2 invalid tests for vector.xfer Ops (PR #78608)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jan 18 10:19:44 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Andrzej WarzyĆski (banach-space)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/78608.diff
1 Files Affected:
- (modified) mlir/test/Dialect/Vector/invalid.mlir (+18-2)
``````````diff
diff --git a/mlir/test/Dialect/Vector/invalid.mlir b/mlir/test/Dialect/Vector/invalid.mlir
index 3bee9e0081c3b08..9c73f5a8f74a8a4 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 at +1 {{custom op 'vector.broadcast' invalid kind of type specified}}
%0 = vector.broadcast %arg0 : f32 to f32
@@ -383,6 +381,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 at +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
@@ -538,6 +545,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 at +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>
``````````
</details>
https://github.com/llvm/llvm-project/pull/78608
More information about the Mlir-commits
mailing list