| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 44 |
| ; 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 |
| %a = OpConstant %int 4 |
| %v3int = OpTypeVector %int 3 |
| %int_0 = OpConstant %int 0 |
| %int_2 = OpConstant %int 2 |
| %b = OpConstantComposite %v3int %int_0 %int_2 %int_0 |
| %16 = OpTypeFunction %v3int %v3int %v3int |
| %19 = OpConstantNull %v3int |
| %bool = OpTypeBool |
| %v3bool = OpTypeVector %bool 3 |
| %int_n2147483648 = OpConstant %int -2147483648 |
| %23 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648 |
| %int_n1 = OpConstant %int -1 |
| %26 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1 |
| %int_1 = OpConstant %int 1 |
| %31 = OpConstantComposite %v3int %int_1 %int_1 %int_1 |
| %uint = OpTypeInt 32 0 |
| %v3uint = OpTypeVector %uint 3 |
| %f = OpFunction %void None %3 |
| %4 = OpLabel |
| %11 = OpCompositeConstruct %v3int %a %a %a |
| %r = OpFunctionCall %v3int %tint_mod_v3i32 %11 %b |
| OpReturn |
| OpFunctionEnd |
| %tint_mod_v3i32 = OpFunction %v3int None %16 |
| %lhs = OpFunctionParameter %v3int |
| %rhs = OpFunctionParameter %v3int |
| %17 = OpLabel |
| %18 = OpIEqual %v3bool %rhs %19 |
| %22 = OpIEqual %v3bool %lhs %23 |
| %25 = OpIEqual %v3bool %rhs %26 |
| %28 = OpLogicalAnd %v3bool %22 %25 |
| %29 = OpLogicalOr %v3bool %18 %28 |
| %30 = OpSelect %v3int %29 %31 %rhs |
| %33 = OpSDiv %v3int %lhs %30 |
| %36 = OpBitcast %v3uint %33 |
| %37 = OpBitcast %v3uint %30 |
| %38 = OpIMul %v3uint %36 %37 |
| %39 = OpBitcast %v3int %38 |
| %40 = OpBitcast %v3uint %lhs |
| %41 = OpBitcast %v3uint %39 |
| %42 = OpISub %v3uint %40 %41 |
| %43 = OpBitcast %v3int %42 |
| OpReturnValue %43 |
| OpFunctionEnd |