[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:11 PDT 2025
================
@@ -525,6 +525,24 @@ func.func @test_vector.transfer_read(%arg0: memref<?x?xvector<2x3xf32>>) {
// -----
+func.func @test_vector.transfer_read(%arg1: memref<?xindex>) -> 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<?xindex>, vector<3x4xi32>
+ return %0 : vector<3x4xi32>
+}
+
+// -----
+
+func.func @test_vector.transfer_read(%arg1: memref<?xindex>) -> vector<3x4xindex> {
+ %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<?xindex>, vector<3x4xindex>
+ return %0 : vector<3x4xindex>
+}
----------------
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_read(%arg1: memref<?xindex>) -> vector<3x4xindex> {
%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<?xindex>, vector<3x4xindex>
return %0 : vector<3x4xindex>
}
```
https://github.com/llvm/llvm-project/pull/133721
More information about the Mlir-commits
mailing list