blob: 162cf507bbd6c77e41e08523b9bd30cab467e96e [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %tint_div "tint_div"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %f "f"
%int = OpTypeInt 32 1
%1 = OpTypeFunction %int %int %int
%8 = OpConstantNull %int
%bool = OpTypeBool
%int_n2147483648 = OpConstant %int -2147483648
%int_n1 = OpConstant %int -1
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%19 = OpTypeFunction %void
%tint_div = OpFunction %int None %1
%lhs = OpFunctionParameter %int
%rhs = OpFunctionParameter %int
%6 = OpLabel
%9 = OpIEqual %bool %rhs %8
%12 = OpIEqual %bool %lhs %int_n2147483648
%14 = OpIEqual %bool %rhs %int_n1
%15 = OpLogicalAnd %bool %12 %14
%16 = OpLogicalOr %bool %9 %15
%7 = OpSelect %int %16 %int_1 %rhs
%18 = OpSDiv %int %lhs %7
OpReturnValue %18
OpFunctionEnd
%f = OpFunction %void None %19
%22 = OpLabel
%23 = OpFunctionCall %int %tint_div %int_1 %8
OpReturn
OpFunctionEnd