49 lines · plain
1// RUN: not mlir-runner %s -e entry_point_void -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-POINT-VOID2// RUN: not mlir-runner %s -e entry_inputs_void -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-INPUTS-VOID3// RUN: not mlir-runner %s -e entry_result_void -entry-point-result=void 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-VOID4// RUN: not mlir-runner %s -e entry_point_i32 -entry-point-result=i32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-POINT-I325// RUN: not mlir-runner %s -e entry_inputs_i32 -entry-point-result=i32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-INPUTS-I326// RUN: not mlir-runner %s -e entry_result_i32 -entry-point-result=i32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-I327// RUN: not mlir-runner %s -e entry_result_i64 -entry-point-result=i64 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-I648// RUN: not mlir-runner %s -e entry_result_f32 -entry-point-result=f32 2>&1 | FileCheck %s --check-prefix=CHECK-ENTRY-RESULT-F329 10// CHECK-ENTRY-POINT-VOID: Error: entry point not found11llvm.func @entry_point_void() -> ()12 13// CHECK-ENTRY-INPUTS-VOID: Error: JIT can't invoke a main function expecting arguments14llvm.func @entry_inputs_void(%arg0: i32) {15 llvm.return16}17 18// CHECK-ENTRY-RESULT-VOID: Error: expected void function19llvm.func @entry_result_void() -> (i32) {20 %0 = llvm.mlir.constant(0 : index) : i3221 llvm.return %0 : i3222}23 24// CHECK-ENTRY-POINT-I32: Error: entry point not found25llvm.func @entry_point_i32() -> (i32)26 27// CHECK-ENTRY-INPUTS-I32: Error: JIT can't invoke a main function expecting arguments28llvm.func @entry_inputs_i32(%arg0: i32) {29 llvm.return30}31 32// CHECK-ENTRY-RESULT-I32: Error: only single i32 function result supported33llvm.func @entry_result_i32() -> (i64) {34 %0 = llvm.mlir.constant(0 : index) : i6435 llvm.return %0 : i6436}37 38// CHECK-ENTRY-RESULT-I64: Error: only single i64 function result supported39llvm.func @entry_result_i64() -> (i32) {40 %0 = llvm.mlir.constant(0 : index) : i3241 llvm.return %0 : i3242}43 44// CHECK-ENTRY-RESULT-F32: Error: only single f32 function result supported45llvm.func @entry_result_f32() -> (i32) {46 %0 = llvm.mlir.constant(0 : index) : i3247 llvm.return %0 : i3248}49