blob: 4e5a4592243f4b91c3e409d0ffdd3b466f2fe67f [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 55
; 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_v3i32 "tint_mod_v3i32"
OpName %lhs "lhs"
OpName %rhs "rhs"
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%int_4 = OpConstant %int 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v3int = OpTypePointer Function %v3int
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%12 = OpConstantComposite %v3int %int_0 %int_2 %int_0
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%29 = OpTypeFunction %v3int %v3int %v3int
%32 = OpConstantNull %v3int
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%int_n2147483648 = OpConstant %int -2147483648
%36 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
%int_n1 = OpConstant %int -1
%39 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
%int_1 = OpConstant %int 1
%44 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%f = OpFunction %void None %3
%4 = OpLabel
%a = OpVariable %_ptr_Function_int Function
%b = OpVariable %_ptr_Function_v3int Function
OpStore %a %int_4
OpStore %b %12
%15 = OpLoad %int %a None
%16 = OpLoad %v3int %b None
%17 = OpLoad %v3int %b None
%20 = OpBitcast %v3uint %16
%21 = OpBitcast %v3uint %17
%22 = OpIAdd %v3uint %20 %21
%23 = OpBitcast %v3int %22
%24 = OpCompositeConstruct %v3int %15 %15 %15
%r = OpFunctionCall %v3int %tint_mod_v3i32 %24 %23
OpReturn
OpFunctionEnd
%tint_mod_v3i32 = OpFunction %v3int None %29
%lhs = OpFunctionParameter %v3int
%rhs = OpFunctionParameter %v3int
%30 = OpLabel
%31 = OpIEqual %v3bool %rhs %32
%35 = OpIEqual %v3bool %lhs %36
%38 = OpIEqual %v3bool %rhs %39
%41 = OpLogicalAnd %v3bool %35 %38
%42 = OpLogicalOr %v3bool %31 %41
%43 = OpSelect %v3int %42 %44 %rhs
%46 = OpSDiv %v3int %lhs %43
%47 = OpBitcast %v3uint %46
%48 = OpBitcast %v3uint %43
%49 = OpIMul %v3uint %47 %48
%50 = OpBitcast %v3int %49
%51 = OpBitcast %v3uint %lhs
%52 = OpBitcast %v3uint %50
%53 = OpISub %v3uint %51 %52
%54 = OpBitcast %v3int %53
OpReturnValue %54
OpFunctionEnd