blob: 284a7c782f20b784707ee9aa84b17999d9b55462 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %deref "deref"
OpName %a "a"
OpName %a "p"
OpName %no_deref "no_deref"
OpName %a_0 "a"
OpName %a_0 "p"
OpName %deref_inc "deref_inc"
OpName %a_1 "a"
OpName %a_1 "p"
OpName %no_deref_inc "no_deref_inc"
OpName %a_2 "a"
OpName %a_2 "p"
OpName %main "main"
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%_ptr_Function_v3int = OpTypePointer Function %v3int
%9 = OpConstantNull %v3int
%_ptr_Function_int = OpTypePointer Function %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%int_42 = OpConstant %int 42
%int_1 = OpConstant %int 1
%deref = OpFunction %void None %3
%4 = OpLabel
%a = OpVariable %_ptr_Function_v3int Function %9
%10 = OpAccessChain %_ptr_Function_int %a %uint_0
%14 = OpLoad %int %10 None
%15 = OpBitcast %uint %14
%16 = OpBitcast %uint %int_42
%18 = OpIAdd %uint %15 %16
%19 = OpBitcast %int %18
%20 = OpAccessChain %_ptr_Function_int %a %uint_0
OpStore %20 %19 None
OpReturn
OpFunctionEnd
%no_deref = OpFunction %void None %3
%22 = OpLabel
%a_0 = OpVariable %_ptr_Function_v3int Function %9
%24 = OpAccessChain %_ptr_Function_int %a_0 %uint_0
%25 = OpLoad %int %24 None
%26 = OpBitcast %uint %25
%27 = OpBitcast %uint %int_42
%28 = OpIAdd %uint %26 %27
%29 = OpBitcast %int %28
%30 = OpAccessChain %_ptr_Function_int %a_0 %uint_0
OpStore %30 %29 None
OpReturn
OpFunctionEnd
%deref_inc = OpFunction %void None %3
%32 = OpLabel
%a_1 = OpVariable %_ptr_Function_v3int Function %9
%34 = OpAccessChain %_ptr_Function_int %a_1 %uint_0
%35 = OpLoad %int %34 None
%36 = OpBitcast %uint %35
%37 = OpBitcast %uint %int_1
%39 = OpIAdd %uint %36 %37
%40 = OpBitcast %int %39
%41 = OpAccessChain %_ptr_Function_int %a_1 %uint_0
OpStore %41 %40 None
OpReturn
OpFunctionEnd
%no_deref_inc = OpFunction %void None %3
%43 = OpLabel
%a_2 = OpVariable %_ptr_Function_v3int Function %9
%45 = OpAccessChain %_ptr_Function_int %a_2 %uint_0
%46 = OpLoad %int %45 None
%47 = OpBitcast %uint %46
%48 = OpBitcast %uint %int_1
%49 = OpIAdd %uint %47 %48
%50 = OpBitcast %int %49
%51 = OpAccessChain %_ptr_Function_int %a_2 %uint_0
OpStore %51 %50 None
OpReturn
OpFunctionEnd
%main = OpFunction %void None %3
%53 = OpLabel
%54 = OpFunctionCall %void %deref
%55 = OpFunctionCall %void %no_deref
%56 = OpFunctionCall %void %deref_inc
%57 = OpFunctionCall %void %no_deref_inc
OpReturn
OpFunctionEnd