1 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
4 ; CHECK-DAG: %[[#I32:]] = OpTypeInt 32
5 ; CHECK-DAG: %[[#F32:]] = OpTypeFloat 32
6 ; CHECK-DAG: %[[#FNI32:]] = OpTypeFunction %[[#I32]] %[[#I32]]
7 ; CHECK-DAG: %[[#FNF32:]] = OpTypeFunction %[[#F32]] %[[#F32]]
9 ;; Function declarations:
10 ; CHECK: %[[#ANON0:]] = OpFunction %[[#I32]] None %[[#FNI32]]
11 ; CHECK-NEXT: OpFunctionParameter %[[#I32]]
13 ; CHECK-NEXT: OpReturnValue
14 ; CHECK-NEXT: OpFunctionEnd
15 define internal spir_func i32 @0(i32 %a) {
19 ; CHECK: %[[#ANON1:]] = OpFunction %[[#F32]] None %[[#FNF32]]
20 ; CHECK-NEXT: OpFunctionParameter %[[#F32]]
22 ; CHECK-NEXT: OpReturnValue
23 ; CHECK-NEXT: OpFunctionEnd
24 define internal spir_func float @1(float %a) {
29 ; CHECK: OpFunctionCall %[[#I32]] %[[#ANON0]]
30 ; CHECK: OpFunctionCall %[[#F32]] %[[#ANON1]]
31 define spir_kernel void @foo(i32 %a) {
32 %call1 = call spir_func i32 @0(i32 %a)
33 %b = sitofp i32 %a to float
34 %call2 = call spir_func float @1(float %b)