blob: f5525439a695c91f71abfd46b66c5e94117adc91 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %tint_mod "tint_mod"
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
%uint = OpTypeInt 32 0
%uint_2147483648 = OpConstant %uint 2147483648
%24 = OpConstantNull %uint
%void = OpTypeVoid
%33 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%tint_mod = 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
%21 = OpBitwiseOr %int %lhs %7
%19 = OpBitcast %uint %21
%23 = OpBitwiseAnd %uint %19 %uint_2147483648
%25 = OpINotEqual %bool %23 %24
OpSelectionMerge %26 None
OpBranchConditional %25 %27 %28
%27 = OpLabel
%29 = OpSDiv %int %lhs %7
%30 = OpIMul %int %29 %7
%31 = OpISub %int %lhs %30
OpReturnValue %31
%28 = OpLabel
%32 = OpSRem %int %lhs %7
OpReturnValue %32
%26 = OpLabel
OpReturnValue %8
OpFunctionEnd
%f = OpFunction %void None %33
%36 = OpLabel
%a = OpVariable %_ptr_Function_int Function %8
%b = OpVariable %_ptr_Function_int Function %8
OpStore %a %int_1
OpStore %b %8
%41 = OpLoad %int %a
%42 = OpLoad %int %b
%40 = OpFunctionCall %int %tint_mod %41 %42
OpReturn
OpFunctionEnd