James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
Ben Clayton | 46ee639 | 2022-11-09 22:04:11 +0000 | [diff] [blame] | 4 | ; Bound: 45 |
James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
| 8 | OpEntryPoint GLCompute %unused_entry_point "unused_entry_point" |
| 9 | OpExecutionMode %unused_entry_point LocalSize 1 1 1 |
| 10 | OpName %a "a" |
| 11 | OpName %b "b" |
| 12 | OpName %c "c" |
| 13 | OpName %unused_entry_point "unused_entry_point" |
Ben Clayton | 46ee639 | 2022-11-09 22:04:11 +0000 | [diff] [blame] | 14 | OpName %tint_div "tint_div" |
| 15 | OpName %lhs "lhs" |
| 16 | OpName %rhs "rhs" |
James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 17 | OpName %foo "foo" |
| 18 | %int = OpTypeInt 32 1 |
| 19 | %_ptr_Workgroup_int = OpTypePointer Workgroup %int |
| 20 | %a = OpVariable %_ptr_Workgroup_int Workgroup |
| 21 | %float = OpTypeFloat 32 |
| 22 | %v4float = OpTypeVector %float 4 |
| 23 | %_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float |
| 24 | %b = OpVariable %_ptr_Workgroup_v4float Workgroup |
| 25 | %v2float = OpTypeVector %float 2 |
| 26 | %mat2v2float = OpTypeMatrix %v2float 2 |
| 27 | %_ptr_Workgroup_mat2v2float = OpTypePointer Workgroup %mat2v2float |
| 28 | %c = OpVariable %_ptr_Workgroup_mat2v2float Workgroup |
| 29 | %void = OpTypeVoid |
| 30 | %12 = OpTypeFunction %void |
Ben Clayton | 46ee639 | 2022-11-09 22:04:11 +0000 | [diff] [blame] | 31 | %16 = OpTypeFunction %int %int %int |
| 32 | %22 = OpConstantNull %int |
| 33 | %bool = OpTypeBool |
| 34 | %int_n2147483648 = OpConstant %int -2147483648 |
| 35 | %int_n1 = OpConstant %int -1 |
| 36 | %int_1 = OpConstant %int 1 |
James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 37 | %int_2 = OpConstant %int 2 |
| 38 | %mat4v4float = OpTypeMatrix %v4float 4 |
Ben Clayton | 46ee639 | 2022-11-09 22:04:11 +0000 | [diff] [blame] | 39 | %40 = OpConstantNull %mat4v4float |
James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 40 | %float_2 = OpConstant %float 2 |
| 41 | %unused_entry_point = OpFunction %void None %12 |
| 42 | %15 = OpLabel |
| 43 | OpReturn |
| 44 | OpFunctionEnd |
Ben Clayton | 46ee639 | 2022-11-09 22:04:11 +0000 | [diff] [blame] | 45 | %tint_div = OpFunction %int None %16 |
| 46 | %lhs = OpFunctionParameter %int |
| 47 | %rhs = OpFunctionParameter %int |
| 48 | %20 = OpLabel |
| 49 | %23 = OpIEqual %bool %rhs %22 |
| 50 | %26 = OpIEqual %bool %lhs %int_n2147483648 |
| 51 | %28 = OpIEqual %bool %rhs %int_n1 |
| 52 | %29 = OpLogicalAnd %bool %26 %28 |
| 53 | %30 = OpLogicalOr %bool %23 %29 |
| 54 | %21 = OpSelect %int %30 %int_1 %rhs |
| 55 | %32 = OpSDiv %int %lhs %21 |
| 56 | OpReturnValue %32 |
| 57 | OpFunctionEnd |
James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 58 | %foo = OpFunction %void None %12 |
Ben Clayton | 46ee639 | 2022-11-09 22:04:11 +0000 | [diff] [blame] | 59 | %34 = OpLabel |
| 60 | %36 = OpLoad %int %a |
| 61 | %35 = OpFunctionCall %int %tint_div %36 %int_2 |
| 62 | OpStore %a %35 |
| 63 | %38 = OpLoad %v4float %b |
| 64 | %41 = OpVectorTimesMatrix %v4float %38 %40 |
| 65 | OpStore %b %41 |
| 66 | %42 = OpLoad %mat2v2float %c |
| 67 | %44 = OpMatrixTimesScalar %mat2v2float %42 %float_2 |
| 68 | OpStore %c %44 |
James Price | 16eeff3 | 2022-03-31 22:30:10 +0000 | [diff] [blame] | 69 | OpReturn |
| 70 | OpFunctionEnd |