[Mlir-commits] [mlir] Print region argument only when sufficient number of args are present in body (PR #133167)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Mar 28 11:53:50 PDT 2025
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/133167
>From 06588534739e05cf11d3afdc4def35c00b471ae3 Mon Sep 17 00:00:00 2001
From: AdityaK <hiraditya at msn.com>
Date: Wed, 26 Mar 2025 14:38:25 -0700
Subject: [PATCH] Print region argument only when argAttrs are present
Fixes: #132894
---
mlir/test/Analysis/invalid-entry-block.mlir | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 mlir/test/Analysis/invalid-entry-block.mlir
diff --git a/mlir/test/Analysis/invalid-entry-block.mlir b/mlir/test/Analysis/invalid-entry-block.mlir
new file mode 100644
index 0000000000000..f0d85c5724db2
--- /dev/null
+++ b/mlir/test/Analysis/invalid-entry-block.mlir
@@ -0,0 +1,13 @@
+// Bug: https://github.com/llvm/llvm-project/issues/132894
+
+// RUN: not mlir-opt %s 2>&1 | FileCheck %s
+
+// CHECK: error: 'func.func' op entry block must have 1 arguments to match function signature
+
+module {
+ func.func @f(f32) {
+ %c0 = arith.constant 0 : index
+ return
+ }
+}
+
More information about the Mlir-commits
mailing list