| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 46 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %foo "foo" | |
| OpExecutionMode %foo LocalSize 1 1 1 | |
| OpName %foo "foo" | |
| OpName %a "a" | |
| OpName %b "b" | |
| OpName %c "c" | |
| OpName %tint_div_i32 "tint_div_i32" | |
| OpName %lhs "lhs" | |
| OpName %rhs "rhs" | |
| %void = OpTypeVoid | |
| %3 = OpTypeFunction %void | |
| %int = OpTypeInt 32 1 | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %8 = OpConstantNull %int | |
| %float = OpTypeFloat 32 | |
| %v4float = OpTypeVector %float 4 | |
| %_ptr_Function_v4float = OpTypePointer Function %v4float | |
| %13 = OpConstantNull %v4float | |
| %v2float = OpTypeVector %float 2 | |
| %mat2v2float = OpTypeMatrix %v2float 2 | |
| %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float | |
| %18 = OpConstantNull %mat2v2float | |
| %int_2 = OpConstant %int 2 | |
| %mat4v4float = OpTypeMatrix %v4float 4 | |
| %25 = OpConstantNull %mat4v4float | |
| %float_2 = OpConstant %float 2 | |
| %32 = OpTypeFunction %int %int %int | |
| %int_0 = OpConstant %int 0 | |
| %bool = OpTypeBool | |
| %int_n2147483648 = OpConstant %int -2147483648 | |
| %int_n1 = OpConstant %int -1 | |
| %int_1 = OpConstant %int 1 | |
| %foo = OpFunction %void None %3 | |
| %4 = OpLabel | |
| %a = OpVariable %_ptr_Function_int Function %8 | |
| %b = OpVariable %_ptr_Function_v4float Function %13 | |
| %c = OpVariable %_ptr_Function_mat2v2float Function %18 | |
| %19 = OpLoad %int %a None | |
| %20 = OpFunctionCall %int %tint_div_i32 %19 %int_2 | |
| OpStore %a %20 None | |
| %23 = OpLoad %v4float %b None | |
| %24 = OpVectorTimesMatrix %v4float %23 %25 | |
| OpStore %b %24 None | |
| %27 = OpLoad %mat2v2float %c None | |
| %28 = OpMatrixTimesScalar %mat2v2float %27 %float_2 | |
| OpStore %c %28 None | |
| OpReturn | |
| OpFunctionEnd | |
| %tint_div_i32 = OpFunction %int None %32 | |
| %lhs = OpFunctionParameter %int | |
| %rhs = OpFunctionParameter %int | |
| %33 = OpLabel | |
| %34 = OpIEqual %bool %rhs %int_0 | |
| %37 = OpIEqual %bool %lhs %int_n2147483648 | |
| %39 = OpIEqual %bool %rhs %int_n1 | |
| %41 = OpLogicalAnd %bool %37 %39 | |
| %42 = OpLogicalOr %bool %34 %41 | |
| %43 = OpSelect %int %42 %int_1 %rhs | |
| %45 = OpSDiv %int %lhs %43 | |
| OpReturnValue %45 | |
| OpFunctionEnd |