blob: dbb1acfba10f6cc6ea091160cff2babc01e4f1c9 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; 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"
OpName %a "a"
OpName %b "b"
%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
%_ptr_Function_int = OpTypePointer Function %int
%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
%a = OpVariable %_ptr_Function_int Function %8
%b = OpVariable %_ptr_Function_int Function %8
OpStore %a %int_1
OpStore %b %8
%27 = OpLoad %int %a
%28 = OpLoad %int %b
%26 = OpFunctionCall %int %tint_div %27 %28
OpReturn
OpFunctionEnd