• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; SPIR-V
2; Version: 1.0
3; Generator: Khronos SPIR-V Tools Assembler; 0
4; Bound: 33
5; Schema: 0
6               OpCapability Addresses
7               OpCapability Linkage
8               OpCapability Kernel
9               OpCapability Int64
10               OpMemoryModel Physical64 OpenCL
11               OpEntryPoint Kernel %1 "phi_2" %gl_GlobalInvocationID
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_Input_v3ulong = OpTypePointer Input %v3ulong
24   %ulong_32 = OpConstant %ulong 32
25       %bool = OpTypeBool
26       %void = OpTypeVoid
27       %uint = OpTypeInt 32 0
28%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
29         %15 = OpTypeFunction %void %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint
30%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input
31          %1 = OpFunction %void None %15
32        %res = OpFunctionParameter %_ptr_CrossWorkgroup_uint
33        %lhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
34        %rhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
35         %16 = OpLabel
36         %17 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0
37         %18 = OpCompositeExtract %ulong %17 0
38         %19 = OpShiftLeftLogical %ulong %18 %ulong_32
39         %20 = OpShiftRightArithmetic %ulong %19 %ulong_32
40         %21 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %lhs %20
41         %22 = OpLoad %uint %21 Aligned 4
42         %23 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %rhs %20
43         %24 = OpLoad %uint %23 Aligned 4
44         %25 = OpSLessThan %bool %22 %24
45               OpBranchConditional %25 %26 %27
46         %26 = OpLabel
47         %28 = OpISub %uint %24 %22
48               OpBranch %29
49         %27 = OpLabel
50         %30 = OpISub %uint %22 %24
51               OpBranch %29
52         %29 = OpLabel
53         %31 = OpPhi %uint %28 %26 %30 %27
54         %32 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %res %20
55               OpStore %32 %31 Aligned 4
56               OpReturn
57               OpFunctionEnd
58