[Mlir-commits] [mlir] ee9c9f3 - [mlir][vector] Add 2 invalid tests for vector.xfer Ops (#78608)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 19 00:54:16 PST 2024


Author: Andrzej WarzyƄski
Date: 2024-01-19T08:54:12Z
New Revision: ee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a

URL: https://github.com/llvm/llvm-project/commit/ee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a
DIFF: https://github.com/llvm/llvm-project/commit/ee9c9f3b9622594c4ed6f5ebdf2985d7a9a3876a.diff

LOG: [mlir][vector] Add 2 invalid tests for vector.xfer Ops (#78608)

Added: 
    

Modified: 
    mlir/test/Dialect/Vector/invalid.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Dialect/Vector/invalid.mlir b/mlir/test/Dialect/Vector/invalid.mlir
index 3bee9e0081c3b0..9c73f5a8f74a8a 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>


        


More information about the Mlir-commits mailing list