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