[Mlir-commits] [mlir] [mlir][vector] Fix parser of vector.transfer_read (PR #133721)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Apr 2 08:42:27 PDT 2025
================
@@ -164,6 +164,10 @@ AffineMap mlir::vector::getTransferMinorIdentityMap(ShapedType shapedType,
return AffineMap::get(
/*numDims=*/0, /*numSymbols=*/0,
getAffineConstantExpr(0, shapedType.getContext()));
+ if (shapedType.getRank() < vectorType.getRank() - elementVectorRank) {
+ return AffineMap(); // Not enough dimensions in the shaped type to form a
----------------
douyixuan wrote:
Yes, a test would be like this:
```
func.func @test_vector.transfer_read(%arg1: memref<?xvector<2xindex>>) -> vector<3x4xi32> {
%c3_i32 = arith.constant 3 : i32
%0 = vector.transfer_read %arg1[%c3_i32, %c3_i32], %c3_i32
: memref<?xvector<2xindex>>, vector<3x4xi32>
return %0 : vector<3x4xi32>
}
```
https://github.com/llvm/llvm-project/pull/133721
More information about the Mlir-commits
mailing list