• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: mlir-opt %s -test-convert-call-op | FileCheck %s
2
3// CHECK-LABEL: llvm.func @callee(!llvm.ptr<i8>) -> !llvm.i32
4func private @callee(!test.test_type) -> i32
5
6// CHECK-NEXT: llvm.func @caller() -> !llvm.i32
7func @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.null : !llvm.ptr<i8>
13// CHECK-NEXT: [[OUT:%.*]] = llvm.call @callee([[ARG]])
14// CHECK-SAME:     : (!llvm.ptr<i8>) -> !llvm.i32
15