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

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Apr 2 05:52:10 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> {
+  %c3_i32 = arith.constant 3 : i32
+  // expected-error at +1 {{expected the same rank for the vector and the results of the permutation map}}
+  %0 = vector.transfer_read %arg1[%c3_i32, %c3_i32], %c3_i32 : memref<?xindex>, vector<3x4xi32>
----------------
banach-space wrote:

I actually didn't realise that we allow different source and destination element type. This doesn't feel right. Is it in any way significant for this patch? If not, let's stick to e.g. `i32` and I can investigate mixing different element types separately.

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


More information about the Mlir-commits mailing list