Skip to content

Commit 9acfb95

Browse files
committed
add test for operand bundle verifier
1 parent ac42d46 commit 9acfb95

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

mlir/test/Dialect/LLVMIR/invalid.mlir

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,3 +1665,18 @@ llvm.func @wrong_number_of_bundle_types() {
16651665
llvm.call @foo() ["tag"(%0 : i32, i32)] : () -> ()
16661666
llvm.return
16671667
}
1668+
1669+
// -----
1670+
1671+
llvm.func @foo()
1672+
llvm.func @wrong_number_of_bundle_tags() {
1673+
%0 = llvm.mlir.constant(0 : i32) : i32
1674+
%1 = llvm.mlir.constant(1 : i32) : i32
1675+
// expected-error@+1 {{expected 2 operand bundle tags, but actually got 1}}
1676+
"llvm.call"(%0, %1) <{ op_bundle_tags = ["tag"] }> {
1677+
callee = @foo,
1678+
operandSegmentSizes = array<i32: 0, 2>,
1679+
op_bundle_sizes = array<i32: 1, 1>
1680+
} : (i32, i32) -> ()
1681+
llvm.return
1682+
}

0 commit comments

Comments
 (0)