[Mlir-commits] [mlir] [mlir][vector] Fix parser of vector.transfer_read (PR #133721)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Apr 14 22:36:12 PDT 2025


================
@@ -646,6 +664,22 @@ func.func @test_vector.transfer_write(%arg0: memref<?xf32>, %arg1: vector<7xf32>
 
 // -----
 
+func.func @test_vector.transfer_write(%vec_to_write: vector<3x4xi32>, %output_memref: memref<?xindex>) {
+  %c3 = arith.constant 3 : index
+  // expected-error at +1 {{expected a custom permutation_map when rank(source) != rank(destination)}}
+  vector.transfer_write %vec_to_write, %output_memref[%c3, %c3] : vector<3x4xi32>, memref<?xindex>
+}
+
+// -----
+
+func.func @test_vector.transfer_write(%vec_to_write: vector<3x4xindex>, %output_memref: memref<?xindex>) {
+  %c3 = arith.constant 3 : index
+  // expected-error at +1 {{expected a custom permutation_map when rank(source) != rank(destination)}}
+  vector.transfer_write %vec_to_write, %output_memref[%c3, %c3] : vector<3x4xindex>, memref<?xindex>
+}
----------------
banach-space wrote:

My comment for these tests has not been addressed yet (re mixing types), hence commenting through a "suggestion" (to avoid confusion):
```suggestion
func.func @test_vector.transfer_write(%vec_to_write: vector<3x4xindex>, %output_memref: memref<?xindex>) {
  %c3 = arith.constant 3 : index
  // expected-error at +1 {{expected a custom permutation_map when rank(source) != rank(destination)}}
  vector.transfer_write %vec_to_write, %output_memref[%c3, %c3] : vector<3x4xindex>, memref<?xindex>
}
```

https://github.com/llvm/llvm-project/pull/133721


More information about the Mlir-commits mailing list