[Mlir-commits] [mlir] [mlir] Add test for invalid entry block (PR #133167)

Mehdi Amini llvmlistbot at llvm.org
Sun Mar 30 06:19:03 PDT 2025


================
@@ -118,7 +118,8 @@ void call_interface_impl::printFunctionSignature(
       ArrayRef<NamedAttribute> attrs;
       if (argAttrs)
         attrs = llvm::cast<DictionaryAttr>(argAttrs[i]).getValue();
-      p.printRegionArgument(body->getArgument(i), attrs);
+      if (body->getNumArguments() > i)
+        p.printRegionArgument(body->getArgument(i), attrs);
----------------
joker-eph wrote:

MLIR does not error on the IR from the bug, it crashes. Hence my comment: " We should have a verifier instead".

This is a problem with the spirv::FuncOp.

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


More information about the Mlir-commits mailing list