[Mlir-commits] [mlir] [mlir][linalg] Fix crashes in parser on linalg ops without operands (PR #97944)

Matthias Springer llvmlistbot at llvm.org
Sun Jul 7 04:03:26 PDT 2024


================
@@ -455,6 +455,18 @@ func.func @map_input_output_shape_mismatch(
 
 // -----
 
+func.func @map_no_operands(
+    %lhs: tensor<64xf32>, %rhs: tensor<64xf32>, %init: tensor<64xf32>)
+    -> tensor<64xf32> {
+  // This must not crash the parser.
+  linalg.map { arith.addf }
----------------
matthias-springer wrote:

Maybe it stops verifying after the first error. Also the `cannot name an operation with no results` is not an op verifier error. It may not even get to the op verification phase.


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


More information about the Mlir-commits mailing list