dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 1 |
| 4 | ; Bound: 45 |
| 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
| 8 | OpEntryPoint GLCompute %main "main" |
| 9 | OpExecutionMode %main LocalSize 1 1 1 |
| 10 | OpName %deref "deref" |
| 11 | OpName %a "a" |
| 12 | OpName %a "p" |
| 13 | OpName %no_deref "no_deref" |
| 14 | OpName %a_0 "a" |
| 15 | OpName %a_0 "p" |
| 16 | OpName %deref_inc "deref_inc" |
| 17 | OpName %a_1 "a" |
| 18 | OpName %a_1 "p" |
| 19 | OpName %no_deref_inc "no_deref_inc" |
| 20 | OpName %a_2 "a" |
| 21 | OpName %a_2 "p" |
| 22 | OpName %main "main" |
| 23 | %void = OpTypeVoid |
| 24 | %3 = OpTypeFunction %void |
| 25 | %int = OpTypeInt 32 1 |
| 26 | %v3int = OpTypeVector %int 3 |
| 27 | %_ptr_Function_v3int = OpTypePointer Function %v3int |
| 28 | %9 = OpConstantNull %v3int |
| 29 | %_ptr_Function_int = OpTypePointer Function %int |
| 30 | %int_0 = OpConstant %int 0 |
| 31 | %int_42 = OpConstant %int 42 |
| 32 | %int_1 = OpConstant %int 1 |
| 33 | %deref = OpFunction %void None %3 |
| 34 | %4 = OpLabel |
| 35 | %a = OpVariable %_ptr_Function_v3int Function %9 |
| 36 | %10 = OpAccessChain %_ptr_Function_int %a %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 37 | %13 = OpLoad %int %10 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 38 | %14 = OpIAdd %int %13 %int_42 |
| 39 | %16 = OpAccessChain %_ptr_Function_int %a %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 40 | OpStore %16 %14 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 41 | OpReturn |
| 42 | OpFunctionEnd |
| 43 | %no_deref = OpFunction %void None %3 |
| 44 | %18 = OpLabel |
| 45 | %a_0 = OpVariable %_ptr_Function_v3int Function %9 |
| 46 | %20 = OpAccessChain %_ptr_Function_int %a_0 %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 47 | %21 = OpLoad %int %20 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 48 | %22 = OpIAdd %int %21 %int_42 |
| 49 | %23 = OpAccessChain %_ptr_Function_int %a_0 %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 50 | OpStore %23 %22 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 51 | OpReturn |
| 52 | OpFunctionEnd |
| 53 | %deref_inc = OpFunction %void None %3 |
| 54 | %25 = OpLabel |
| 55 | %a_1 = OpVariable %_ptr_Function_v3int Function %9 |
| 56 | %27 = OpAccessChain %_ptr_Function_int %a_1 %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 57 | %28 = OpLoad %int %27 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 58 | %29 = OpIAdd %int %28 %int_1 |
| 59 | %31 = OpAccessChain %_ptr_Function_int %a_1 %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 60 | OpStore %31 %29 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 61 | OpReturn |
| 62 | OpFunctionEnd |
| 63 | %no_deref_inc = OpFunction %void None %3 |
| 64 | %33 = OpLabel |
| 65 | %a_2 = OpVariable %_ptr_Function_v3int Function %9 |
| 66 | %35 = OpAccessChain %_ptr_Function_int %a_2 %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 67 | %36 = OpLoad %int %35 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 68 | %37 = OpIAdd %int %36 %int_1 |
| 69 | %38 = OpAccessChain %_ptr_Function_int %a_2 %int_0 |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 70 | OpStore %38 %37 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 71 | OpReturn |
| 72 | OpFunctionEnd |
| 73 | %main = OpFunction %void None %3 |
| 74 | %40 = OpLabel |
| 75 | %41 = OpFunctionCall %void %deref |
| 76 | %42 = OpFunctionCall %void %no_deref |
| 77 | %43 = OpFunctionCall %void %deref_inc |
| 78 | %44 = OpFunctionCall %void %no_deref_inc |
| 79 | OpReturn |
| 80 | OpFunctionEnd |