[Mlir-commits] [mlir] [mlir][vector] Decline in the parsers instead of asserting on bad input (PR #219917)

Alessandro Potenza llvmlistbot at llvm.org
Mon Aug 31 02:03:39 PDT 2026


alepot55 wrote:

@banach-space @dcaballe, you two approved #133434, which fixed the unchecked `iterator_types` cast in this same `vector.contract` parser, so tagging you rather than guessing. @newling and @kuhar if you have an interest, you have the most history in this file over the past year.

The `outerproduct` hunk is the one worth a second look. It only rejects rank 0, not every rank other than 1, because rank 0 is the only case the parser itself cannot survive: it reads `getScalableDims()[0]` and `getDimSize(0)` to build the result type. Anything of rank 2 or higher still reaches `OuterProductOp::verify`, which already rejects it with the same wording, and `@outerproduct_num_dims_mismatch` keeps exercising that path. My first attempt used `getRank() != 1` and broke exactly that test, which is what led to the narrower condition.


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


More information about the Mlir-commits mailing list