|
| 1 | +// RUN: not mlir-runner %s -e entry_point_void -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-POINT-VOID |
| 2 | +// RUN: not mlir-runner %s -e entry_inputs_void -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-INPUTS-VOID |
| 3 | +// RUN: not mlir-runner %s -e entry_result_void -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-VOID |
| 4 | +// RUN: not mlir-runner %s -e entry_point_i32 -entry-point-result=i32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-POINT-I32 |
| 5 | +// RUN: not mlir-runner %s -e entry_inputs_i32 -entry-point-result=i32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-INPUTS-I32 |
| 6 | +// RUN: not mlir-runner %s -e entry_result_i32 -entry-point-result=i32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-I32 |
| 7 | +// RUN: not mlir-runner %s -e entry_result_i64 -entry-point-result=i64 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-I64 |
| 8 | +// RUN: not mlir-runner %s -e entry_result_f32 -entry-point-result=f32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-F32 |
| 9 | + |
| 10 | +// CHECK-ENTRY-POINT-VOID: Error: entry point not found |
| 11 | +llvm.func @entry_point_void() -> () |
| 12 | + |
| 13 | +// CHECK-ENTRY-INPUTS-VOID: Error: JIT can't invoke a main function expecting arguments |
| 14 | +llvm.func @entry_inputs_void(%arg0: i32) { |
| 15 | + llvm.return |
| 16 | +} |
| 17 | + |
| 18 | +// CHECK-ENTRY-RESULT-VOID: Error: expected void function |
| 19 | +llvm.func @entry_result_void() -> (i32) { |
| 20 | + %0 = llvm.mlir.constant(0 : index) : i32 |
| 21 | + llvm.return %0 : i32 |
| 22 | +} |
| 23 | + |
| 24 | +// CHECK-ENTRY-POINT-I32: Error: entry point not found |
| 25 | +llvm.func @entry_point_i32() -> (i32) |
| 26 | + |
| 27 | +// CHECK-ENTRY-INPUTS-I32: Error: JIT can't invoke a main function expecting arguments |
| 28 | +llvm.func @entry_inputs_i32(%arg0: i32) { |
| 29 | + llvm.return |
| 30 | +} |
| 31 | + |
| 32 | +// CHECK-ENTRY-RESULT-I32: Error: only single i32 function result supported |
| 33 | +llvm.func @entry_result_i32() -> (i64) { |
| 34 | + %0 = llvm.mlir.constant(0 : index) : i64 |
| 35 | + llvm.return %0 : i64 |
| 36 | +} |
| 37 | + |
| 38 | +// CHECK-ENTRY-RESULT-I64: Error: only single i64 function result supported |
| 39 | +llvm.func @entry_result_i64() -> (i32) { |
| 40 | + %0 = llvm.mlir.constant(0 : index) : i32 |
| 41 | + llvm.return %0 : i32 |
| 42 | +} |
| 43 | + |
| 44 | +// CHECK-ENTRY-RESULT-F32: Error: only single f32 function result supported |
| 45 | +llvm.func @entry_result_f32() -> (i32) { |
| 46 | + %0 = llvm.mlir.constant(0 : index) : i32 |
| 47 | + llvm.return %0 : i32 |
| 48 | +} |
0 commit comments