File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -264,15 +264,11 @@ static ParseResult parseOneOpBundle(
264264 if (p.parseLParen ())
265265 return failure ();
266266
267- if (p.parseOperandList (operands))
268- return failure ();
269- if (p.parseColon ())
270- return failure ();
271- if (p.parseTypeList (types))
272- return failure ();
273-
274- if (p.parseRParen ())
275- return failure ();
267+ if (p.parseOptionalRParen ()) {
268+ if (p.parseOperandList (operands) || p.parseColon () ||
269+ p.parseTypeList (types) || p.parseRParen ())
270+ return failure ();
271+ }
276272
277273 opBundleOperands.push_back (std::move (operands));
278274 opBundleOperandTypes.push_back (std::move (types));
Original file line number Diff line number Diff line change @@ -2641,6 +2641,16 @@ llvm.func @call_with_empty_opbundle() {
26412641// CHECK-NEXT: ret void
26422642// CHECK-NEXT: }
26432643
2644+ llvm.func @call_with_empty_opbundle_operands () {
2645+ llvm.call @foo () [" tag" ()] : () -> ()
2646+ llvm.return
2647+ }
2648+
2649+ // CHECK: define void @call_with_empty_opbundle_operands() {
2650+ // CHECK-NEXT: call void @foo() [ "tag"() ]
2651+ // CHECK-NEXT: ret void
2652+ // CHECK-NEXT: }
2653+
26442654llvm.func @call_with_opbundle () {
26452655 %0 = llvm.mlir.constant (1 : i32 ) : i32
26462656 %1 = llvm.mlir.constant (2 : i32 ) : i32
You can’t perform that action at this time.
0 commit comments