blob: c45b758e6ff15031650b3f9239351f2ac8e533d9 [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 74
; Schema: 0
OpCapability Shader
%31 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %v2f "v2f"
OpName %v3i "v3i"
OpName %v4u "v4u"
OpName %v2b "v2b"
OpName %foo "foo"
OpName %i "i"
OpName %main "main"
OpName %i_0 "i"
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%_ptr_Private_v2float = OpTypePointer Private %v2float
%5 = OpConstantNull %v2float
%v2f = OpVariable %_ptr_Private_v2float Private %5
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%_ptr_Private_v3int = OpTypePointer Private %v3int
%10 = OpConstantNull %v3int
%v3i = OpVariable %_ptr_Private_v3int Private %10
%uint = OpTypeInt 32 0
%v4uint = OpTypeVector %uint 4
%_ptr_Private_v4uint = OpTypePointer Private %v4uint
%15 = OpConstantNull %v4uint
%v4u = OpVariable %_ptr_Private_v4uint Private %15
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%_ptr_Private_v2bool = OpTypePointer Private %v2bool
%20 = OpConstantNull %v2bool
%v2b = OpVariable %_ptr_Private_v2bool Private %20
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%int_0 = OpConstant %int 0
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%float_1 = OpConstant %float 1
%uint_2 = OpConstant %uint 2
%_ptr_Private_int = OpTypePointer Private %int
%int_1 = OpConstant %int 1
%uint_3 = OpConstant %uint 3
%_ptr_Private_uint = OpTypePointer Private %uint
%_ptr_Private_bool = OpTypePointer Private %bool
%true = OpConstantTrue %bool
%int_2 = OpConstant %int 2
%foo = OpFunction %void None %23
%24 = OpLabel
%i = OpVariable %_ptr_Function_int Function
OpStore %i %int_0
%28 = OpLoad %int %i None
%29 = OpBitcast %uint %28
%30 = OpExtInst %uint %31 UMin %29 %uint_1
%33 = OpAccessChain %_ptr_Private_float %v2f %30
OpStore %33 %float_1 None
%36 = OpLoad %int %i None
%37 = OpBitcast %uint %36
%38 = OpExtInst %uint %31 UMin %37 %uint_2
%40 = OpAccessChain %_ptr_Private_int %v3i %38
OpStore %40 %int_1 None
%43 = OpLoad %int %i None
%44 = OpBitcast %uint %43
%45 = OpExtInst %uint %31 UMin %44 %uint_3
%47 = OpAccessChain %_ptr_Private_uint %v4u %45
OpStore %47 %uint_1 None
%49 = OpLoad %int %i None
%50 = OpBitcast %uint %49
%51 = OpExtInst %uint %31 UMin %50 %uint_1
%52 = OpAccessChain %_ptr_Private_bool %v2b %51
OpStore %52 %true None
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%56 = OpLabel
%i_0 = OpVariable %_ptr_Function_int Function
OpBranch %57
%57 = OpLabel
OpStore %i_0 %int_0
OpBranch %60
%60 = OpLabel
OpLoopMerge %61 %59 None
OpBranch %58
%58 = OpLabel
%63 = OpLoad %int %i_0 None
%64 = OpSLessThan %bool %63 %int_2
OpSelectionMerge %66 None
OpBranchConditional %64 %66 %67
%67 = OpLabel
OpBranch %61
%66 = OpLabel
%68 = OpFunctionCall %void %foo
OpBranch %59
%59 = OpLabel
%69 = OpLoad %int %i_0 None
%70 = OpBitcast %uint %69
%71 = OpBitcast %uint %int_1
%72 = OpIAdd %uint %70 %71
%73 = OpBitcast %int %72
OpStore %i_0 %73 None
OpBranch %60
%61 = OpLabel
OpReturn
OpFunctionEnd