-
Notifications
You must be signed in to change notification settings - Fork 219
/
GroupAndSubgroupInstructions.spvasm
374 lines (364 loc) · 21.1 KB
/
GroupAndSubgroupInstructions.spvasm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
; Generated with:
; source.cl:
; void foo(int x, int2 coord, uint c, short s, float f, size_t n,
; __global uint* p, read_write image2d_t image, uint4 v) {
; work_group_all(x);
; work_group_any(x);
; work_group_broadcast(x, n);
; sub_group_barrier(CLK_LOCAL_MEM_FENCE, memory_scope_sub_group);
; sub_group_all(x);
; sub_group_any(x);
; sub_group_broadcast(x, c);
; sub_group_reduce_add(x);
; sub_group_reduce_add(f);
; sub_group_reduce_min(x);
; sub_group_reduce_min(c);
; sub_group_reduce_min(f);
; sub_group_reduce_max(x);
; sub_group_reduce_max(c);
; sub_group_reduce_max(f);
; intel_sub_group_shuffle(x, c);
; intel_sub_group_shuffle_down(x, x, c);
; intel_sub_group_shuffle_up(x, x, c);
; intel_sub_group_shuffle_xor(x, c);
; intel_sub_group_block_read(p);
; intel_sub_group_block_write(p, c);
; intel_sub_group_block_read(image, coord);
; intel_sub_group_block_write(image, coord, c);
; sub_group_elect();
; sub_group_non_uniform_all(x);
; sub_group_non_uniform_any(x);
; sub_group_non_uniform_all_equal(x);
; sub_group_non_uniform_broadcast(x, c);
; sub_group_broadcast_first(x);
; sub_group_ballot(x);
; sub_group_inverse_ballot(v);
; sub_group_ballot_bit_extract(v, c);
; sub_group_ballot_bit_count(v);
; sub_group_ballot_inclusive_scan(v);
; sub_group_ballot_exclusive_scan(v);
; sub_group_ballot_find_lsb(v);
; sub_group_ballot_find_msb(v);
; sub_group_non_uniform_reduce_add(x);
; sub_group_non_uniform_reduce_add(f);
; sub_group_non_uniform_scan_inclusive_min(x);
; sub_group_non_uniform_scan_inclusive_min(c);
; sub_group_non_uniform_scan_inclusive_min(f);
; sub_group_non_uniform_scan_exclusive_max(x);
; sub_group_non_uniform_scan_exclusive_max(c);
; sub_group_non_uniform_scan_exclusive_max(f);
; sub_group_non_uniform_reduce_mul(x);
; sub_group_non_uniform_reduce_mul(f);
; sub_group_non_uniform_reduce_and(x);
; sub_group_non_uniform_scan_inclusive_or(x);
; sub_group_non_uniform_scan_exclusive_xor(x);
; sub_group_non_uniform_reduce_logical_and(x);
; sub_group_non_uniform_scan_inclusive_logical_or(x);
; sub_group_non_uniform_scan_exclusive_logical_xor(x);
; sub_group_rotate(c, x);
; }
; REQUIRES: spirv-dis
; clang -cc1 -O2 -triple spir -cl-std=cl2.0 -finclude-default-header -cl-ext=+all source.cl -emit-llvm-bc -o tmp.bc
; llvm-spirv tmp.bc --spirv-ext=+all,-SPV_KHR_untyped_pointers -o tmp.spv
; spirv-dis tmp.spv -o llvm-spirv/test/GroupAndSubgroupInstructions.spvasm
; REQUIRES: spirv-as
; RUN: spirv-as %s --target-env spv1.3 -o %t.spv
; RUN: spirv-val %t.spv
; RUN: llvm-spirv -r %t.spv --spirv-target-env=CL1.2 -o %t.bc
; RUN: llvm-dis %t.bc -o %t.ll
; RUN: FileCheck < %t.ll %s --check-prefixes=CHECK-COMMON,CHECK-CL,CHECK-CL12
; RUN: llvm-spirv -r %t.spv --spirv-target-env=CL2.0 -o %t.bc
; RUN: llvm-dis %t.bc -o %t.ll
; RUN: FileCheck < %t.ll %s --check-prefixes=CHECK-COMMON,CHECK-CL,CHECK-CL20
; RUN: llvm-spirv -r %t.spv --spirv-target-env=SPV-IR -o %t.bc
; RUN: llvm-dis %t.bc -o %t.ll
; RUN: FileCheck < %t.ll %s --check-prefixes=CHECK-COMMON,CHECK-SPV-IR
; RUN: llvm-spirv %t.bc --spirv-ext=+all,-SPV_KHR_untyped_pointers -o %t.rev.spv
; RUN: spirv-val %t.rev.spv
; CHECK-CL-DAG: declare spir_func i32 @_Z14work_group_alli(i32) #[[#Attrs:]]
; CHECK-CL-DAG: declare spir_func i32 @_Z14work_group_anyi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z20work_group_broadcastjj(i32, i32) #[[#Attrs]]
; CHECK-CL12-DAG: declare spir_func void @_Z7barrierj(i32) #[[#Attrs]]
; CHECK-CL20-DAG: declare spir_func void @_Z17sub_group_barrierj12memory_scope(i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z13sub_group_alli(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z13sub_group_anyi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z19sub_group_broadcastjj(i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z20sub_group_reduce_addi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z20sub_group_reduce_addf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z20sub_group_reduce_mini(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z20sub_group_reduce_minj(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z20sub_group_reduce_minf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z20sub_group_reduce_maxi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z20sub_group_reduce_maxj(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z20sub_group_reduce_maxf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z23intel_sub_group_shuffleij(i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z28intel_sub_group_shuffle_downiij(i32, i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z26intel_sub_group_shuffle_upiij(i32, i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z27intel_sub_group_shuffle_xorij(i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z26intel_sub_group_block_readPU3AS1Kj(ptr addrspace(1)) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func void @_Z27intel_sub_group_block_writePU3AS1jj(ptr addrspace(1), i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z26intel_sub_group_block_read14ocl_image2d_rwDv2_i(ptr addrspace(1), <2 x i32>) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func void @_Z27intel_sub_group_block_write14ocl_image2d_rwDv2_ij(ptr addrspace(1), <2 x i32>, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z15sub_group_electv() #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z25sub_group_non_uniform_alli(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z25sub_group_non_uniform_anyi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z31sub_group_non_uniform_all_equali(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z31sub_group_non_uniform_broadcastjj(i32, i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z25sub_group_broadcast_firstj(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func <4 x i32> @_Z16sub_group_balloti(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z31sub_group_ballot_inclusive_scanDv4_j(<4 x i32>) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z31sub_group_ballot_exclusive_scanDv4_j(<4 x i32>) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z25sub_group_ballot_find_lsbDv4_j(<4 x i32>) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z25sub_group_ballot_find_msbDv4_j(<4 x i32>) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z32sub_group_non_uniform_reduce_addi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z32sub_group_non_uniform_reduce_addf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z40sub_group_non_uniform_scan_inclusive_mini(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z40sub_group_non_uniform_scan_inclusive_minj(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z40sub_group_non_uniform_scan_inclusive_minf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z40sub_group_non_uniform_scan_exclusive_maxi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z40sub_group_non_uniform_scan_exclusive_maxj(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z40sub_group_non_uniform_scan_exclusive_maxf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z32sub_group_non_uniform_reduce_muli(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func float @_Z32sub_group_non_uniform_reduce_mulf(float) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z32sub_group_non_uniform_reduce_andi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z39sub_group_non_uniform_scan_inclusive_ori(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z40sub_group_non_uniform_scan_exclusive_xori(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z40sub_group_non_uniform_reduce_logical_andi(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z47sub_group_non_uniform_scan_inclusive_logical_ori(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z48sub_group_non_uniform_scan_exclusive_logical_xori(i32) #[[#Attrs]]
; CHECK-CL-DAG: declare spir_func i32 @_Z16sub_group_rotateii(i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z16__spirv_GroupAllib(i32, i1) #[[#Attrs:]]
; CHECK-SPV-IR: declare spir_func i1 @_Z16__spirv_GroupAnyib(i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z22__spirv_GroupBroadcastiii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func void @_Z22__spirv_ControlBarrieriii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z17__spirv_GroupIAddiii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z17__spirv_GroupFAddiif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z17__spirv_GroupSMiniii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z17__spirv_GroupUMiniij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z17__spirv_GroupFMiniif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z17__spirv_GroupSMaxiii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z17__spirv_GroupUMaxiij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z17__spirv_GroupFMaxiif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z28__spirv_SubgroupShuffleINTELij(i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z32__spirv_SubgroupShuffleDownINTELiij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z30__spirv_SubgroupShuffleUpINTELiij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z31__spirv_SubgroupShuffleXorINTELij(i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z35__spirv_SubgroupBlockReadINTEL_RintPU3AS1Kj(ptr addrspace(1)) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func void @_Z31__spirv_SubgroupBlockWriteINTELPU3AS1jj(ptr addrspace(1), i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z40__spirv_SubgroupImageBlockReadINTEL_RintPU3AS133__spirv_Image__void_1_0_0_0_0_0_2Dv2_i(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 2), <2 x i32>) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func void @_Z36__spirv_SubgroupImageBlockWriteINTELPU3AS133__spirv_Image__void_1_0_0_0_0_0_2Dv2_ij(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 2), <2 x i32>, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z28__spirv_GroupNonUniformElecti(i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z26__spirv_GroupNonUniformAllib(i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z26__spirv_GroupNonUniformAnyib(i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z31__spirv_GroupNonUniformAllEqualii(i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z32__spirv_GroupNonUniformBroadcastiij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z37__spirv_GroupNonUniformBroadcastFirstii(i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func <4 x i32> @_Z29__spirv_GroupNonUniformBallotib(i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z37__spirv_GroupNonUniformBallotBitCountiiDv4_j(i32, i32, <4 x i32>) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z36__spirv_GroupNonUniformBallotFindLSBiDv4_j(i32, <4 x i32>) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z36__spirv_GroupNonUniformBallotFindMSBiDv4_j(i32, <4 x i32>) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z27__spirv_GroupNonUniformIAddiii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z27__spirv_GroupNonUniformFAddiif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z27__spirv_GroupNonUniformSMiniii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z27__spirv_GroupNonUniformUMiniij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z27__spirv_GroupNonUniformFMiniif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z27__spirv_GroupNonUniformSMaxiii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z27__spirv_GroupNonUniformUMaxiij(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z27__spirv_GroupNonUniformFMaxiif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z27__spirv_GroupNonUniformIMuliii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func float @_Z27__spirv_GroupNonUniformFMuliif(i32, i32, float) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z33__spirv_GroupNonUniformBitwiseAndiii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z32__spirv_GroupNonUniformBitwiseOriii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z33__spirv_GroupNonUniformBitwiseXoriii(i32, i32, i32) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z33__spirv_GroupNonUniformLogicalAndiib(i32, i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z32__spirv_GroupNonUniformLogicalOriib(i32, i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i1 @_Z33__spirv_GroupNonUniformLogicalXoriib(i32, i32, i1) #[[#Attrs]]
; CHECK-SPV-IR: declare spir_func i32 @_Z32__spirv_GroupNonUniformRotateKHRiii(i32, i32, i32) #[[#Attrs]]
; CHECK-COMMON: attributes #[[#Attrs]] =
; CHECK-COMMON-SAME: convergent
; SPIR-V
; Version: 1.3
; Generator: Khronos LLVM/SPIR-V Translator; 14
; Bound: 97
; Schema: 0
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability ImageBasic
OpCapability ImageReadWrite
OpCapability Groups
OpCapability Int16
OpCapability GroupNonUniform
OpCapability GroupNonUniformVote
OpCapability GroupNonUniformArithmetic
OpCapability GroupNonUniformBallot
OpCapability SubgroupShuffleINTEL
OpCapability SubgroupBufferBlockIOINTEL
OpCapability SubgroupImageBlockIOINTEL
OpCapability GroupNonUniformRotateKHR
OpExtension "SPV_INTEL_subgroups"
OpExtension "SPV_KHR_subgroup_rotate"
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical32 OpenCL
OpSource OpenCL_C 200000
OpName %foo "foo"
OpName %x "x"
OpName %coord "coord"
OpName %c "c"
OpName %s "s"
OpName %f "f"
OpName %n "n"
OpName %p "p"
OpName %image "image"
OpName %v "v"
OpName %entry "entry"
OpName %call "call"
OpName %call1 "call1"
OpName %call2 "call2"
OpName %call3 "call3"
OpName %call4 "call4"
OpName %call5 "call5"
OpName %call6 "call6"
OpName %call7 "call7"
OpName %call8 "call8"
OpName %call9 "call9"
OpName %call10 "call10"
OpName %call11 "call11"
OpName %call12 "call12"
OpName %call13 "call13"
OpName %call14 "call14"
OpName %call15 "call15"
OpName %call16 "call16"
OpName %call17 "call17"
OpName %call18 "call18"
OpName %call19 "call19"
OpName %call20 "call20"
OpName %call21 "call21"
OpName %call22 "call22"
OpName %call23 "call23"
OpName %call24 "call24"
OpName %call25 "call25"
OpName %call26 "call26"
OpName %call30 "call30"
OpName %call31 "call31"
OpName %call32 "call32"
OpName %call33 "call33"
OpName %call34 "call34"
OpName %call35 "call35"
OpName %call36 "call36"
OpName %call37 "call37"
OpName %call38 "call38"
OpName %call39 "call39"
OpName %call40 "call40"
OpName %call41 "call41"
OpName %call42 "call42"
OpName %call43 "call43"
OpName %call44 "call44"
OpName %call45 "call45"
OpName %call46 "call46"
OpName %call47 "call47"
OpName %call48 "call48"
OpName %call49 "call49"
OpName %call50 "call50"
OpDecorate %foo LinkageAttributes "foo" Export
OpDecorate %s FuncParamAttr Sext
%uint = OpTypeInt 32 0
%ushort = OpTypeInt 16 0
%uint_0 = OpConstant %uint 0
%uint_2 = OpConstant %uint 2
%uint_1 = OpConstant %uint 1
%uint_3 = OpConstant %uint 3
%uint_272 = OpConstant %uint 272
%void = OpTypeVoid
%v2uint = OpTypeVector %uint 2
%float = OpTypeFloat 32
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%8 = OpTypeImage %void 2D 0 0 0 0 Unknown ReadWrite
%v4uint = OpTypeVector %uint 4
%10 = OpTypeFunction %void %uint %v2uint %uint %ushort %float %uint %_ptr_CrossWorkgroup_uint %8 %v4uint
%bool = OpTypeBool
%foo = OpFunction %void None %10
%x = OpFunctionParameter %uint
%coord = OpFunctionParameter %v2uint
%c = OpFunctionParameter %uint
%s = OpFunctionParameter %ushort
%f = OpFunctionParameter %float
%n = OpFunctionParameter %uint
%p = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%image = OpFunctionParameter %8
%v = OpFunctionParameter %v4uint
%entry = OpLabel
%24 = OpINotEqual %bool %x %uint_0
%26 = OpGroupAll %bool %uint_2 %24
%call = OpSelect %uint %26 %uint_1 %uint_0
%29 = OpINotEqual %bool %x %uint_0
%30 = OpGroupAny %bool %uint_2 %29
%call1 = OpSelect %uint %30 %uint_1 %uint_0
%call2 = OpGroupBroadcast %uint %uint_2 %x %n
OpControlBarrier %uint_3 %uint_3 %uint_272
%35 = OpINotEqual %bool %x %uint_0
%36 = OpGroupAll %bool %uint_3 %35
%call3 = OpSelect %uint %36 %uint_1 %uint_0
%38 = OpINotEqual %bool %x %uint_0
%39 = OpGroupAny %bool %uint_3 %38
%call4 = OpSelect %uint %39 %uint_1 %uint_0
%call5 = OpGroupBroadcast %uint %uint_3 %x %c
%call6 = OpGroupIAdd %uint %uint_3 Reduce %x
%call7 = OpGroupFAdd %float %uint_3 Reduce %f
%call8 = OpGroupSMin %uint %uint_3 Reduce %x
%call9 = OpGroupUMin %uint %uint_3 Reduce %c
%call10 = OpGroupFMin %float %uint_3 Reduce %f
%call11 = OpGroupSMax %uint %uint_3 Reduce %x
%call12 = OpGroupUMax %uint %uint_3 Reduce %c
%call13 = OpGroupFMax %float %uint_3 Reduce %f
%call14 = OpSubgroupShuffleINTEL %uint %x %c
%call15 = OpSubgroupShuffleDownINTEL %uint %x %x %c
%call16 = OpSubgroupShuffleUpINTEL %uint %x %x %c
%call17 = OpSubgroupShuffleXorINTEL %uint %x %c
%call18 = OpSubgroupBlockReadINTEL %uint %p
OpSubgroupBlockWriteINTEL %p %c
%call19 = OpSubgroupImageBlockReadINTEL %uint %image %coord
OpSubgroupImageBlockWriteINTEL %image %coord %c
%56 = OpGroupNonUniformElect %bool %uint_3
%call20 = OpSelect %uint %56 %uint_1 %uint_0
%58 = OpINotEqual %bool %x %uint_0
%59 = OpGroupNonUniformAll %bool %uint_3 %58
%call21 = OpSelect %uint %59 %uint_1 %uint_0
%61 = OpINotEqual %bool %x %uint_0
%62 = OpGroupNonUniformAny %bool %uint_3 %61
%call22 = OpSelect %uint %62 %uint_1 %uint_0
%64 = OpGroupNonUniformAllEqual %bool %uint_3 %x
%call23 = OpSelect %uint %64 %uint_1 %uint_0
%call24 = OpGroupNonUniformBroadcast %uint %uint_3 %x %uint_1
%call25 = OpGroupNonUniformBroadcastFirst %uint %uint_3 %x
%68 = OpINotEqual %bool %x %uint_0
%call26 = OpGroupNonUniformBallot %v4uint %uint_3 %68
%call30 = OpGroupNonUniformBallotBitCount %uint %uint_3 InclusiveScan %v
%call31 = OpGroupNonUniformBallotBitCount %uint %uint_3 ExclusiveScan %v
%call32 = OpGroupNonUniformBallotFindLSB %uint %uint_3 %v
%call33 = OpGroupNonUniformBallotFindMSB %uint %uint_3 %v
%call34 = OpGroupNonUniformIAdd %uint %uint_3 Reduce %x
%call35 = OpGroupNonUniformFAdd %float %uint_3 Reduce %f
%call36 = OpGroupNonUniformSMin %uint %uint_3 InclusiveScan %x
%call37 = OpGroupNonUniformUMin %uint %uint_3 InclusiveScan %c
%call38 = OpGroupNonUniformFMin %float %uint_3 InclusiveScan %f
%call39 = OpGroupNonUniformSMax %uint %uint_3 ExclusiveScan %x
%call40 = OpGroupNonUniformUMax %uint %uint_3 ExclusiveScan %c
%call41 = OpGroupNonUniformFMax %float %uint_3 ExclusiveScan %f
%call42 = OpGroupNonUniformIMul %uint %uint_3 Reduce %x
%call43 = OpGroupNonUniformFMul %float %uint_3 Reduce %f
%call44 = OpGroupNonUniformBitwiseAnd %uint %uint_3 Reduce %x
%call45 = OpGroupNonUniformBitwiseOr %uint %uint_3 InclusiveScan %x
%call46 = OpGroupNonUniformBitwiseXor %uint %uint_3 ExclusiveScan %x
%87 = OpINotEqual %bool %x %uint_0
%88 = OpGroupNonUniformLogicalAnd %bool %uint_3 Reduce %87
%call47 = OpSelect %uint %88 %uint_1 %uint_0
%90 = OpINotEqual %bool %x %uint_0
%91 = OpGroupNonUniformLogicalOr %bool %uint_3 InclusiveScan %90
%call48 = OpSelect %uint %91 %uint_1 %uint_0
%93 = OpINotEqual %bool %x %uint_0
%94 = OpGroupNonUniformLogicalXor %bool %uint_3 ExclusiveScan %93
%call49 = OpSelect %uint %94 %uint_1 %uint_0
%call50 = OpGroupNonUniformRotateKHR %uint %uint_3 %c %x
OpReturn
OpFunctionEnd