blob: 2da2ce0f02ec5db38d10d87a4f3be7469fd22db4 [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 88
; Schema: 0
OpCapability Shader
%41 = 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
%int_2 = OpConstant %int 2
%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
%foo = OpFunction %void None %23
%24 = OpLabel
%i = OpVariable %_ptr_Function_int Function
OpBranch %25
%25 = OpLabel
OpStore %i %int_0
OpBranch %28
%28 = OpLabel
OpLoopMerge %29 %27 None
OpBranch %26
%26 = OpLabel
%33 = OpLoad %int %i None
%34 = OpSLessThan %bool %33 %int_2
OpSelectionMerge %36 None
OpBranchConditional %34 %36 %37
%37 = OpLabel
OpBranch %29
%36 = OpLabel
%38 = OpLoad %int %i None
%39 = OpBitcast %uint %38
%40 = OpExtInst %uint %41 UMin %39 %uint_1
%43 = OpAccessChain %_ptr_Private_float %v2f %40
OpStore %43 %float_1 None
%46 = OpLoad %int %i None
%47 = OpBitcast %uint %46
%48 = OpExtInst %uint %41 UMin %47 %uint_2
%50 = OpAccessChain %_ptr_Private_int %v3i %48
OpStore %50 %int_1 None
%53 = OpLoad %int %i None
%54 = OpBitcast %uint %53
%55 = OpExtInst %uint %41 UMin %54 %uint_3
%57 = OpAccessChain %_ptr_Private_uint %v4u %55
OpStore %57 %uint_1 None
%59 = OpLoad %int %i None
%60 = OpBitcast %uint %59
%61 = OpExtInst %uint %41 UMin %60 %uint_1
%62 = OpAccessChain %_ptr_Private_bool %v2b %61
OpStore %62 %true None
OpBranch %27
%27 = OpLabel
%65 = OpLoad %int %i None
%66 = OpBitcast %uint %65
%67 = OpBitcast %uint %int_1
%68 = OpIAdd %uint %66 %67
%69 = OpBitcast %int %68
OpStore %i %69 None
OpBranch %28
%29 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%71 = OpLabel
%i_0 = OpVariable %_ptr_Function_int Function
OpBranch %72
%72 = OpLabel
OpStore %i_0 %int_0
OpBranch %75
%75 = OpLabel
OpLoopMerge %76 %74 None
OpBranch %73
%73 = OpLabel
%78 = OpLoad %int %i_0 None
%79 = OpSLessThan %bool %78 %int_2
OpSelectionMerge %80 None
OpBranchConditional %79 %80 %81
%81 = OpLabel
OpBranch %76
%80 = OpLabel
%82 = OpFunctionCall %void %foo
OpBranch %74
%74 = OpLabel
%83 = OpLoad %int %i_0 None
%84 = OpBitcast %uint %83
%85 = OpBitcast %uint %int_1
%86 = OpIAdd %uint %84 %85
%87 = OpBitcast %int %86
OpStore %i_0 %87 None
OpBranch %75
%76 = OpLabel
OpReturn
OpFunctionEnd