File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ void call_interface_impl::printFunctionSignature(
118118 ArrayRef<NamedAttribute> attrs;
119119 if (argAttrs)
120120 attrs = llvm::cast<DictionaryAttr>(argAttrs[i]).getValue ();
121- p.printRegionArgument (body->getArgument (i), attrs);
121+ if (body->getNumArguments () > i)
122+ p.printRegionArgument (body->getArgument (i), attrs);
122123 } else {
123124 p.printType (argTypes[i]);
124125 if (argAttrs)
Original file line number Diff line number Diff line change 1+ // Bug: https://github.com/llvm/llvm-project/issues/132894
2+
3+ // RUN: mlir-opt %s | FileCheck %s
4+
5+ // CHECK: module {
6+ // CHECK: spirv.func @f() "None" {
7+ // CHECK: %c0 = arith.constant 0 : index
8+ // CHECK: spirv.Return
9+ // CHECK: }
10+ // CHECK: }
11+
12+ module {
13+ spirv.func @f (f32 ) " None" {
14+ %c0 = arith.constant 0 : index
15+ spirv.Return
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments