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

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Apr 8 07:51:53 PDT 2025


================
@@ -525,6 +525,15 @@ func.func @test_vector.transfer_read(%arg0: memref<?x?xvector<2x3xf32>>) {
 
 // -----
 
+func.func @test_vector.transfer_read(%arg1: memref<?xindex>) -> vector<3x4xi32> {
----------------
banach-space wrote:

>From the point of view of the issue that you are fixing, the underlying element type is not relevant. Hence, this should be totally sufficient:
```
func.func @test_vector.transfer_read(%arg1: memref<?xi32>) -> vector<3x4xi32> {
  %c3 = arith.constant 3 : index
  // expected-error at +1 {{expected a custom permutation_map when rank(source) != rank(destination)}}
  %0 = vector.transfer_read %arg1[%c3, %c3], %c3 : memref<?xi32>, vector<3x4xi32>
  return %0 : vector<3x4xi32>
}
```

> Should I include an additional test case specifically for i32?

One test case per Op (using either `i32` or `index` for all element types) will be sufficient.

Thanks for asking!

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


More information about the Mlir-commits mailing list