blob: 9fbd92f974707dab879165ef1fe2b77338f1dbde [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 25
; 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"
%uint = OpTypeInt 32 0
%1 = OpTypeFunction %uint %uint %uint
%8 = OpConstantNull %uint
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%13 = OpTypeFunction %void
%_ptr_Function_uint = OpTypePointer Function %uint
%tint_div = OpFunction %uint None %1
%lhs = OpFunctionParameter %uint
%rhs = OpFunctionParameter %uint
%6 = OpLabel
%9 = OpIEqual %bool %rhs %8
%7 = OpSelect %uint %9 %uint_1 %rhs
%12 = OpUDiv %uint %lhs %7
OpReturnValue %12
OpFunctionEnd
%f = OpFunction %void None %13
%16 = OpLabel
%a = OpVariable %_ptr_Function_uint Function %8
%b = OpVariable %_ptr_Function_uint Function %8
OpStore %a %uint_1
OpStore %b %8
%21 = OpLoad %uint %a
%22 = OpLoad %uint %b
%23 = OpLoad %uint %b
%24 = OpIAdd %uint %22 %23
%20 = OpFunctionCall %uint %tint_div %21 %24
OpReturn
OpFunctionEnd