blob: 90effc446ca10075292cfa0553842e98649e3bb4 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 35
; 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 %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
%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
%main = OpFunction %void None %3
%32 = OpLabel
%33 = OpFunctionCall %void %deref
%34 = OpFunctionCall %void %no_deref
OpReturn
OpFunctionEnd