blob: f8da5f91d3c8f0cd741ba3ac5e14ca85589bc3ba [file] [log] [blame]
Alexander Belyaevfed9ff52020-08-13 16:53:071// RUN: mlir-opt %s -test-convert-call-op | FileCheck %s
2
Alex Zinenko2230bf92021-01-06 15:19:043// CHECK-LABEL: llvm.func @callee(!llvm.ptr<i8>) -> i32
River Riddlecda6aa72022-04-20 23:22:214func.func private @callee(!test.test_type) -> i32
Alexander Belyaevfed9ff52020-08-13 16:53:075
Alex Zinenko2230bf92021-01-06 15:19:046// CHECK-NEXT: llvm.func @caller() -> i32
River Riddlecda6aa72022-04-20 23:22:217func.func @caller() -> i32 {
Alexander Belyaevfed9ff52020-08-13 16:53:078 %arg = "test.type_producer"() : () -> !test.test_type
9 %out = call @callee(%arg) : (!test.test_type) -> i32
10 return %out : i32
11}
12// CHECK-NEXT: [[ARG:%.*]] = llvm.mlir.null : !llvm.ptr<i8>
13// CHECK-NEXT: [[OUT:%.*]] = llvm.call @callee([[ARG]])
Alex Zinenko2230bf92021-01-06 15:19:0414// CHECK-SAME: : (!llvm.ptr<i8>) -> i32