1 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
3 ; CHECK-DAG: OpCapability Addresses
5 ; CHECK-DAG: OpCapability Linkage
6 define spir_func void @func_export(i32 addrspace(1)* nocapture %a) {
8 ; CHECK-DAG: OpCapability Int64
9 %call = tail call spir_func i64 @_Z13get_global_idj(i32 0)
10 %cmp = icmp eq i64 %call, 0
11 br i1 %cmp, label %if.then, label %if.end
13 if.then: ; preds = %entry
14 store i32 1, i32 addrspace(1)* %a, align 4
17 if.end: ; preds = %if.then, %entry
21 declare spir_func i64 @_Z13get_global_idj(i32)
23 ; CHECK-DAG: OpCapability Kernel
24 ; CHECK-NOT: OpCapability Shader
25 ; CHECK-NOT: OpCapability Float64
26 define spir_kernel void @func_kernel(i32 addrspace(1)* %a) {
28 tail call spir_func void @func_import(i32 addrspace(1)* %a)
32 declare spir_func void @func_import(i32 addrspace(1)*)