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