1// RUN: mlir-opt %s | mlir-opt | FileCheck %s
2
3emitc.include <"test.h">
4emitc.include "test.h"
5
6// CHECK-LABEL: func @f(%{{.*}}: i32, %{{.*}}: !emitc.opaque<"int32_t">) {
7func.func @f(%arg0: i32, %f: !emitc.opaque<"int32_t">) {
8  %1 = "emitc.call"() {callee = "blah"} : () -> i64
9  emitc.call "foo" (%1) {args = [
10    0 : index, dense<[0, 1]> : tensor<2xi32>, 0 : index
11  ]} : (i64) -> ()
12  return
13}
14
15func.func @cast(%arg0: i32) {
16  %1 = emitc.cast %arg0: i32 to f32
17  return
18}
19
20func.func @c() {
21  %1 = "emitc.constant"(){value = 42 : i32} : () -> i32
22  return
23}
24
25func.func @a(%arg0: i32, %arg1: i32) {
26  %1 = "emitc.apply"(%arg0) {applicableOperator = "&"} : (i32) -> !emitc.ptr<i32>
27  %2 = emitc.apply "&"(%arg1) : (i32) -> !emitc.ptr<i32>
28  return
29}
30