blob: 309df1fecdc9dc2093d2d1c351ead0f7aab9d540 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %global "global"
OpName %unused_entry_point "unused_entry_point"
OpName %tint_ftoi "tint_ftoi"
OpName %v "v"
OpName %foo "foo"
OpName %x "x"
OpName %baz "baz"
OpName %x_0 "x"
OpName %bar "bar"
OpName %x_1 "x"
OpName %main "main"
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%4 = OpConstantNull %int
%global = OpVariable %_ptr_Private_int Private %4
%void = OpTypeVoid
%5 = OpTypeFunction %void
%float = OpTypeFloat 32
%9 = OpTypeFunction %int %float
%float_2_14748352e_09 = OpConstant %float 2.14748352e+09
%bool = OpTypeBool
%float_n2_14748365e_09 = OpConstant %float -2.14748365e+09
%int_n2147483648 = OpConstant %int -2147483648
%int_2147483647 = OpConstant %int 2147483647
%24 = OpTypeFunction %void %float
%31 = OpTypeFunction %int %int
%int_42 = OpConstant %int 42
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%tint_ftoi = OpFunction %int None %9
%v = OpFunctionParameter %float
%13 = OpLabel
%16 = OpFOrdLessThan %bool %v %float_2_14748352e_09
%20 = OpFOrdLessThan %bool %v %float_n2_14748365e_09
%22 = OpConvertFToS %int %v
%18 = OpSelect %int %20 %int_n2147483648 %22
%14 = OpSelect %int %16 %18 %int_2147483647
OpReturnValue %14
OpFunctionEnd
%foo = OpFunction %void None %24
%x = OpFunctionParameter %float
%27 = OpLabel
%29 = OpFunctionCall %int %tint_ftoi %x
OpSelectionMerge %28 None
OpSwitch %29 %30
%30 = OpLabel
OpBranch %28
%28 = OpLabel
OpReturn
OpFunctionEnd
%baz = OpFunction %int None %31
%x_0 = OpFunctionParameter %int
%34 = OpLabel
OpStore %global %int_42
OpReturnValue %x_0
OpFunctionEnd
%bar = OpFunction %void None %24
%x_1 = OpFunctionParameter %float
%38 = OpLabel
%41 = OpFunctionCall %int %tint_ftoi %x_1
%40 = OpFunctionCall %int %baz %41
OpSelectionMerge %39 None
OpSwitch %40 %42
%42 = OpLabel
OpBranch %39
%39 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %5
%44 = OpLabel
OpReturn
OpFunctionEnd