xref: /llvm-project/mlir/test/Transforms/test-convert-call-op.mlir (revision 610c7617147ab05d03306b7412c77a336da2784a)
1// RUN: mlir-opt %s -test-convert-call-op | FileCheck %s
2
3// CHECK-LABEL: llvm.func @callee(!llvm.ptr) -> i32
4func.func private @callee(!test.test_type) -> i32
5
6// CHECK-NEXT: llvm.func @caller() -> i32
7func.func @caller() -> i32 {
8  %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.zero : !llvm.ptr
13// CHECK-NEXT: [[OUT:%.*]] = llvm.call @callee([[ARG]])
14// CHECK-SAME:     : (!llvm.ptr) -> i32
15