• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; SPIR-V
2; Version: 1.0
3; Generator: Khronos SPIR-V Tools Assembler; 0
4; Bound: 31
5; Schema: 0
6               OpCapability Addresses
7               OpCapability Linkage
8               OpCapability Kernel
9               OpCapability Int64
10               OpMemoryModel Physical64 OpenCL
11               OpEntryPoint Kernel %1 "lifetime_simple"
12               OpName %res "res"
13               OpName %lhs "lhs"
14               OpName %rhs "rhs"
15               OpDecorate %5 FuncParamAttr NoCapture
16          %5 = OpDecorationGroup
17               OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
18               OpDecorate %gl_GlobalInvocationID Constant
19               OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
20               OpGroupDecorate %5 %res %lhs %rhs
21      %ulong = OpTypeInt 64 0
22    %v3ulong = OpTypeVector %ulong 3
23%_ptr_UniformConstant_v3ulong = OpTypePointer UniformConstant %v3ulong
24       %bool = OpTypeBool
25       %void = OpTypeVoid
26       %uint = OpTypeInt 32 0
27   %ulong_32 = OpConstant %ulong 32
28     %uint_0 = OpConstant %uint 0
29%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
30%_ptr_Function_uint = OpTypePointer Function %uint
31         %17 = OpTypeFunction %void %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint
32%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3ulong UniformConstant
33          %1 = OpFunction %void None %17
34        %res = OpFunctionParameter %_ptr_CrossWorkgroup_uint
35        %lhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
36        %rhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
37         %18 = OpLabel
38         %19 = OpVariable %_ptr_Function_uint Function
39         %20 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0
40         %21 = OpCompositeExtract %ulong %20 0
41         %22 = OpShiftLeftLogical %ulong %21 %ulong_32
42         %23 = OpShiftRightArithmetic %ulong %22 %ulong_32
43         %24 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %lhs %23
44         %25 = OpLoad %uint %24 Aligned 4
45         %26 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %rhs %23
46         %27 = OpLoad %uint %26 Aligned 4
47         %28 = OpISub %uint %25 %27
48               OpLifetimeStart %19 0
49               OpStore %19 %28
50         %29 = OpLoad %uint %19
51               OpLifetimeStop %19 0
52         %30 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %res %23
53               OpStore %30 %29 Aligned 4
54               OpReturn
55               OpFunctionEnd
56