1 ; RUN: %if spirv-tools %{ spirv-as %s -o - | spirv-val - %}
2 ; RUN: spirv-sim --function=simple --wave=4 --expects=0,1,2,3 -i %s
4 OpCapability GroupNonUniform
5 OpMemoryModel Logical GLSL450
6 OpEntryPoint GLCompute %main "main" %WaveIndex
7 OpExecutionMode %main LocalSize 1 1 1
9 OpName %simple "simple"
11 OpDecorate %WaveIndex BuiltIn SubgroupLocalInvocationId
13 %uint = OpTypeInt 32 0
14 %int_2 = OpConstant %int 2
16 %main_type = OpTypeFunction %void
17 %simple_type = OpTypeFunction %int
18 %uint_iptr = OpTypePointer Input %uint
19 %WaveIndex = OpVariable %uint_iptr Input
20 %main = OpFunction %void None %main_type
24 %simple = OpFunction %int None %simple_type
26 %2 = OpLoad %uint %WaveIndex
27 %3 = OpBitcast %int %2