blob: 1b111ccf94731e7ad86ee60660111ff8b05d6cbd [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %f "f"
OpName %a "a"
OpName %b "b"
OpName %r "r"
OpName %tint_mod_i32 "tint_mod_i32"
OpName %lhs "lhs"
OpName %rhs "rhs"
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%23 = OpTypeFunction %int %int %int
%bool = OpTypeBool
%int_n2147483648 = OpConstant %int -2147483648
%int_n1 = OpConstant %int -1
%f = OpFunction %void None %3
%4 = OpLabel
%a = OpVariable %_ptr_Function_int Function
%b = OpVariable %_ptr_Function_int Function
OpStore %a %int_1
OpStore %b %int_0
%11 = OpLoad %int %a None
%12 = OpLoad %int %b None
%13 = OpLoad %int %b None
%15 = OpBitcast %uint %12
%16 = OpBitcast %uint %13
%17 = OpIAdd %uint %15 %16
%18 = OpBitcast %int %17
%r = OpFunctionCall %int %tint_mod_i32 %11 %18
OpReturn
OpFunctionEnd
%tint_mod_i32 = OpFunction %int None %23
%lhs = OpFunctionParameter %int
%rhs = OpFunctionParameter %int
%24 = OpLabel
%25 = OpIEqual %bool %rhs %int_0
%27 = OpIEqual %bool %lhs %int_n2147483648
%29 = OpIEqual %bool %rhs %int_n1
%31 = OpLogicalAnd %bool %27 %29
%32 = OpLogicalOr %bool %25 %31
%33 = OpSelect %int %32 %int_1 %rhs
%34 = OpSDiv %int %lhs %33
%35 = OpBitcast %uint %34
%36 = OpBitcast %uint %33
%37 = OpIMul %uint %35 %36
%38 = OpBitcast %int %37
%39 = OpBitcast %uint %lhs
%40 = OpBitcast %uint %38
%41 = OpISub %uint %39 %40
%42 = OpBitcast %int %41
OpReturnValue %42
OpFunctionEnd