Skip to content

Commit ccc09ed

Browse files
authored
add test
1 parent 41d9613 commit ccc09ed

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

mlir/test/mlir-runner/verify-entry-point-result.mlir

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: not mlir-runner %s -e entry_point -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-POINT
2+
// RUN: not mlir-runner %s -e entry_inputs -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-INPUTS
3+
// RUN: not mlir-runner %s -e entry_result -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT
4+
5+
// CHECK-ENTRY-POINT: Error: entry point not found
6+
llvm.func @entry_point() -> ()
7+
8+
// CHECK-ENTRY-INPUTS: Error: function inputs not supported
9+
llvm.func @entry_inputs(%arg0: i32) {
10+
llvm.return
11+
}
12+
13+
// CHECK-ENTRY-RESULT: Error: expected void function
14+
llvm.func @entry_result() -> (i32) {
15+
%0 = llvm.mlir.constant(0 : index) : i32
16+
llvm.return %0 : i32
17+
}

0 commit comments

Comments
 (0)