[Mlir-commits] [mlir] [mlir][vector] Fix parser of vector.transfer_read (PR #133721)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Apr 3 09:00:19 PDT 2025
================
@@ -4260,6 +4264,10 @@ ParseResult TransferReadOp::parse(OpAsmParser &parser, OperationState &result) {
AffineMap permMap;
if (!permMapAttr) {
permMap = getTransferMinorIdentityMap(shapedType, vectorType);
+ if (!permMap) {
+ return parser.emitError(
+ typesLoc, "failed to create a minor identity map, source rank is less than required for vector rank");
----------------
douyixuan wrote:
Initially, I removed the `elementVectorRank` calculation since the snippet was repetitive. I noticed there might be other instances where an invalid `permMap` is returned from `getPermutationMapAttrName`. Following your suggestion, I added the snippet, which seems more reasonable now.
https://github.com/llvm/llvm-project/pull/133721
More information about the Mlir-commits
mailing list