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(
264
264
if (p.parseLParen ())
265
265
return failure ();
266
266
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
+ }
276
272
277
273
opBundleOperands.push_back (std::move (operands));
278
274
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() {
2641
2641
// CHECK-NEXT: ret void
2642
2642
// CHECK-NEXT: }
2643
2643
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
+
2644
2654
llvm.func @call_with_opbundle () {
2645
2655
%0 = llvm.mlir.constant (1 : i32 ) : i32
2646
2656
%1 = llvm.mlir.constant (2 : i32 ) : i32
You can’t perform that action at this time.
0 commit comments