Skip to content

Commit ac42d46

Browse files
committed
parse empty operand bundles list
1 parent 3a8fc34 commit ac42d46

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ static std::optional<ParseResult> parseOpBundles(
289289
if (p.parseOptionalLSquare())
290290
return std::nullopt;
291291

292+
if (succeeded(p.parseOptionalRSquare()))
293+
return success();
294+
292295
auto bundleParser = [&] {
293296
return parseOneOpBundle(p, opBundleOperands, opBundleOperandTypes,
294297
opBundleTags);

mlir/test/Target/LLVMIR/llvmir.mlir

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,6 +2631,16 @@ llvm.func @intel_reqd_sub_group_size() attributes {intel_reqd_sub_group_size = 3
26312631

26322632
llvm.func @foo()
26332633

2634+
llvm.func @call_with_empty_opbundle() {
2635+
llvm.call @foo() [] : () -> ()
2636+
llvm.return
2637+
}
2638+
2639+
// CHECK: define void @call_with_empty_opbundle() {
2640+
// CHECK-NEXT: call void @foo()
2641+
// CHECK-NEXT: ret void
2642+
// CHECK-NEXT: }
2643+
26342644
llvm.func @call_with_opbundle() {
26352645
%0 = llvm.mlir.constant(1 : i32) : i32
26362646
%1 = llvm.mlir.constant(2 : i32) : i32

0 commit comments

Comments
 (0)