1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=amdgcn -mcpu=fiji -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN %s
4 define amdgpu_kernel void @float4_inselt(ptr addrspace(1) %out, <4 x float> %vec, i32 %sel) {
5 ; GCN-LABEL: float4_inselt:
6 ; GCN: ; %bb.0: ; %entry
7 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x44
8 ; GCN-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
9 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
10 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
11 ; GCN-NEXT: s_cmp_lg_u32 s2, 3
12 ; GCN-NEXT: v_mov_b32_e32 v0, s7
13 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
14 ; GCN-NEXT: s_cmp_lg_u32 s2, 2
15 ; GCN-NEXT: v_cndmask_b32_e32 v3, 1.0, v0, vcc
16 ; GCN-NEXT: v_mov_b32_e32 v0, s6
17 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
18 ; GCN-NEXT: s_cmp_lg_u32 s2, 1
19 ; GCN-NEXT: v_cndmask_b32_e32 v2, 1.0, v0, vcc
20 ; GCN-NEXT: v_mov_b32_e32 v0, s5
21 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
22 ; GCN-NEXT: s_cmp_lg_u32 s2, 0
23 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1.0, v0, vcc
24 ; GCN-NEXT: v_mov_b32_e32 v0, s4
25 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
26 ; GCN-NEXT: v_mov_b32_e32 v5, s1
27 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1.0, v0, vcc
28 ; GCN-NEXT: v_mov_b32_e32 v4, s0
29 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
32 %v = insertelement <4 x float> %vec, float 1.000000e+00, i32 %sel
33 store <4 x float> %v, ptr addrspace(1) %out
37 define amdgpu_kernel void @float4_inselt_undef(ptr addrspace(1) %out, i32 %sel) {
38 ; GCN-LABEL: float4_inselt_undef:
39 ; GCN: ; %bb.0: ; %entry
40 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
41 ; GCN-NEXT: v_mov_b32_e32 v0, 1.0
42 ; GCN-NEXT: v_mov_b32_e32 v1, v0
43 ; GCN-NEXT: v_mov_b32_e32 v2, v0
44 ; GCN-NEXT: v_mov_b32_e32 v3, v0
45 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
46 ; GCN-NEXT: v_mov_b32_e32 v5, s1
47 ; GCN-NEXT: v_mov_b32_e32 v4, s0
48 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
51 %v = insertelement <4 x float> undef, float 1.000000e+00, i32 %sel
52 store <4 x float> %v, ptr addrspace(1) %out
56 define amdgpu_kernel void @int4_inselt(ptr addrspace(1) %out, <4 x i32> %vec, i32 %sel) {
57 ; GCN-LABEL: int4_inselt:
58 ; GCN: ; %bb.0: ; %entry
59 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x44
60 ; GCN-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
61 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
62 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
63 ; GCN-NEXT: s_cmp_lg_u32 s2, 3
64 ; GCN-NEXT: s_cselect_b32 s3, s7, 1
65 ; GCN-NEXT: s_cmp_lg_u32 s2, 2
66 ; GCN-NEXT: s_cselect_b32 s6, s6, 1
67 ; GCN-NEXT: s_cmp_lg_u32 s2, 1
68 ; GCN-NEXT: s_cselect_b32 s5, s5, 1
69 ; GCN-NEXT: s_cmp_lg_u32 s2, 0
70 ; GCN-NEXT: s_cselect_b32 s2, s4, 1
71 ; GCN-NEXT: v_mov_b32_e32 v5, s1
72 ; GCN-NEXT: v_mov_b32_e32 v0, s2
73 ; GCN-NEXT: v_mov_b32_e32 v1, s5
74 ; GCN-NEXT: v_mov_b32_e32 v2, s6
75 ; GCN-NEXT: v_mov_b32_e32 v3, s3
76 ; GCN-NEXT: v_mov_b32_e32 v4, s0
77 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
80 %v = insertelement <4 x i32> %vec, i32 1, i32 %sel
81 store <4 x i32> %v, ptr addrspace(1) %out
85 define amdgpu_kernel void @float2_inselt(ptr addrspace(1) %out, <2 x float> %vec, i32 %sel) {
86 ; GCN-LABEL: float2_inselt:
87 ; GCN: ; %bb.0: ; %entry
88 ; GCN-NEXT: s_load_dword s4, s[0:1], 0x34
89 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
90 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
91 ; GCN-NEXT: s_cmp_lg_u32 s4, 1
92 ; GCN-NEXT: v_mov_b32_e32 v0, s3
93 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
94 ; GCN-NEXT: s_cmp_lg_u32 s4, 0
95 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1.0, v0, vcc
96 ; GCN-NEXT: v_mov_b32_e32 v0, s2
97 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
98 ; GCN-NEXT: v_mov_b32_e32 v3, s1
99 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1.0, v0, vcc
100 ; GCN-NEXT: v_mov_b32_e32 v2, s0
101 ; GCN-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
104 %v = insertelement <2 x float> %vec, float 1.000000e+00, i32 %sel
105 store <2 x float> %v, ptr addrspace(1) %out
109 define amdgpu_kernel void @float8_inselt(ptr addrspace(1) %out, <8 x float> %vec, i32 %sel) {
110 ; GCN-LABEL: float8_inselt:
111 ; GCN: ; %bb.0: ; %entry
112 ; GCN-NEXT: s_load_dwordx8 s[4:11], s[0:1], 0x44
113 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x64
114 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
115 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
116 ; GCN-NEXT: v_mov_b32_e32 v0, s4
117 ; GCN-NEXT: s_mov_b32 m0, s2
118 ; GCN-NEXT: s_add_u32 s2, s0, 16
119 ; GCN-NEXT: s_addc_u32 s3, s1, 0
120 ; GCN-NEXT: v_mov_b32_e32 v1, s5
121 ; GCN-NEXT: v_mov_b32_e32 v2, s6
122 ; GCN-NEXT: v_mov_b32_e32 v3, s7
123 ; GCN-NEXT: v_mov_b32_e32 v4, s8
124 ; GCN-NEXT: v_mov_b32_e32 v5, s9
125 ; GCN-NEXT: v_mov_b32_e32 v6, s10
126 ; GCN-NEXT: v_mov_b32_e32 v7, s11
127 ; GCN-NEXT: v_mov_b32_e32 v9, s3
128 ; GCN-NEXT: v_movreld_b32_e32 v0, 1.0
129 ; GCN-NEXT: v_mov_b32_e32 v8, s2
130 ; GCN-NEXT: flat_store_dwordx4 v[8:9], v[4:7]
132 ; GCN-NEXT: v_mov_b32_e32 v5, s1
133 ; GCN-NEXT: v_mov_b32_e32 v4, s0
134 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
137 %v = insertelement <8 x float> %vec, float 1.000000e+00, i32 %sel
138 store <8 x float> %v, ptr addrspace(1) %out
142 define amdgpu_kernel void @float16_inselt(ptr addrspace(1) %out, <16 x float> %vec, i32 %sel) {
143 ; GCN-LABEL: float16_inselt:
144 ; GCN: ; %bb.0: ; %entry
145 ; GCN-NEXT: s_load_dwordx16 s[4:19], s[0:1], 0x64
146 ; GCN-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
147 ; GCN-NEXT: s_load_dword s20, s[0:1], 0xa4
148 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
149 ; GCN-NEXT: v_mov_b32_e32 v0, s4
150 ; GCN-NEXT: s_add_u32 s0, s2, 48
151 ; GCN-NEXT: s_addc_u32 s1, s3, 0
152 ; GCN-NEXT: v_mov_b32_e32 v17, s1
153 ; GCN-NEXT: v_mov_b32_e32 v1, s5
154 ; GCN-NEXT: v_mov_b32_e32 v2, s6
155 ; GCN-NEXT: v_mov_b32_e32 v3, s7
156 ; GCN-NEXT: v_mov_b32_e32 v4, s8
157 ; GCN-NEXT: v_mov_b32_e32 v5, s9
158 ; GCN-NEXT: v_mov_b32_e32 v6, s10
159 ; GCN-NEXT: v_mov_b32_e32 v7, s11
160 ; GCN-NEXT: v_mov_b32_e32 v8, s12
161 ; GCN-NEXT: v_mov_b32_e32 v9, s13
162 ; GCN-NEXT: v_mov_b32_e32 v10, s14
163 ; GCN-NEXT: v_mov_b32_e32 v11, s15
164 ; GCN-NEXT: v_mov_b32_e32 v12, s16
165 ; GCN-NEXT: v_mov_b32_e32 v13, s17
166 ; GCN-NEXT: v_mov_b32_e32 v14, s18
167 ; GCN-NEXT: v_mov_b32_e32 v15, s19
168 ; GCN-NEXT: s_mov_b32 m0, s20
169 ; GCN-NEXT: v_mov_b32_e32 v16, s0
170 ; GCN-NEXT: s_add_u32 s0, s2, 32
171 ; GCN-NEXT: v_movreld_b32_e32 v0, 1.0
172 ; GCN-NEXT: s_addc_u32 s1, s3, 0
173 ; GCN-NEXT: flat_store_dwordx4 v[16:17], v[12:15]
175 ; GCN-NEXT: v_mov_b32_e32 v13, s1
176 ; GCN-NEXT: v_mov_b32_e32 v12, s0
177 ; GCN-NEXT: s_add_u32 s0, s2, 16
178 ; GCN-NEXT: s_addc_u32 s1, s3, 0
179 ; GCN-NEXT: flat_store_dwordx4 v[12:13], v[8:11]
181 ; GCN-NEXT: v_mov_b32_e32 v9, s1
182 ; GCN-NEXT: v_mov_b32_e32 v8, s0
183 ; GCN-NEXT: flat_store_dwordx4 v[8:9], v[4:7]
185 ; GCN-NEXT: v_mov_b32_e32 v5, s3
186 ; GCN-NEXT: v_mov_b32_e32 v4, s2
187 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
190 %v = insertelement <16 x float> %vec, float 1.000000e+00, i32 %sel
191 store <16 x float> %v, ptr addrspace(1) %out
195 define amdgpu_kernel void @float32_inselt(ptr addrspace(1) %out, <32 x float> %vec, i32 %sel) {
196 ; GCN-LABEL: float32_inselt:
197 ; GCN: ; %bb.0: ; %entry
198 ; GCN-NEXT: s_load_dwordx16 s[36:51], s[0:1], 0xa4
199 ; GCN-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
200 ; GCN-NEXT: s_load_dwordx16 s[4:19], s[0:1], 0xe4
201 ; GCN-NEXT: s_load_dword s0, s[0:1], 0x124
202 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
203 ; GCN-NEXT: v_mov_b32_e32 v0, s36
204 ; GCN-NEXT: v_mov_b32_e32 v1, s37
205 ; GCN-NEXT: v_mov_b32_e32 v2, s38
206 ; GCN-NEXT: s_mov_b32 m0, s0
207 ; GCN-NEXT: s_add_u32 s0, s2, 0x70
208 ; GCN-NEXT: s_addc_u32 s1, s3, 0
209 ; GCN-NEXT: v_mov_b32_e32 v33, s1
210 ; GCN-NEXT: v_mov_b32_e32 v3, s39
211 ; GCN-NEXT: v_mov_b32_e32 v4, s40
212 ; GCN-NEXT: v_mov_b32_e32 v5, s41
213 ; GCN-NEXT: v_mov_b32_e32 v6, s42
214 ; GCN-NEXT: v_mov_b32_e32 v7, s43
215 ; GCN-NEXT: v_mov_b32_e32 v8, s44
216 ; GCN-NEXT: v_mov_b32_e32 v9, s45
217 ; GCN-NEXT: v_mov_b32_e32 v10, s46
218 ; GCN-NEXT: v_mov_b32_e32 v11, s47
219 ; GCN-NEXT: v_mov_b32_e32 v12, s48
220 ; GCN-NEXT: v_mov_b32_e32 v13, s49
221 ; GCN-NEXT: v_mov_b32_e32 v14, s50
222 ; GCN-NEXT: v_mov_b32_e32 v15, s51
223 ; GCN-NEXT: v_mov_b32_e32 v16, s4
224 ; GCN-NEXT: v_mov_b32_e32 v17, s5
225 ; GCN-NEXT: v_mov_b32_e32 v18, s6
226 ; GCN-NEXT: v_mov_b32_e32 v19, s7
227 ; GCN-NEXT: v_mov_b32_e32 v20, s8
228 ; GCN-NEXT: v_mov_b32_e32 v21, s9
229 ; GCN-NEXT: v_mov_b32_e32 v22, s10
230 ; GCN-NEXT: v_mov_b32_e32 v23, s11
231 ; GCN-NEXT: v_mov_b32_e32 v24, s12
232 ; GCN-NEXT: v_mov_b32_e32 v25, s13
233 ; GCN-NEXT: v_mov_b32_e32 v26, s14
234 ; GCN-NEXT: v_mov_b32_e32 v27, s15
235 ; GCN-NEXT: v_mov_b32_e32 v28, s16
236 ; GCN-NEXT: v_mov_b32_e32 v29, s17
237 ; GCN-NEXT: v_mov_b32_e32 v30, s18
238 ; GCN-NEXT: v_mov_b32_e32 v31, s19
239 ; GCN-NEXT: v_mov_b32_e32 v32, s0
240 ; GCN-NEXT: s_add_u32 s0, s2, 0x60
241 ; GCN-NEXT: v_movreld_b32_e32 v0, 1.0
242 ; GCN-NEXT: s_addc_u32 s1, s3, 0
243 ; GCN-NEXT: flat_store_dwordx4 v[32:33], v[28:31]
245 ; GCN-NEXT: v_mov_b32_e32 v29, s1
246 ; GCN-NEXT: v_mov_b32_e32 v28, s0
247 ; GCN-NEXT: s_add_u32 s0, s2, 0x50
248 ; GCN-NEXT: s_addc_u32 s1, s3, 0
249 ; GCN-NEXT: flat_store_dwordx4 v[28:29], v[24:27]
251 ; GCN-NEXT: v_mov_b32_e32 v25, s1
252 ; GCN-NEXT: v_mov_b32_e32 v24, s0
253 ; GCN-NEXT: s_add_u32 s0, s2, 64
254 ; GCN-NEXT: s_addc_u32 s1, s3, 0
255 ; GCN-NEXT: flat_store_dwordx4 v[24:25], v[20:23]
257 ; GCN-NEXT: v_mov_b32_e32 v21, s1
258 ; GCN-NEXT: v_mov_b32_e32 v20, s0
259 ; GCN-NEXT: s_add_u32 s0, s2, 48
260 ; GCN-NEXT: s_addc_u32 s1, s3, 0
261 ; GCN-NEXT: flat_store_dwordx4 v[20:21], v[16:19]
263 ; GCN-NEXT: v_mov_b32_e32 v17, s1
264 ; GCN-NEXT: v_mov_b32_e32 v16, s0
265 ; GCN-NEXT: s_add_u32 s0, s2, 32
266 ; GCN-NEXT: s_addc_u32 s1, s3, 0
267 ; GCN-NEXT: flat_store_dwordx4 v[16:17], v[12:15]
269 ; GCN-NEXT: v_mov_b32_e32 v13, s1
270 ; GCN-NEXT: v_mov_b32_e32 v12, s0
271 ; GCN-NEXT: s_add_u32 s0, s2, 16
272 ; GCN-NEXT: s_addc_u32 s1, s3, 0
273 ; GCN-NEXT: flat_store_dwordx4 v[12:13], v[8:11]
275 ; GCN-NEXT: v_mov_b32_e32 v9, s1
276 ; GCN-NEXT: v_mov_b32_e32 v8, s0
277 ; GCN-NEXT: flat_store_dwordx4 v[8:9], v[4:7]
279 ; GCN-NEXT: v_mov_b32_e32 v5, s3
280 ; GCN-NEXT: v_mov_b32_e32 v4, s2
281 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
284 %v = insertelement <32 x float> %vec, float 1.000000e+00, i32 %sel
285 store <32 x float> %v, ptr addrspace(1) %out
289 define amdgpu_kernel void @half4_inselt(ptr addrspace(1) %out, <4 x half> %vec, i32 %sel) {
290 ; GCN-LABEL: half4_inselt:
291 ; GCN: ; %bb.0: ; %entry
292 ; GCN-NEXT: s_load_dword s7, s[0:1], 0x34
293 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
294 ; GCN-NEXT: s_mov_b64 s[4:5], 0xffff
295 ; GCN-NEXT: s_mov_b32 s6, 0x3c003c00
296 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
297 ; GCN-NEXT: s_lshl_b32 s7, s7, 4
298 ; GCN-NEXT: s_lshl_b64 s[4:5], s[4:5], s7
299 ; GCN-NEXT: s_mov_b32 s7, s6
300 ; GCN-NEXT: s_andn2_b64 s[2:3], s[2:3], s[4:5]
301 ; GCN-NEXT: s_and_b64 s[4:5], s[4:5], s[6:7]
302 ; GCN-NEXT: s_or_b64 s[2:3], s[4:5], s[2:3]
303 ; GCN-NEXT: v_mov_b32_e32 v0, s0
304 ; GCN-NEXT: v_mov_b32_e32 v2, s2
305 ; GCN-NEXT: v_mov_b32_e32 v1, s1
306 ; GCN-NEXT: v_mov_b32_e32 v3, s3
307 ; GCN-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
310 %v = insertelement <4 x half> %vec, half 1.000000e+00, i32 %sel
311 store <4 x half> %v, ptr addrspace(1) %out
315 define amdgpu_kernel void @half2_inselt(ptr addrspace(1) %out, <2 x half> %vec, i32 %sel) {
316 ; GCN-LABEL: half2_inselt:
317 ; GCN: ; %bb.0: ; %entry
318 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
319 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
320 ; GCN-NEXT: s_lshl_b32 s3, s3, 4
321 ; GCN-NEXT: s_lshl_b32 s3, 0xffff, s3
322 ; GCN-NEXT: s_andn2_b32 s2, s2, s3
323 ; GCN-NEXT: s_and_b32 s3, s3, 0x3c003c00
324 ; GCN-NEXT: s_or_b32 s2, s3, s2
325 ; GCN-NEXT: v_mov_b32_e32 v0, s0
326 ; GCN-NEXT: v_mov_b32_e32 v1, s1
327 ; GCN-NEXT: v_mov_b32_e32 v2, s2
328 ; GCN-NEXT: flat_store_dword v[0:1], v2
331 %v = insertelement <2 x half> %vec, half 1.000000e+00, i32 %sel
332 store <2 x half> %v, ptr addrspace(1) %out
336 define amdgpu_kernel void @half8_inselt(ptr addrspace(1) %out, <8 x half> %vec, i32 %sel) {
337 ; GCN-LABEL: half8_inselt:
338 ; GCN: ; %bb.0: ; %entry
339 ; GCN-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
340 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x44
341 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
342 ; GCN-NEXT: v_mov_b32_e32 v0, 0x3c00
343 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
344 ; GCN-NEXT: s_lshr_b32 s3, s7, 16
345 ; GCN-NEXT: s_cmp_lg_u32 s2, 7
346 ; GCN-NEXT: v_mov_b32_e32 v1, s3
347 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
348 ; GCN-NEXT: s_cmp_lg_u32 s2, 6
349 ; GCN-NEXT: v_cndmask_b32_e32 v1, v0, v1, vcc
350 ; GCN-NEXT: v_mov_b32_e32 v2, s7
351 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
352 ; GCN-NEXT: s_lshr_b32 s3, s6, 16
353 ; GCN-NEXT: v_lshlrev_b32_e32 v1, 16, v1
354 ; GCN-NEXT: v_cndmask_b32_e32 v2, v0, v2, vcc
355 ; GCN-NEXT: s_cmp_lg_u32 s2, 5
356 ; GCN-NEXT: v_or_b32_sdwa v3, v2, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
357 ; GCN-NEXT: v_mov_b32_e32 v1, s3
358 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
359 ; GCN-NEXT: s_cmp_lg_u32 s2, 4
360 ; GCN-NEXT: v_cndmask_b32_e32 v1, v0, v1, vcc
361 ; GCN-NEXT: v_mov_b32_e32 v2, s6
362 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
363 ; GCN-NEXT: s_lshr_b32 s3, s5, 16
364 ; GCN-NEXT: v_lshlrev_b32_e32 v1, 16, v1
365 ; GCN-NEXT: v_cndmask_b32_e32 v2, v0, v2, vcc
366 ; GCN-NEXT: s_cmp_lg_u32 s2, 3
367 ; GCN-NEXT: v_or_b32_sdwa v2, v2, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
368 ; GCN-NEXT: v_mov_b32_e32 v1, s3
369 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
370 ; GCN-NEXT: s_cmp_lg_u32 s2, 2
371 ; GCN-NEXT: v_cndmask_b32_e32 v1, v0, v1, vcc
372 ; GCN-NEXT: v_mov_b32_e32 v4, s5
373 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
374 ; GCN-NEXT: s_lshr_b32 s3, s4, 16
375 ; GCN-NEXT: v_lshlrev_b32_e32 v1, 16, v1
376 ; GCN-NEXT: v_cndmask_b32_e32 v4, v0, v4, vcc
377 ; GCN-NEXT: s_cmp_lg_u32 s2, 1
378 ; GCN-NEXT: v_or_b32_sdwa v1, v4, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
379 ; GCN-NEXT: v_mov_b32_e32 v4, s3
380 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
381 ; GCN-NEXT: s_cmp_lg_u32 s2, 0
382 ; GCN-NEXT: v_cndmask_b32_e32 v4, v0, v4, vcc
383 ; GCN-NEXT: v_mov_b32_e32 v5, s4
384 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
385 ; GCN-NEXT: v_lshlrev_b32_e32 v4, 16, v4
386 ; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
387 ; GCN-NEXT: v_or_b32_sdwa v0, v0, v4 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
388 ; GCN-NEXT: v_mov_b32_e32 v5, s1
389 ; GCN-NEXT: v_mov_b32_e32 v4, s0
390 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
393 %v = insertelement <8 x half> %vec, half 1.000000e+00, i32 %sel
394 store <8 x half> %v, ptr addrspace(1) %out
398 define amdgpu_kernel void @short2_inselt(ptr addrspace(1) %out, <2 x i16> %vec, i32 %sel) {
399 ; GCN-LABEL: short2_inselt:
400 ; GCN: ; %bb.0: ; %entry
401 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
402 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
403 ; GCN-NEXT: s_lshl_b32 s3, s3, 4
404 ; GCN-NEXT: s_lshl_b32 s3, 0xffff, s3
405 ; GCN-NEXT: s_andn2_b32 s2, s2, s3
406 ; GCN-NEXT: s_and_b32 s3, s3, 0x10001
407 ; GCN-NEXT: s_or_b32 s2, s3, s2
408 ; GCN-NEXT: v_mov_b32_e32 v0, s0
409 ; GCN-NEXT: v_mov_b32_e32 v1, s1
410 ; GCN-NEXT: v_mov_b32_e32 v2, s2
411 ; GCN-NEXT: flat_store_dword v[0:1], v2
414 %v = insertelement <2 x i16> %vec, i16 1, i32 %sel
415 store <2 x i16> %v, ptr addrspace(1) %out
419 define amdgpu_kernel void @short4_inselt(ptr addrspace(1) %out, <4 x i16> %vec, i32 %sel) {
420 ; GCN-LABEL: short4_inselt:
421 ; GCN: ; %bb.0: ; %entry
422 ; GCN-NEXT: s_load_dword s7, s[0:1], 0x34
423 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
424 ; GCN-NEXT: s_mov_b64 s[4:5], 0xffff
425 ; GCN-NEXT: s_mov_b32 s6, 0x10001
426 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
427 ; GCN-NEXT: s_lshl_b32 s7, s7, 4
428 ; GCN-NEXT: s_lshl_b64 s[4:5], s[4:5], s7
429 ; GCN-NEXT: s_mov_b32 s7, s6
430 ; GCN-NEXT: s_andn2_b64 s[2:3], s[2:3], s[4:5]
431 ; GCN-NEXT: s_and_b64 s[4:5], s[4:5], s[6:7]
432 ; GCN-NEXT: s_or_b64 s[2:3], s[4:5], s[2:3]
433 ; GCN-NEXT: v_mov_b32_e32 v0, s0
434 ; GCN-NEXT: v_mov_b32_e32 v2, s2
435 ; GCN-NEXT: v_mov_b32_e32 v1, s1
436 ; GCN-NEXT: v_mov_b32_e32 v3, s3
437 ; GCN-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
440 %v = insertelement <4 x i16> %vec, i16 1, i32 %sel
441 store <4 x i16> %v, ptr addrspace(1) %out
445 define amdgpu_kernel void @byte8_inselt(ptr addrspace(1) %out, <8 x i8> %vec, i32 %sel) {
446 ; GCN-LABEL: byte8_inselt:
447 ; GCN: ; %bb.0: ; %entry
448 ; GCN-NEXT: s_load_dword s6, s[0:1], 0x34
449 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
450 ; GCN-NEXT: s_mov_b64 s[4:5], 0xff
451 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
452 ; GCN-NEXT: s_lshl_b32 s6, s6, 3
453 ; GCN-NEXT: s_lshl_b64 s[4:5], s[4:5], s6
454 ; GCN-NEXT: s_and_b32 s7, s5, 0x1010101
455 ; GCN-NEXT: s_and_b32 s6, s4, 0x1010101
456 ; GCN-NEXT: s_andn2_b64 s[2:3], s[2:3], s[4:5]
457 ; GCN-NEXT: s_or_b64 s[2:3], s[6:7], s[2:3]
458 ; GCN-NEXT: v_mov_b32_e32 v3, s1
459 ; GCN-NEXT: v_mov_b32_e32 v0, s2
460 ; GCN-NEXT: v_mov_b32_e32 v1, s3
461 ; GCN-NEXT: v_mov_b32_e32 v2, s0
462 ; GCN-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
465 %v = insertelement <8 x i8> %vec, i8 1, i32 %sel
466 store <8 x i8> %v, ptr addrspace(1) %out
470 define amdgpu_kernel void @byte16_inselt(ptr addrspace(1) %out, <16 x i8> %vec, i32 %sel) {
471 ; GCN-LABEL: byte16_inselt:
472 ; GCN: ; %bb.0: ; %entry
473 ; GCN-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
474 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x44
475 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
476 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
477 ; GCN-NEXT: s_lshr_b32 s3, s7, 24
478 ; GCN-NEXT: s_cmp_lg_u32 s2, 15
479 ; GCN-NEXT: v_mov_b32_e32 v0, s3
480 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
481 ; GCN-NEXT: s_lshr_b32 s3, s7, 16
482 ; GCN-NEXT: s_cmp_lg_u32 s2, 14
483 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1, v0, vcc
484 ; GCN-NEXT: v_mov_b32_e32 v1, s3
485 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
486 ; GCN-NEXT: s_lshr_b32 s3, s7, 8
487 ; GCN-NEXT: v_lshlrev_b16_e32 v0, 8, v0
488 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
489 ; GCN-NEXT: s_cmp_lg_u32 s2, 13
490 ; GCN-NEXT: v_or_b32_sdwa v0, v1, v0 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
491 ; GCN-NEXT: v_mov_b32_e32 v1, s3
492 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
493 ; GCN-NEXT: s_cmp_lg_u32 s2, 12
494 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
495 ; GCN-NEXT: v_mov_b32_e32 v2, s7
496 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
497 ; GCN-NEXT: v_lshlrev_b16_e32 v1, 8, v1
498 ; GCN-NEXT: v_cndmask_b32_e32 v2, 1, v2, vcc
499 ; GCN-NEXT: s_lshr_b32 s3, s6, 24
500 ; GCN-NEXT: v_or_b32_sdwa v1, v2, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
501 ; GCN-NEXT: s_cmp_lg_u32 s2, 11
502 ; GCN-NEXT: v_or_b32_sdwa v3, v1, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
503 ; GCN-NEXT: v_mov_b32_e32 v0, s3
504 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
505 ; GCN-NEXT: s_lshr_b32 s3, s6, 16
506 ; GCN-NEXT: s_cmp_lg_u32 s2, 10
507 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1, v0, vcc
508 ; GCN-NEXT: v_mov_b32_e32 v1, s3
509 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
510 ; GCN-NEXT: s_lshr_b32 s3, s6, 8
511 ; GCN-NEXT: v_lshlrev_b16_e32 v0, 8, v0
512 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
513 ; GCN-NEXT: s_cmp_lg_u32 s2, 9
514 ; GCN-NEXT: v_or_b32_sdwa v0, v1, v0 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
515 ; GCN-NEXT: v_mov_b32_e32 v1, s3
516 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
517 ; GCN-NEXT: s_cmp_lg_u32 s2, 8
518 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
519 ; GCN-NEXT: v_mov_b32_e32 v2, s6
520 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
521 ; GCN-NEXT: v_lshlrev_b16_e32 v1, 8, v1
522 ; GCN-NEXT: v_cndmask_b32_e32 v2, 1, v2, vcc
523 ; GCN-NEXT: s_lshr_b32 s3, s5, 24
524 ; GCN-NEXT: v_or_b32_sdwa v1, v2, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
525 ; GCN-NEXT: s_cmp_lg_u32 s2, 7
526 ; GCN-NEXT: v_or_b32_sdwa v2, v1, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
527 ; GCN-NEXT: v_mov_b32_e32 v0, s3
528 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
529 ; GCN-NEXT: s_lshr_b32 s3, s5, 16
530 ; GCN-NEXT: s_cmp_lg_u32 s2, 6
531 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1, v0, vcc
532 ; GCN-NEXT: v_mov_b32_e32 v1, s3
533 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
534 ; GCN-NEXT: s_lshr_b32 s3, s5, 8
535 ; GCN-NEXT: v_lshlrev_b16_e32 v0, 8, v0
536 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
537 ; GCN-NEXT: s_cmp_lg_u32 s2, 5
538 ; GCN-NEXT: v_or_b32_sdwa v0, v1, v0 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
539 ; GCN-NEXT: v_mov_b32_e32 v1, s3
540 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
541 ; GCN-NEXT: s_cmp_lg_u32 s2, 4
542 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
543 ; GCN-NEXT: v_mov_b32_e32 v4, s5
544 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
545 ; GCN-NEXT: v_lshlrev_b16_e32 v1, 8, v1
546 ; GCN-NEXT: v_cndmask_b32_e32 v4, 1, v4, vcc
547 ; GCN-NEXT: s_lshr_b32 s3, s4, 24
548 ; GCN-NEXT: v_or_b32_sdwa v1, v4, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
549 ; GCN-NEXT: s_cmp_lg_u32 s2, 3
550 ; GCN-NEXT: v_or_b32_sdwa v1, v1, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
551 ; GCN-NEXT: v_mov_b32_e32 v0, s3
552 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
553 ; GCN-NEXT: s_lshr_b32 s3, s4, 16
554 ; GCN-NEXT: s_cmp_lg_u32 s2, 2
555 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1, v0, vcc
556 ; GCN-NEXT: v_mov_b32_e32 v4, s3
557 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
558 ; GCN-NEXT: s_lshr_b32 s3, s4, 8
559 ; GCN-NEXT: v_lshlrev_b16_e32 v0, 8, v0
560 ; GCN-NEXT: v_cndmask_b32_e32 v4, 1, v4, vcc
561 ; GCN-NEXT: s_cmp_lg_u32 s2, 1
562 ; GCN-NEXT: v_or_b32_sdwa v0, v4, v0 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
563 ; GCN-NEXT: v_mov_b32_e32 v4, s3
564 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
565 ; GCN-NEXT: s_cmp_lg_u32 s2, 0
566 ; GCN-NEXT: v_cndmask_b32_e32 v4, 1, v4, vcc
567 ; GCN-NEXT: v_mov_b32_e32 v5, s4
568 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
569 ; GCN-NEXT: v_lshlrev_b16_e32 v4, 8, v4
570 ; GCN-NEXT: v_cndmask_b32_e32 v5, 1, v5, vcc
571 ; GCN-NEXT: v_or_b32_sdwa v4, v5, v4 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
572 ; GCN-NEXT: v_or_b32_sdwa v0, v4, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
573 ; GCN-NEXT: v_mov_b32_e32 v5, s1
574 ; GCN-NEXT: v_mov_b32_e32 v4, s0
575 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
578 %v = insertelement <16 x i8> %vec, i8 1, i32 %sel
579 store <16 x i8> %v, ptr addrspace(1) %out
583 define amdgpu_kernel void @double2_inselt(ptr addrspace(1) %out, <2 x double> %vec, i32 %sel) {
584 ; GCN-LABEL: double2_inselt:
585 ; GCN: ; %bb.0: ; %entry
586 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x44
587 ; GCN-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
588 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
589 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
590 ; GCN-NEXT: s_cmp_eq_u32 s2, 1
591 ; GCN-NEXT: s_cselect_b32 s3, 0x3ff00000, s7
592 ; GCN-NEXT: s_cselect_b32 s6, 0, s6
593 ; GCN-NEXT: s_cmp_eq_u32 s2, 0
594 ; GCN-NEXT: s_cselect_b32 s2, 0x3ff00000, s5
595 ; GCN-NEXT: s_cselect_b32 s4, 0, s4
596 ; GCN-NEXT: v_mov_b32_e32 v5, s1
597 ; GCN-NEXT: v_mov_b32_e32 v0, s4
598 ; GCN-NEXT: v_mov_b32_e32 v1, s2
599 ; GCN-NEXT: v_mov_b32_e32 v2, s6
600 ; GCN-NEXT: v_mov_b32_e32 v3, s3
601 ; GCN-NEXT: v_mov_b32_e32 v4, s0
602 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
605 %v = insertelement <2 x double> %vec, double 1.000000e+00, i32 %sel
606 store <2 x double> %v, ptr addrspace(1) %out
610 define amdgpu_kernel void @double5_inselt(ptr addrspace(1) %out, <5 x double> %vec, i32 %sel) {
611 ; GCN-LABEL: double5_inselt:
612 ; GCN: ; %bb.0: ; %entry
613 ; GCN-NEXT: s_load_dword s12, s[0:1], 0xa4
614 ; GCN-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x84
615 ; GCN-NEXT: s_load_dwordx2 s[10:11], s[0:1], 0x24
616 ; GCN-NEXT: s_load_dwordx8 s[0:7], s[0:1], 0x64
617 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
618 ; GCN-NEXT: s_cmp_eq_u32 s12, 4
619 ; GCN-NEXT: s_cselect_b32 s9, 0x3ff00000, s9
620 ; GCN-NEXT: s_cselect_b32 s8, 0, s8
621 ; GCN-NEXT: s_cmp_eq_u32 s12, 1
622 ; GCN-NEXT: s_cselect_b32 s3, 0x3ff00000, s3
623 ; GCN-NEXT: s_cselect_b32 s2, 0, s2
624 ; GCN-NEXT: s_cmp_eq_u32 s12, 0
625 ; GCN-NEXT: s_cselect_b32 s13, 0x3ff00000, s1
626 ; GCN-NEXT: s_cselect_b32 s14, 0, s0
627 ; GCN-NEXT: s_cmp_eq_u32 s12, 3
628 ; GCN-NEXT: s_cselect_b32 s0, 0x3ff00000, s7
629 ; GCN-NEXT: s_cselect_b32 s1, 0, s6
630 ; GCN-NEXT: s_cmp_eq_u32 s12, 2
631 ; GCN-NEXT: s_cselect_b32 s5, 0x3ff00000, s5
632 ; GCN-NEXT: s_cselect_b32 s4, 0, s4
633 ; GCN-NEXT: v_mov_b32_e32 v3, s0
634 ; GCN-NEXT: s_add_u32 s0, s10, 16
635 ; GCN-NEXT: v_mov_b32_e32 v2, s1
636 ; GCN-NEXT: s_addc_u32 s1, s11, 0
637 ; GCN-NEXT: v_mov_b32_e32 v5, s1
638 ; GCN-NEXT: v_mov_b32_e32 v0, s4
639 ; GCN-NEXT: v_mov_b32_e32 v1, s5
640 ; GCN-NEXT: v_mov_b32_e32 v4, s0
641 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
642 ; GCN-NEXT: v_mov_b32_e32 v4, s10
643 ; GCN-NEXT: s_add_u32 s0, s10, 32
644 ; GCN-NEXT: v_mov_b32_e32 v0, s14
645 ; GCN-NEXT: v_mov_b32_e32 v1, s13
646 ; GCN-NEXT: v_mov_b32_e32 v2, s2
647 ; GCN-NEXT: v_mov_b32_e32 v3, s3
648 ; GCN-NEXT: v_mov_b32_e32 v5, s11
649 ; GCN-NEXT: s_addc_u32 s1, s11, 0
650 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
652 ; GCN-NEXT: v_mov_b32_e32 v3, s1
653 ; GCN-NEXT: v_mov_b32_e32 v0, s8
654 ; GCN-NEXT: v_mov_b32_e32 v1, s9
655 ; GCN-NEXT: v_mov_b32_e32 v2, s0
656 ; GCN-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
659 %v = insertelement <5 x double> %vec, double 1.000000e+00, i32 %sel
660 store <5 x double> %v, ptr addrspace(1) %out
664 define amdgpu_kernel void @double8_inselt(ptr addrspace(1) %out, <8 x double> %vec, i32 %sel) {
665 ; GCN-LABEL: double8_inselt:
666 ; GCN: ; %bb.0: ; %entry
667 ; GCN-NEXT: s_load_dword s2, s[0:1], 0xa4
668 ; GCN-NEXT: s_load_dwordx16 s[4:19], s[0:1], 0x64
669 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
670 ; GCN-NEXT: v_mov_b32_e32 v16, 0x3ff00000
671 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
672 ; GCN-NEXT: s_lshl_b32 s2, s2, 1
673 ; GCN-NEXT: v_mov_b32_e32 v0, s4
674 ; GCN-NEXT: v_mov_b32_e32 v1, s5
675 ; GCN-NEXT: v_mov_b32_e32 v2, s6
676 ; GCN-NEXT: v_mov_b32_e32 v3, s7
677 ; GCN-NEXT: v_mov_b32_e32 v4, s8
678 ; GCN-NEXT: v_mov_b32_e32 v5, s9
679 ; GCN-NEXT: v_mov_b32_e32 v6, s10
680 ; GCN-NEXT: v_mov_b32_e32 v7, s11
681 ; GCN-NEXT: v_mov_b32_e32 v8, s12
682 ; GCN-NEXT: v_mov_b32_e32 v9, s13
683 ; GCN-NEXT: v_mov_b32_e32 v10, s14
684 ; GCN-NEXT: v_mov_b32_e32 v11, s15
685 ; GCN-NEXT: v_mov_b32_e32 v12, s16
686 ; GCN-NEXT: v_mov_b32_e32 v13, s17
687 ; GCN-NEXT: v_mov_b32_e32 v14, s18
688 ; GCN-NEXT: v_mov_b32_e32 v15, s19
689 ; GCN-NEXT: s_mov_b32 m0, s2
690 ; GCN-NEXT: s_add_u32 s2, s0, 48
691 ; GCN-NEXT: v_movreld_b32_e32 v0, 0
692 ; GCN-NEXT: s_addc_u32 s3, s1, 0
693 ; GCN-NEXT: v_movreld_b32_e32 v1, v16
694 ; GCN-NEXT: v_mov_b32_e32 v17, s3
695 ; GCN-NEXT: v_mov_b32_e32 v16, s2
696 ; GCN-NEXT: s_add_u32 s2, s0, 32
697 ; GCN-NEXT: s_addc_u32 s3, s1, 0
698 ; GCN-NEXT: flat_store_dwordx4 v[16:17], v[12:15]
700 ; GCN-NEXT: v_mov_b32_e32 v13, s3
701 ; GCN-NEXT: v_mov_b32_e32 v12, s2
702 ; GCN-NEXT: s_add_u32 s2, s0, 16
703 ; GCN-NEXT: s_addc_u32 s3, s1, 0
704 ; GCN-NEXT: flat_store_dwordx4 v[12:13], v[8:11]
706 ; GCN-NEXT: v_mov_b32_e32 v9, s3
707 ; GCN-NEXT: v_mov_b32_e32 v8, s2
708 ; GCN-NEXT: flat_store_dwordx4 v[8:9], v[4:7]
710 ; GCN-NEXT: v_mov_b32_e32 v5, s1
711 ; GCN-NEXT: v_mov_b32_e32 v4, s0
712 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
715 %v = insertelement <8 x double> %vec, double 1.000000e+00, i32 %sel
716 store <8 x double> %v, ptr addrspace(1) %out
720 define amdgpu_kernel void @double7_inselt(ptr addrspace(1) %out, <7 x double> %vec, i32 %sel) {
721 ; GCN-LABEL: double7_inselt:
722 ; GCN: ; %bb.0: ; %entry
723 ; GCN-NEXT: s_load_dwordx8 s[4:11], s[0:1], 0x64
724 ; GCN-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
725 ; GCN-NEXT: s_load_dwordx2 s[16:17], s[0:1], 0x94
726 ; GCN-NEXT: s_load_dwordx4 s[12:15], s[0:1], 0x84
727 ; GCN-NEXT: s_load_dword s0, s[0:1], 0xa4
728 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
729 ; GCN-NEXT: v_mov_b32_e32 v0, s4
730 ; GCN-NEXT: v_mov_b32_e32 v1, s5
731 ; GCN-NEXT: v_mov_b32_e32 v2, s6
732 ; GCN-NEXT: v_mov_b32_e32 v3, s7
733 ; GCN-NEXT: s_lshl_b32 s0, s0, 1
734 ; GCN-NEXT: v_mov_b32_e32 v4, s8
735 ; GCN-NEXT: v_mov_b32_e32 v5, s9
736 ; GCN-NEXT: v_mov_b32_e32 v6, s10
737 ; GCN-NEXT: v_mov_b32_e32 v7, s11
738 ; GCN-NEXT: v_mov_b32_e32 v8, s12
739 ; GCN-NEXT: v_mov_b32_e32 v9, s13
740 ; GCN-NEXT: v_mov_b32_e32 v10, s14
741 ; GCN-NEXT: v_mov_b32_e32 v11, s15
742 ; GCN-NEXT: v_mov_b32_e32 v12, s16
743 ; GCN-NEXT: v_mov_b32_e32 v13, s17
744 ; GCN-NEXT: s_mov_b32 m0, s0
745 ; GCN-NEXT: v_movreld_b32_e32 v0, 0
746 ; GCN-NEXT: v_mov_b32_e32 v16, 0x3ff00000
747 ; GCN-NEXT: s_add_u32 s0, s2, 16
748 ; GCN-NEXT: v_movreld_b32_e32 v1, v16
749 ; GCN-NEXT: s_addc_u32 s1, s3, 0
750 ; GCN-NEXT: v_mov_b32_e32 v15, s1
751 ; GCN-NEXT: v_mov_b32_e32 v14, s0
752 ; GCN-NEXT: flat_store_dwordx4 v[14:15], v[4:7]
753 ; GCN-NEXT: s_add_u32 s0, s2, 48
754 ; GCN-NEXT: v_mov_b32_e32 v5, s3
755 ; GCN-NEXT: v_mov_b32_e32 v4, s2
756 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
757 ; GCN-NEXT: s_addc_u32 s1, s3, 0
758 ; GCN-NEXT: v_mov_b32_e32 v0, s0
759 ; GCN-NEXT: v_mov_b32_e32 v1, s1
760 ; GCN-NEXT: s_add_u32 s0, s2, 32
761 ; GCN-NEXT: flat_store_dwordx2 v[0:1], v[12:13]
762 ; GCN-NEXT: s_addc_u32 s1, s3, 0
763 ; GCN-NEXT: v_mov_b32_e32 v0, s0
764 ; GCN-NEXT: v_mov_b32_e32 v1, s1
765 ; GCN-NEXT: flat_store_dwordx4 v[0:1], v[8:11]
768 %v = insertelement <7 x double> %vec, double 1.000000e+00, i32 %sel
769 store <7 x double> %v, ptr addrspace(1) %out
773 define amdgpu_kernel void @double16_inselt(ptr addrspace(1) %out, <16 x double> %vec, i32 %sel) {
774 ; GCN-LABEL: double16_inselt:
775 ; GCN: ; %bb.0: ; %entry
776 ; GCN-NEXT: s_load_dword s2, s[0:1], 0x124
777 ; GCN-NEXT: s_load_dwordx16 s[36:51], s[0:1], 0xa4
778 ; GCN-NEXT: s_load_dwordx16 s[4:19], s[0:1], 0xe4
779 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
780 ; GCN-NEXT: v_mov_b32_e32 v32, 0x3ff00000
781 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
782 ; GCN-NEXT: v_mov_b32_e32 v0, s36
783 ; GCN-NEXT: s_lshl_b32 s2, s2, 1
784 ; GCN-NEXT: v_mov_b32_e32 v1, s37
785 ; GCN-NEXT: v_mov_b32_e32 v2, s38
786 ; GCN-NEXT: v_mov_b32_e32 v3, s39
787 ; GCN-NEXT: v_mov_b32_e32 v4, s40
788 ; GCN-NEXT: v_mov_b32_e32 v5, s41
789 ; GCN-NEXT: v_mov_b32_e32 v6, s42
790 ; GCN-NEXT: v_mov_b32_e32 v7, s43
791 ; GCN-NEXT: v_mov_b32_e32 v8, s44
792 ; GCN-NEXT: v_mov_b32_e32 v9, s45
793 ; GCN-NEXT: v_mov_b32_e32 v10, s46
794 ; GCN-NEXT: v_mov_b32_e32 v11, s47
795 ; GCN-NEXT: v_mov_b32_e32 v12, s48
796 ; GCN-NEXT: v_mov_b32_e32 v13, s49
797 ; GCN-NEXT: v_mov_b32_e32 v14, s50
798 ; GCN-NEXT: v_mov_b32_e32 v15, s51
799 ; GCN-NEXT: v_mov_b32_e32 v16, s4
800 ; GCN-NEXT: v_mov_b32_e32 v17, s5
801 ; GCN-NEXT: v_mov_b32_e32 v18, s6
802 ; GCN-NEXT: v_mov_b32_e32 v19, s7
803 ; GCN-NEXT: v_mov_b32_e32 v20, s8
804 ; GCN-NEXT: v_mov_b32_e32 v21, s9
805 ; GCN-NEXT: v_mov_b32_e32 v22, s10
806 ; GCN-NEXT: v_mov_b32_e32 v23, s11
807 ; GCN-NEXT: v_mov_b32_e32 v24, s12
808 ; GCN-NEXT: v_mov_b32_e32 v25, s13
809 ; GCN-NEXT: v_mov_b32_e32 v26, s14
810 ; GCN-NEXT: v_mov_b32_e32 v27, s15
811 ; GCN-NEXT: v_mov_b32_e32 v28, s16
812 ; GCN-NEXT: v_mov_b32_e32 v29, s17
813 ; GCN-NEXT: v_mov_b32_e32 v30, s18
814 ; GCN-NEXT: v_mov_b32_e32 v31, s19
815 ; GCN-NEXT: s_mov_b32 m0, s2
816 ; GCN-NEXT: s_add_u32 s2, s0, 0x70
817 ; GCN-NEXT: v_movreld_b32_e32 v0, 0
818 ; GCN-NEXT: s_addc_u32 s3, s1, 0
819 ; GCN-NEXT: v_movreld_b32_e32 v1, v32
820 ; GCN-NEXT: v_mov_b32_e32 v33, s3
821 ; GCN-NEXT: v_mov_b32_e32 v32, s2
822 ; GCN-NEXT: s_add_u32 s2, s0, 0x60
823 ; GCN-NEXT: s_addc_u32 s3, s1, 0
824 ; GCN-NEXT: flat_store_dwordx4 v[32:33], v[28:31]
826 ; GCN-NEXT: v_mov_b32_e32 v29, s3
827 ; GCN-NEXT: v_mov_b32_e32 v28, s2
828 ; GCN-NEXT: s_add_u32 s2, s0, 0x50
829 ; GCN-NEXT: s_addc_u32 s3, s1, 0
830 ; GCN-NEXT: flat_store_dwordx4 v[28:29], v[24:27]
832 ; GCN-NEXT: v_mov_b32_e32 v25, s3
833 ; GCN-NEXT: v_mov_b32_e32 v24, s2
834 ; GCN-NEXT: s_add_u32 s2, s0, 64
835 ; GCN-NEXT: s_addc_u32 s3, s1, 0
836 ; GCN-NEXT: flat_store_dwordx4 v[24:25], v[20:23]
838 ; GCN-NEXT: v_mov_b32_e32 v21, s3
839 ; GCN-NEXT: v_mov_b32_e32 v20, s2
840 ; GCN-NEXT: s_add_u32 s2, s0, 48
841 ; GCN-NEXT: s_addc_u32 s3, s1, 0
842 ; GCN-NEXT: flat_store_dwordx4 v[20:21], v[16:19]
844 ; GCN-NEXT: v_mov_b32_e32 v17, s3
845 ; GCN-NEXT: v_mov_b32_e32 v16, s2
846 ; GCN-NEXT: s_add_u32 s2, s0, 32
847 ; GCN-NEXT: s_addc_u32 s3, s1, 0
848 ; GCN-NEXT: flat_store_dwordx4 v[16:17], v[12:15]
850 ; GCN-NEXT: v_mov_b32_e32 v13, s3
851 ; GCN-NEXT: v_mov_b32_e32 v12, s2
852 ; GCN-NEXT: s_add_u32 s2, s0, 16
853 ; GCN-NEXT: s_addc_u32 s3, s1, 0
854 ; GCN-NEXT: flat_store_dwordx4 v[12:13], v[8:11]
856 ; GCN-NEXT: v_mov_b32_e32 v9, s3
857 ; GCN-NEXT: v_mov_b32_e32 v8, s2
858 ; GCN-NEXT: flat_store_dwordx4 v[8:9], v[4:7]
860 ; GCN-NEXT: v_mov_b32_e32 v5, s1
861 ; GCN-NEXT: v_mov_b32_e32 v4, s0
862 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
865 %v = insertelement <16 x double> %vec, double 1.000000e+00, i32 %sel
866 store <16 x double> %v, ptr addrspace(1) %out
870 define amdgpu_kernel void @double15_inselt(ptr addrspace(1) %out, <15 x double> %vec, i32 %sel) {
871 ; GCN-LABEL: double15_inselt:
872 ; GCN: ; %bb.0: ; %entry
873 ; GCN-NEXT: s_load_dwordx16 s[4:19], s[0:1], 0xa4
874 ; GCN-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x114
875 ; GCN-NEXT: s_load_dwordx4 s[20:23], s[0:1], 0x104
876 ; GCN-NEXT: s_load_dwordx8 s[24:31], s[0:1], 0xe4
877 ; GCN-NEXT: v_mov_b32_e32 v32, 0x3ff00000
878 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
879 ; GCN-NEXT: v_mov_b32_e32 v0, s4
880 ; GCN-NEXT: s_load_dword s4, s[0:1], 0x124
881 ; GCN-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
882 ; GCN-NEXT: v_mov_b32_e32 v28, s2
883 ; GCN-NEXT: v_mov_b32_e32 v1, s5
884 ; GCN-NEXT: v_mov_b32_e32 v2, s6
885 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
886 ; GCN-NEXT: s_lshl_b32 s2, s4, 1
887 ; GCN-NEXT: v_mov_b32_e32 v3, s7
888 ; GCN-NEXT: v_mov_b32_e32 v4, s8
889 ; GCN-NEXT: v_mov_b32_e32 v5, s9
890 ; GCN-NEXT: v_mov_b32_e32 v6, s10
891 ; GCN-NEXT: v_mov_b32_e32 v7, s11
892 ; GCN-NEXT: v_mov_b32_e32 v8, s12
893 ; GCN-NEXT: v_mov_b32_e32 v9, s13
894 ; GCN-NEXT: v_mov_b32_e32 v10, s14
895 ; GCN-NEXT: v_mov_b32_e32 v11, s15
896 ; GCN-NEXT: v_mov_b32_e32 v12, s16
897 ; GCN-NEXT: v_mov_b32_e32 v13, s17
898 ; GCN-NEXT: v_mov_b32_e32 v14, s18
899 ; GCN-NEXT: v_mov_b32_e32 v15, s19
900 ; GCN-NEXT: v_mov_b32_e32 v16, s24
901 ; GCN-NEXT: v_mov_b32_e32 v17, s25
902 ; GCN-NEXT: v_mov_b32_e32 v18, s26
903 ; GCN-NEXT: v_mov_b32_e32 v19, s27
904 ; GCN-NEXT: v_mov_b32_e32 v20, s28
905 ; GCN-NEXT: v_mov_b32_e32 v21, s29
906 ; GCN-NEXT: v_mov_b32_e32 v22, s30
907 ; GCN-NEXT: v_mov_b32_e32 v23, s31
908 ; GCN-NEXT: v_mov_b32_e32 v24, s20
909 ; GCN-NEXT: v_mov_b32_e32 v25, s21
910 ; GCN-NEXT: v_mov_b32_e32 v26, s22
911 ; GCN-NEXT: v_mov_b32_e32 v27, s23
912 ; GCN-NEXT: v_mov_b32_e32 v29, s3
913 ; GCN-NEXT: s_mov_b32 m0, s2
914 ; GCN-NEXT: v_movreld_b32_e32 v0, 0
915 ; GCN-NEXT: s_add_u32 s2, s0, 0x50
916 ; GCN-NEXT: v_movreld_b32_e32 v1, v32
917 ; GCN-NEXT: s_addc_u32 s3, s1, 0
918 ; GCN-NEXT: v_mov_b32_e32 v31, s3
919 ; GCN-NEXT: v_mov_b32_e32 v30, s2
920 ; GCN-NEXT: s_add_u32 s2, s0, 64
921 ; GCN-NEXT: s_addc_u32 s3, s1, 0
922 ; GCN-NEXT: flat_store_dwordx4 v[30:31], v[20:23]
924 ; GCN-NEXT: v_mov_b32_e32 v21, s3
925 ; GCN-NEXT: v_mov_b32_e32 v20, s2
926 ; GCN-NEXT: s_add_u32 s2, s0, 48
927 ; GCN-NEXT: s_addc_u32 s3, s1, 0
928 ; GCN-NEXT: flat_store_dwordx4 v[20:21], v[16:19]
930 ; GCN-NEXT: v_mov_b32_e32 v17, s3
931 ; GCN-NEXT: v_mov_b32_e32 v16, s2
932 ; GCN-NEXT: s_add_u32 s2, s0, 32
933 ; GCN-NEXT: s_addc_u32 s3, s1, 0
934 ; GCN-NEXT: flat_store_dwordx4 v[16:17], v[12:15]
936 ; GCN-NEXT: v_mov_b32_e32 v13, s3
937 ; GCN-NEXT: v_mov_b32_e32 v12, s2
938 ; GCN-NEXT: s_add_u32 s2, s0, 16
939 ; GCN-NEXT: s_addc_u32 s3, s1, 0
940 ; GCN-NEXT: flat_store_dwordx4 v[12:13], v[8:11]
942 ; GCN-NEXT: v_mov_b32_e32 v9, s3
943 ; GCN-NEXT: v_mov_b32_e32 v8, s2
944 ; GCN-NEXT: flat_store_dwordx4 v[8:9], v[4:7]
945 ; GCN-NEXT: s_add_u32 s2, s0, 0x70
946 ; GCN-NEXT: v_mov_b32_e32 v5, s1
947 ; GCN-NEXT: v_mov_b32_e32 v4, s0
948 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
949 ; GCN-NEXT: s_addc_u32 s3, s1, 0
950 ; GCN-NEXT: v_mov_b32_e32 v0, s2
951 ; GCN-NEXT: v_mov_b32_e32 v1, s3
952 ; GCN-NEXT: s_add_u32 s0, s0, 0x60
953 ; GCN-NEXT: flat_store_dwordx2 v[0:1], v[28:29]
954 ; GCN-NEXT: s_addc_u32 s1, s1, 0
955 ; GCN-NEXT: v_mov_b32_e32 v0, s0
956 ; GCN-NEXT: v_mov_b32_e32 v1, s1
957 ; GCN-NEXT: flat_store_dwordx4 v[0:1], v[24:27]
960 %v = insertelement <15 x double> %vec, double 1.000000e+00, i32 %sel
961 store <15 x double> %v, ptr addrspace(1) %out
965 define amdgpu_kernel void @bit4_inselt(ptr addrspace(1) %out, <4 x i1> %vec, i32 %sel) {
966 ; GCN-LABEL: bit4_inselt:
967 ; GCN: ; %bb.0: ; %entry
968 ; GCN-NEXT: s_mov_b32 s4, SCRATCH_RSRC_DWORD0
969 ; GCN-NEXT: s_mov_b32 s5, SCRATCH_RSRC_DWORD1
970 ; GCN-NEXT: s_mov_b32 s6, -1
971 ; GCN-NEXT: s_mov_b32 s7, 0xe80000
972 ; GCN-NEXT: s_add_u32 s4, s4, s3
973 ; GCN-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
974 ; GCN-NEXT: s_addc_u32 s5, s5, 0
975 ; GCN-NEXT: v_mov_b32_e32 v0, 4
976 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
977 ; GCN-NEXT: s_and_b32 s3, s3, 3
978 ; GCN-NEXT: v_mov_b32_e32 v1, s2
979 ; GCN-NEXT: v_lshrrev_b16_e64 v2, 1, s2
980 ; GCN-NEXT: v_lshrrev_b16_e64 v3, 2, s2
981 ; GCN-NEXT: v_lshrrev_b16_e64 v4, 3, s2
982 ; GCN-NEXT: v_or_b32_e32 v0, s3, v0
983 ; GCN-NEXT: v_and_b32_e32 v2, 1, v2
984 ; GCN-NEXT: v_and_b32_e32 v3, 3, v3
985 ; GCN-NEXT: v_and_b32_e32 v4, 1, v4
986 ; GCN-NEXT: buffer_store_byte v1, off, s[4:7], 0 offset:4
987 ; GCN-NEXT: buffer_store_byte v4, off, s[4:7], 0 offset:7
988 ; GCN-NEXT: buffer_store_byte v3, off, s[4:7], 0 offset:6
989 ; GCN-NEXT: buffer_store_byte v2, off, s[4:7], 0 offset:5
990 ; GCN-NEXT: v_mov_b32_e32 v1, 1
991 ; GCN-NEXT: buffer_store_byte v1, v0, s[4:7], 0 offen
992 ; GCN-NEXT: buffer_load_ubyte v0, off, s[4:7], 0 offset:4
993 ; GCN-NEXT: buffer_load_ubyte v1, off, s[4:7], 0 offset:5
994 ; GCN-NEXT: buffer_load_ubyte v2, off, s[4:7], 0 offset:6
995 ; GCN-NEXT: buffer_load_ubyte v3, off, s[4:7], 0 offset:7
996 ; GCN-NEXT: s_waitcnt vmcnt(3)
997 ; GCN-NEXT: v_and_b32_e32 v0, 1, v0
998 ; GCN-NEXT: s_waitcnt vmcnt(2)
999 ; GCN-NEXT: v_and_b32_e32 v1, 1, v1
1000 ; GCN-NEXT: s_waitcnt vmcnt(1)
1001 ; GCN-NEXT: v_and_b32_e32 v2, 1, v2
1002 ; GCN-NEXT: v_lshlrev_b16_e32 v1, 1, v1
1003 ; GCN-NEXT: v_lshlrev_b16_e32 v2, 2, v2
1004 ; GCN-NEXT: v_or_b32_e32 v0, v0, v1
1005 ; GCN-NEXT: s_waitcnt vmcnt(0)
1006 ; GCN-NEXT: v_lshlrev_b16_e32 v3, 3, v3
1007 ; GCN-NEXT: v_or_b32_e32 v0, v0, v2
1008 ; GCN-NEXT: v_or_b32_e32 v0, v0, v3
1009 ; GCN-NEXT: v_and_b32_e32 v2, 15, v0
1010 ; GCN-NEXT: v_mov_b32_e32 v0, s0
1011 ; GCN-NEXT: v_mov_b32_e32 v1, s1
1012 ; GCN-NEXT: flat_store_byte v[0:1], v2
1013 ; GCN-NEXT: s_endpgm
1015 %v = insertelement <4 x i1> %vec, i1 1, i32 %sel
1016 store <4 x i1> %v, ptr addrspace(1) %out
1020 define amdgpu_kernel void @bit128_inselt(ptr addrspace(1) %out, <128 x i1> %vec, i32 %sel) {
1021 ; GCN-LABEL: bit128_inselt:
1022 ; GCN: ; %bb.0: ; %entry
1023 ; GCN-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
1024 ; GCN-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
1025 ; GCN-NEXT: s_load_dword s0, s[0:1], 0x44
1026 ; GCN-NEXT: s_waitcnt lgkmcnt(0)
1027 ; GCN-NEXT: s_lshr_b32 s1, s4, 24
1028 ; GCN-NEXT: s_lshr_b32 s8, s4, 16
1029 ; GCN-NEXT: s_lshr_b32 s9, s4, 17
1030 ; GCN-NEXT: s_lshr_b32 s10, s4, 18
1031 ; GCN-NEXT: s_lshr_b32 s11, s4, 19
1032 ; GCN-NEXT: s_lshr_b32 s12, s4, 20
1033 ; GCN-NEXT: s_lshr_b32 s13, s4, 21
1034 ; GCN-NEXT: s_lshr_b32 s14, s4, 22
1035 ; GCN-NEXT: s_lshr_b32 s15, s4, 23
1036 ; GCN-NEXT: s_lshr_b32 s16, s5, 24
1037 ; GCN-NEXT: s_lshr_b32 s17, s5, 16
1038 ; GCN-NEXT: s_lshr_b32 s18, s5, 17
1039 ; GCN-NEXT: s_lshr_b32 s19, s5, 18
1040 ; GCN-NEXT: s_lshr_b32 s20, s5, 19
1041 ; GCN-NEXT: s_lshr_b32 s21, s5, 20
1042 ; GCN-NEXT: s_lshr_b32 s22, s5, 21
1043 ; GCN-NEXT: s_lshr_b32 s23, s5, 22
1044 ; GCN-NEXT: s_lshr_b32 s24, s5, 23
1045 ; GCN-NEXT: s_lshr_b32 s25, s6, 24
1046 ; GCN-NEXT: s_lshr_b32 s26, s6, 16
1047 ; GCN-NEXT: s_lshr_b32 s27, s6, 17
1048 ; GCN-NEXT: s_lshr_b32 s28, s6, 18
1049 ; GCN-NEXT: s_lshr_b32 s29, s6, 19
1050 ; GCN-NEXT: s_lshr_b32 s30, s6, 20
1051 ; GCN-NEXT: s_lshr_b32 s31, s6, 21
1052 ; GCN-NEXT: s_lshr_b32 s33, s6, 22
1053 ; GCN-NEXT: s_lshr_b32 s34, s6, 23
1054 ; GCN-NEXT: s_lshr_b32 s35, s7, 24
1055 ; GCN-NEXT: s_lshr_b32 s36, s7, 16
1056 ; GCN-NEXT: s_lshr_b32 s37, s7, 17
1057 ; GCN-NEXT: s_lshr_b32 s38, s7, 18
1058 ; GCN-NEXT: s_lshr_b32 s39, s7, 19
1059 ; GCN-NEXT: s_lshr_b32 s40, s7, 20
1060 ; GCN-NEXT: s_lshr_b32 s41, s7, 21
1061 ; GCN-NEXT: s_lshr_b32 s42, s7, 22
1062 ; GCN-NEXT: s_lshr_b32 s43, s7, 23
1063 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x77
1064 ; GCN-NEXT: v_mov_b32_e32 v15, s43
1065 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1066 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x76
1067 ; GCN-NEXT: v_cndmask_b32_e32 v15, 1, v15, vcc
1068 ; GCN-NEXT: v_mov_b32_e32 v18, s42
1069 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1070 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1071 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1072 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 3, v15
1073 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 2, v18
1074 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x75
1075 ; GCN-NEXT: v_or_b32_e32 v15, v15, v18
1076 ; GCN-NEXT: v_mov_b32_e32 v18, s41
1077 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1078 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x74
1079 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1080 ; GCN-NEXT: v_mov_b32_e32 v19, s40
1081 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1082 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1083 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 1, v18
1084 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1085 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1086 ; GCN-NEXT: v_and_b32_e32 v18, 3, v18
1087 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x73
1088 ; GCN-NEXT: v_or_b32_e32 v15, v18, v15
1089 ; GCN-NEXT: v_mov_b32_e32 v18, s39
1090 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1091 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x72
1092 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1093 ; GCN-NEXT: v_mov_b32_e32 v19, s38
1094 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1095 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1096 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1097 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1098 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1099 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x71
1100 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1101 ; GCN-NEXT: v_mov_b32_e32 v19, s37
1102 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1103 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x70
1104 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1105 ; GCN-NEXT: v_mov_b32_e32 v20, s36
1106 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1107 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1108 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1109 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1110 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1111 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1112 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1113 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 4, v15
1114 ; GCN-NEXT: v_and_b32_e32 v18, 15, v18
1115 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x7f
1116 ; GCN-NEXT: v_or_b32_e32 v15, v18, v15
1117 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 7, s35
1118 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1119 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x7e
1120 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 6, s35
1121 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1122 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1123 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1124 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1125 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1126 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1127 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x7d
1128 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1129 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 5, s35
1130 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1131 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x7c
1132 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 4, s35
1133 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1134 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1135 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1136 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1137 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1138 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1139 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1140 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x7b
1141 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1142 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 3, s35
1143 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1144 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x7a
1145 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 2, s35
1146 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1147 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1148 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1149 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1150 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x78
1151 ; GCN-NEXT: v_mov_b32_e32 v13, s35
1152 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 3, v19
1153 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 2, v20
1154 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1155 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x79
1156 ; GCN-NEXT: v_or_b32_e32 v19, v19, v20
1157 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 1, s35
1158 ; GCN-NEXT: v_cndmask_b32_e32 v13, 1, v13, vcc
1159 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1160 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1161 ; GCN-NEXT: v_and_b32_e32 v13, 1, v13
1162 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 1, v20
1163 ; GCN-NEXT: v_or_b32_e32 v13, v13, v20
1164 ; GCN-NEXT: v_and_b32_e32 v13, 3, v13
1165 ; GCN-NEXT: v_or_b32_e32 v19, v13, v19
1166 ; GCN-NEXT: v_mov_b32_e32 v13, 15
1167 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 12, v18
1168 ; GCN-NEXT: v_and_b32_sdwa v19, v19, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1169 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1170 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x6f
1171 ; GCN-NEXT: v_or_b32_sdwa v15, v15, v18 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1172 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 15, s7
1173 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1174 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x6e
1175 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 14, s7
1176 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1177 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1178 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1179 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1180 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1181 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1182 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x6d
1183 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1184 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 13, s7
1185 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1186 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x6c
1187 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 12, s7
1188 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1189 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1190 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1191 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1192 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1193 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1194 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1195 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x6b
1196 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1197 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 11, s7
1198 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1199 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x6a
1200 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 10, s7
1201 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1202 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1203 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1204 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1205 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 3, v19
1206 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 2, v20
1207 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x69
1208 ; GCN-NEXT: v_or_b32_e32 v19, v19, v20
1209 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 9, s7
1210 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1211 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x68
1212 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 8, s7
1213 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1214 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1215 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1216 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 1, v20
1217 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1218 ; GCN-NEXT: v_or_b32_e32 v17, v17, v20
1219 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1220 ; GCN-NEXT: v_or_b32_e32 v17, v17, v19
1221 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 12, v18
1222 ; GCN-NEXT: v_and_b32_sdwa v17, v17, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1223 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x67
1224 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1225 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 7, s7
1226 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1227 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x66
1228 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 6, s7
1229 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1230 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1231 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1232 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1233 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1234 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1235 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x65
1236 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1237 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 5, s7
1238 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1239 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x64
1240 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 4, s7
1241 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1242 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1243 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1244 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1245 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1246 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1247 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1248 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x63
1249 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1250 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 3, s7
1251 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1252 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x62
1253 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 2, s7
1254 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1255 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1256 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1257 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1258 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 3, v19
1259 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 2, v20
1260 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x61
1261 ; GCN-NEXT: v_or_b32_e32 v19, v19, v20
1262 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 1, s7
1263 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1264 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x60
1265 ; GCN-NEXT: v_mov_b32_e32 v16, s7
1266 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1267 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1268 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1269 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 1, v20
1270 ; GCN-NEXT: v_and_b32_e32 v16, 1, v16
1271 ; GCN-NEXT: v_or_b32_e32 v16, v16, v20
1272 ; GCN-NEXT: v_and_b32_e32 v16, 3, v16
1273 ; GCN-NEXT: v_or_b32_e32 v16, v16, v19
1274 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 4, v18
1275 ; GCN-NEXT: v_and_b32_e32 v16, 15, v16
1276 ; GCN-NEXT: v_or_b32_e32 v16, v16, v18
1277 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x57
1278 ; GCN-NEXT: v_or_b32_sdwa v16, v16, v17 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1279 ; GCN-NEXT: v_mov_b32_e32 v17, s34
1280 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1281 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x56
1282 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1283 ; GCN-NEXT: v_mov_b32_e32 v18, s33
1284 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1285 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1286 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1287 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 3, v17
1288 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 2, v18
1289 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x55
1290 ; GCN-NEXT: v_or_b32_e32 v17, v17, v18
1291 ; GCN-NEXT: v_mov_b32_e32 v18, s31
1292 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1293 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x54
1294 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1295 ; GCN-NEXT: v_mov_b32_e32 v19, s30
1296 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1297 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1298 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 1, v18
1299 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1300 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1301 ; GCN-NEXT: v_and_b32_e32 v18, 3, v18
1302 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x53
1303 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1304 ; GCN-NEXT: v_mov_b32_e32 v18, s29
1305 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1306 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x52
1307 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1308 ; GCN-NEXT: v_mov_b32_e32 v19, s28
1309 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1310 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1311 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1312 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1313 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1314 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x51
1315 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1316 ; GCN-NEXT: v_mov_b32_e32 v19, s27
1317 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1318 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x50
1319 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1320 ; GCN-NEXT: v_mov_b32_e32 v20, s26
1321 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1322 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1323 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1324 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1325 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1326 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1327 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1328 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 4, v17
1329 ; GCN-NEXT: v_and_b32_e32 v18, 15, v18
1330 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x5f
1331 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1332 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 7, s25
1333 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1334 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x5e
1335 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 6, s25
1336 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1337 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1338 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1339 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1340 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1341 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1342 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x5d
1343 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1344 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 5, s25
1345 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1346 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x5c
1347 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 4, s25
1348 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1349 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1350 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1351 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1352 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1353 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1354 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1355 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x5b
1356 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1357 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 3, s25
1358 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1359 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x5a
1360 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 2, s25
1361 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1362 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1363 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1364 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1365 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x58
1366 ; GCN-NEXT: v_mov_b32_e32 v3, s25
1367 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 3, v19
1368 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 2, v20
1369 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1370 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x59
1371 ; GCN-NEXT: v_or_b32_e32 v19, v19, v20
1372 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 1, s25
1373 ; GCN-NEXT: v_cndmask_b32_e32 v3, 1, v3, vcc
1374 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1375 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1376 ; GCN-NEXT: v_and_b32_e32 v3, 1, v3
1377 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 1, v20
1378 ; GCN-NEXT: v_or_b32_e32 v3, v3, v20
1379 ; GCN-NEXT: v_and_b32_e32 v3, 3, v3
1380 ; GCN-NEXT: v_or_b32_e32 v3, v3, v19
1381 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 12, v18
1382 ; GCN-NEXT: v_and_b32_sdwa v3, v3, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1383 ; GCN-NEXT: v_or_b32_e32 v3, v18, v3
1384 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x4f
1385 ; GCN-NEXT: v_or_b32_sdwa v17, v17, v3 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1386 ; GCN-NEXT: v_lshrrev_b16_e64 v3, 15, s6
1387 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1388 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x4e
1389 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 14, s6
1390 ; GCN-NEXT: v_cndmask_b32_e32 v3, 1, v3, vcc
1391 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1392 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1393 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1394 ; GCN-NEXT: v_lshlrev_b16_e32 v3, 3, v3
1395 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 2, v18
1396 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x4d
1397 ; GCN-NEXT: v_or_b32_e32 v3, v3, v18
1398 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 13, s6
1399 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1400 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x4c
1401 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 12, s6
1402 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1403 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1404 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1405 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 1, v18
1406 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1407 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1408 ; GCN-NEXT: v_and_b32_e32 v18, 3, v18
1409 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x4b
1410 ; GCN-NEXT: v_or_b32_e32 v3, v18, v3
1411 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 11, s6
1412 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1413 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x4a
1414 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 10, s6
1415 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1416 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1417 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1418 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1419 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 3, v18
1420 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1421 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x49
1422 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1423 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 9, s6
1424 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1425 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x48
1426 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 8, s6
1427 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1428 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1429 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1430 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1431 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1432 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1433 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1434 ; GCN-NEXT: v_or_b32_e32 v18, v19, v18
1435 ; GCN-NEXT: v_lshlrev_b16_e32 v3, 12, v3
1436 ; GCN-NEXT: v_and_b32_sdwa v18, v18, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1437 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x47
1438 ; GCN-NEXT: v_or_b32_e32 v18, v3, v18
1439 ; GCN-NEXT: v_lshrrev_b16_e64 v3, 7, s6
1440 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1441 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x46
1442 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 6, s6
1443 ; GCN-NEXT: v_cndmask_b32_e32 v3, 1, v3, vcc
1444 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1445 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1446 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1447 ; GCN-NEXT: v_lshlrev_b16_e32 v3, 3, v3
1448 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1449 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x45
1450 ; GCN-NEXT: v_or_b32_e32 v3, v3, v19
1451 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 5, s6
1452 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1453 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x44
1454 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 4, s6
1455 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1456 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1457 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1458 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1459 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1460 ; GCN-NEXT: v_or_b32_e32 v19, v20, v19
1461 ; GCN-NEXT: v_and_b32_e32 v19, 3, v19
1462 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x43
1463 ; GCN-NEXT: v_or_b32_e32 v19, v19, v3
1464 ; GCN-NEXT: v_lshrrev_b16_e64 v3, 3, s6
1465 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1466 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x42
1467 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 2, s6
1468 ; GCN-NEXT: v_cndmask_b32_e32 v3, 1, v3, vcc
1469 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1470 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1471 ; GCN-NEXT: v_and_b32_e32 v20, 1, v20
1472 ; GCN-NEXT: v_lshlrev_b16_e32 v3, 3, v3
1473 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 2, v20
1474 ; GCN-NEXT: s_cmpk_lg_i32 s0, 0x41
1475 ; GCN-NEXT: v_or_b32_e32 v3, v3, v20
1476 ; GCN-NEXT: v_lshrrev_b16_e64 v20, 1, s6
1477 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1478 ; GCN-NEXT: s_cmp_lg_u32 s0, 64
1479 ; GCN-NEXT: v_mov_b32_e32 v2, s6
1480 ; GCN-NEXT: v_cndmask_b32_e32 v20, 1, v20, vcc
1481 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1482 ; GCN-NEXT: v_cndmask_b32_e32 v2, 1, v2, vcc
1483 ; GCN-NEXT: v_lshlrev_b16_e32 v20, 1, v20
1484 ; GCN-NEXT: v_and_b32_e32 v2, 1, v2
1485 ; GCN-NEXT: v_or_b32_e32 v2, v2, v20
1486 ; GCN-NEXT: v_and_b32_e32 v2, 3, v2
1487 ; GCN-NEXT: v_or_b32_e32 v2, v2, v3
1488 ; GCN-NEXT: v_or_b32_sdwa v3, v16, v15 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
1489 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 4, v19
1490 ; GCN-NEXT: v_and_b32_e32 v2, 15, v2
1491 ; GCN-NEXT: s_cmp_lg_u32 s0, 55
1492 ; GCN-NEXT: v_or_b32_e32 v2, v2, v15
1493 ; GCN-NEXT: v_mov_b32_e32 v15, s24
1494 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1495 ; GCN-NEXT: s_cmp_lg_u32 s0, 54
1496 ; GCN-NEXT: v_cndmask_b32_e32 v15, 1, v15, vcc
1497 ; GCN-NEXT: v_mov_b32_e32 v16, s23
1498 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1499 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1500 ; GCN-NEXT: v_and_b32_e32 v16, 1, v16
1501 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 3, v15
1502 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 2, v16
1503 ; GCN-NEXT: s_cmp_lg_u32 s0, 53
1504 ; GCN-NEXT: v_or_b32_sdwa v2, v2, v18 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1505 ; GCN-NEXT: v_or_b32_e32 v15, v15, v16
1506 ; GCN-NEXT: v_mov_b32_e32 v16, s22
1507 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1508 ; GCN-NEXT: s_cmp_lg_u32 s0, 52
1509 ; GCN-NEXT: v_or_b32_sdwa v2, v2, v17 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
1510 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1511 ; GCN-NEXT: v_mov_b32_e32 v17, s21
1512 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1513 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1514 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 1, v16
1515 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1516 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1517 ; GCN-NEXT: v_and_b32_e32 v16, 3, v16
1518 ; GCN-NEXT: s_cmp_lg_u32 s0, 51
1519 ; GCN-NEXT: v_or_b32_e32 v15, v16, v15
1520 ; GCN-NEXT: v_mov_b32_e32 v16, s20
1521 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1522 ; GCN-NEXT: s_cmp_lg_u32 s0, 50
1523 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1524 ; GCN-NEXT: v_mov_b32_e32 v17, s19
1525 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1526 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1527 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1528 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 3, v16
1529 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1530 ; GCN-NEXT: s_cmp_lg_u32 s0, 49
1531 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1532 ; GCN-NEXT: v_mov_b32_e32 v17, s18
1533 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1534 ; GCN-NEXT: s_cmp_lg_u32 s0, 48
1535 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1536 ; GCN-NEXT: v_mov_b32_e32 v18, s17
1537 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1538 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1539 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1540 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1541 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1542 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1543 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1544 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 4, v15
1545 ; GCN-NEXT: v_and_b32_e32 v16, 15, v16
1546 ; GCN-NEXT: s_cmp_lg_u32 s0, 63
1547 ; GCN-NEXT: v_or_b32_e32 v15, v16, v15
1548 ; GCN-NEXT: v_lshrrev_b16_e64 v16, 7, s16
1549 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1550 ; GCN-NEXT: s_cmp_lg_u32 s0, 62
1551 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 6, s16
1552 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1553 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1554 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1555 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1556 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 3, v16
1557 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1558 ; GCN-NEXT: s_cmp_lg_u32 s0, 61
1559 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1560 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 5, s16
1561 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1562 ; GCN-NEXT: s_cmp_lg_u32 s0, 60
1563 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 4, s16
1564 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1565 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1566 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1567 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1568 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1569 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1570 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1571 ; GCN-NEXT: s_cmp_lg_u32 s0, 59
1572 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1573 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 3, s16
1574 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1575 ; GCN-NEXT: s_cmp_lg_u32 s0, 58
1576 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 2, s16
1577 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1578 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1579 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1580 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1581 ; GCN-NEXT: s_cmp_lg_u32 s0, 56
1582 ; GCN-NEXT: v_mov_b32_e32 v14, s16
1583 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 3, v17
1584 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 2, v18
1585 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1586 ; GCN-NEXT: s_cmp_lg_u32 s0, 57
1587 ; GCN-NEXT: v_or_b32_e32 v17, v17, v18
1588 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 1, s16
1589 ; GCN-NEXT: v_cndmask_b32_e32 v14, 1, v14, vcc
1590 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1591 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1592 ; GCN-NEXT: v_and_b32_e32 v14, 1, v14
1593 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 1, v18
1594 ; GCN-NEXT: v_or_b32_e32 v14, v14, v18
1595 ; GCN-NEXT: v_and_b32_e32 v14, 3, v14
1596 ; GCN-NEXT: v_or_b32_e32 v14, v14, v17
1597 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 12, v16
1598 ; GCN-NEXT: v_and_b32_sdwa v14, v14, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1599 ; GCN-NEXT: v_or_b32_e32 v14, v16, v14
1600 ; GCN-NEXT: s_cmp_lg_u32 s0, 47
1601 ; GCN-NEXT: v_or_b32_sdwa v15, v15, v14 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1602 ; GCN-NEXT: v_lshrrev_b16_e64 v14, 15, s5
1603 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1604 ; GCN-NEXT: s_cmp_lg_u32 s0, 46
1605 ; GCN-NEXT: v_lshrrev_b16_e64 v16, 14, s5
1606 ; GCN-NEXT: v_cndmask_b32_e32 v14, 1, v14, vcc
1607 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1608 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1609 ; GCN-NEXT: v_and_b32_e32 v16, 1, v16
1610 ; GCN-NEXT: v_lshlrev_b16_e32 v14, 3, v14
1611 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 2, v16
1612 ; GCN-NEXT: s_cmp_lg_u32 s0, 45
1613 ; GCN-NEXT: v_or_b32_e32 v14, v14, v16
1614 ; GCN-NEXT: v_lshrrev_b16_e64 v16, 13, s5
1615 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1616 ; GCN-NEXT: s_cmp_lg_u32 s0, 44
1617 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 12, s5
1618 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1619 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1620 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1621 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 1, v16
1622 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1623 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1624 ; GCN-NEXT: v_and_b32_e32 v16, 3, v16
1625 ; GCN-NEXT: s_cmp_lg_u32 s0, 43
1626 ; GCN-NEXT: v_or_b32_e32 v14, v16, v14
1627 ; GCN-NEXT: v_lshrrev_b16_e64 v16, 11, s5
1628 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1629 ; GCN-NEXT: s_cmp_lg_u32 s0, 42
1630 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 10, s5
1631 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1632 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1633 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1634 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1635 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 3, v16
1636 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1637 ; GCN-NEXT: s_cmp_lg_u32 s0, 41
1638 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1639 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 9, s5
1640 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1641 ; GCN-NEXT: s_cmp_lg_u32 s0, 40
1642 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 8, s5
1643 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1644 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1645 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1646 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1647 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1648 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1649 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1650 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1651 ; GCN-NEXT: v_lshlrev_b16_e32 v14, 12, v14
1652 ; GCN-NEXT: v_and_b32_sdwa v16, v16, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1653 ; GCN-NEXT: s_cmp_lg_u32 s0, 39
1654 ; GCN-NEXT: v_or_b32_e32 v16, v14, v16
1655 ; GCN-NEXT: v_lshrrev_b16_e64 v14, 7, s5
1656 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1657 ; GCN-NEXT: s_cmp_lg_u32 s0, 38
1658 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 6, s5
1659 ; GCN-NEXT: v_cndmask_b32_e32 v14, 1, v14, vcc
1660 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1661 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1662 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1663 ; GCN-NEXT: v_lshlrev_b16_e32 v14, 3, v14
1664 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1665 ; GCN-NEXT: s_cmp_lg_u32 s0, 37
1666 ; GCN-NEXT: v_or_b32_e32 v14, v14, v17
1667 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 5, s5
1668 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1669 ; GCN-NEXT: s_cmp_lg_u32 s0, 36
1670 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 4, s5
1671 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1672 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1673 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1674 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1675 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1676 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1677 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1678 ; GCN-NEXT: s_cmp_lg_u32 s0, 35
1679 ; GCN-NEXT: v_or_b32_e32 v17, v17, v14
1680 ; GCN-NEXT: v_lshrrev_b16_e64 v14, 3, s5
1681 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1682 ; GCN-NEXT: s_cmp_lg_u32 s0, 34
1683 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 2, s5
1684 ; GCN-NEXT: v_cndmask_b32_e32 v14, 1, v14, vcc
1685 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1686 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1687 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1688 ; GCN-NEXT: v_lshlrev_b16_e32 v14, 3, v14
1689 ; GCN-NEXT: v_lshlrev_b16_e32 v18, 2, v18
1690 ; GCN-NEXT: s_cmp_lg_u32 s0, 33
1691 ; GCN-NEXT: v_or_b32_e32 v18, v14, v18
1692 ; GCN-NEXT: v_lshrrev_b16_e64 v14, 1, s5
1693 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1694 ; GCN-NEXT: s_cmp_lg_u32 s0, 32
1695 ; GCN-NEXT: v_mov_b32_e32 v1, s5
1696 ; GCN-NEXT: v_cndmask_b32_e32 v14, 1, v14, vcc
1697 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1698 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1, v1, vcc
1699 ; GCN-NEXT: v_lshlrev_b16_e32 v14, 1, v14
1700 ; GCN-NEXT: v_and_b32_e32 v1, 1, v1
1701 ; GCN-NEXT: v_or_b32_e32 v1, v1, v14
1702 ; GCN-NEXT: v_and_b32_e32 v1, 3, v1
1703 ; GCN-NEXT: v_or_b32_e32 v1, v1, v18
1704 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 4, v17
1705 ; GCN-NEXT: v_and_b32_e32 v1, 15, v1
1706 ; GCN-NEXT: v_or_b32_e32 v1, v1, v17
1707 ; GCN-NEXT: v_or_b32_sdwa v1, v1, v16 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1708 ; GCN-NEXT: s_cmp_lg_u32 s0, 23
1709 ; GCN-NEXT: v_or_b32_sdwa v1, v1, v15 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
1710 ; GCN-NEXT: v_mov_b32_e32 v15, s15
1711 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1712 ; GCN-NEXT: s_cmp_lg_u32 s0, 22
1713 ; GCN-NEXT: v_cndmask_b32_e32 v15, 1, v15, vcc
1714 ; GCN-NEXT: v_mov_b32_e32 v16, s14
1715 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1716 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1717 ; GCN-NEXT: v_and_b32_e32 v16, 1, v16
1718 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 3, v15
1719 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 2, v16
1720 ; GCN-NEXT: s_cmp_lg_u32 s0, 21
1721 ; GCN-NEXT: v_or_b32_e32 v15, v15, v16
1722 ; GCN-NEXT: v_mov_b32_e32 v16, s13
1723 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1724 ; GCN-NEXT: s_cmp_lg_u32 s0, 20
1725 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1726 ; GCN-NEXT: v_mov_b32_e32 v17, s12
1727 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1728 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1729 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 1, v16
1730 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1731 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1732 ; GCN-NEXT: v_and_b32_e32 v16, 3, v16
1733 ; GCN-NEXT: s_cmp_lg_u32 s0, 19
1734 ; GCN-NEXT: v_or_b32_e32 v15, v16, v15
1735 ; GCN-NEXT: v_mov_b32_e32 v16, s11
1736 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1737 ; GCN-NEXT: s_cmp_lg_u32 s0, 18
1738 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1739 ; GCN-NEXT: v_mov_b32_e32 v17, s10
1740 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1741 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1742 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1743 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 3, v16
1744 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1745 ; GCN-NEXT: s_cmp_lg_u32 s0, 17
1746 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1747 ; GCN-NEXT: v_mov_b32_e32 v17, s9
1748 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1749 ; GCN-NEXT: s_cmp_lg_u32 s0, 16
1750 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1751 ; GCN-NEXT: v_mov_b32_e32 v19, s8
1752 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1753 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1754 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1755 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1756 ; GCN-NEXT: v_or_b32_e32 v17, v19, v17
1757 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1758 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1759 ; GCN-NEXT: v_lshlrev_b16_e32 v15, 4, v15
1760 ; GCN-NEXT: v_and_b32_e32 v16, 15, v16
1761 ; GCN-NEXT: s_cmp_lg_u32 s0, 31
1762 ; GCN-NEXT: v_or_b32_e32 v15, v16, v15
1763 ; GCN-NEXT: v_lshrrev_b16_e64 v16, 7, s1
1764 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1765 ; GCN-NEXT: s_cmp_lg_u32 s0, 30
1766 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 6, s1
1767 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1768 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1769 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1770 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1771 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 3, v16
1772 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1773 ; GCN-NEXT: s_cmp_lg_u32 s0, 29
1774 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1775 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 5, s1
1776 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1777 ; GCN-NEXT: s_cmp_lg_u32 s0, 28
1778 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 4, s1
1779 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1780 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1781 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1782 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1783 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1784 ; GCN-NEXT: v_or_b32_e32 v17, v19, v17
1785 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1786 ; GCN-NEXT: s_cmp_lg_u32 s0, 27
1787 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1788 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 3, s1
1789 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1790 ; GCN-NEXT: s_cmp_lg_u32 s0, 26
1791 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 2, s1
1792 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1793 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1794 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1795 ; GCN-NEXT: v_and_b32_e32 v19, 1, v19
1796 ; GCN-NEXT: s_cmp_lg_u32 s0, 24
1797 ; GCN-NEXT: v_mov_b32_e32 v18, s1
1798 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 3, v17
1799 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 2, v19
1800 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1801 ; GCN-NEXT: s_cmp_lg_u32 s0, 25
1802 ; GCN-NEXT: v_or_b32_e32 v17, v17, v19
1803 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 1, s1
1804 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1805 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1806 ; GCN-NEXT: v_cndmask_b32_e32 v19, 1, v19, vcc
1807 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1808 ; GCN-NEXT: v_lshlrev_b16_e32 v19, 1, v19
1809 ; GCN-NEXT: v_or_b32_e32 v18, v18, v19
1810 ; GCN-NEXT: v_and_b32_e32 v18, 3, v18
1811 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1812 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 12, v16
1813 ; GCN-NEXT: v_and_b32_sdwa v17, v17, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1814 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1815 ; GCN-NEXT: s_cmp_lg_u32 s0, 15
1816 ; GCN-NEXT: v_or_b32_sdwa v15, v15, v16 dst_sel:WORD_1 dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1817 ; GCN-NEXT: v_lshrrev_b16_e64 v16, 15, s4
1818 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1819 ; GCN-NEXT: s_cmp_lg_u32 s0, 14
1820 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 14, s4
1821 ; GCN-NEXT: v_cndmask_b32_e32 v16, 1, v16, vcc
1822 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1823 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1824 ; GCN-NEXT: v_and_b32_e32 v17, 1, v17
1825 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 3, v16
1826 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 2, v17
1827 ; GCN-NEXT: s_cmp_lg_u32 s0, 13
1828 ; GCN-NEXT: v_or_b32_e32 v16, v16, v17
1829 ; GCN-NEXT: v_lshrrev_b16_e64 v17, 13, s4
1830 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1831 ; GCN-NEXT: s_cmp_lg_u32 s0, 12
1832 ; GCN-NEXT: v_lshrrev_b16_e64 v18, 12, s4
1833 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v17, vcc
1834 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1835 ; GCN-NEXT: v_cndmask_b32_e32 v18, 1, v18, vcc
1836 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 1, v17
1837 ; GCN-NEXT: v_and_b32_e32 v18, 1, v18
1838 ; GCN-NEXT: v_or_b32_e32 v17, v18, v17
1839 ; GCN-NEXT: s_cmp_lg_u32 s0, 11
1840 ; GCN-NEXT: v_lshrrev_b16_e64 v19, 11, s4
1841 ; GCN-NEXT: v_and_b32_e32 v17, 3, v17
1842 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1843 ; GCN-NEXT: s_cmp_lg_u32 s0, 10
1844 ; GCN-NEXT: v_lshrrev_b16_e64 v14, 10, s4
1845 ; GCN-NEXT: v_or_b32_e32 v16, v17, v16
1846 ; GCN-NEXT: v_cndmask_b32_e32 v17, 1, v19, vcc
1847 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1848 ; GCN-NEXT: s_cmp_lg_u32 s0, 9
1849 ; GCN-NEXT: v_lshrrev_b16_e64 v12, 9, s4
1850 ; GCN-NEXT: v_cndmask_b32_e32 v14, 1, v14, vcc
1851 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1852 ; GCN-NEXT: s_cmp_lg_u32 s0, 8
1853 ; GCN-NEXT: v_lshrrev_b16_e64 v11, 8, s4
1854 ; GCN-NEXT: v_cndmask_b32_e32 v12, 1, v12, vcc
1855 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1856 ; GCN-NEXT: s_cmp_lg_u32 s0, 7
1857 ; GCN-NEXT: v_lshrrev_b16_e64 v10, 7, s4
1858 ; GCN-NEXT: v_cndmask_b32_e32 v11, 1, v11, vcc
1859 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1860 ; GCN-NEXT: s_cmp_lg_u32 s0, 6
1861 ; GCN-NEXT: v_lshrrev_b16_e64 v9, 6, s4
1862 ; GCN-NEXT: v_cndmask_b32_e32 v10, 1, v10, vcc
1863 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1864 ; GCN-NEXT: s_cmp_lg_u32 s0, 5
1865 ; GCN-NEXT: v_lshrrev_b16_e64 v8, 5, s4
1866 ; GCN-NEXT: v_cndmask_b32_e32 v9, 1, v9, vcc
1867 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1868 ; GCN-NEXT: s_cmp_lg_u32 s0, 4
1869 ; GCN-NEXT: v_lshrrev_b16_e64 v7, 4, s4
1870 ; GCN-NEXT: v_cndmask_b32_e32 v8, 1, v8, vcc
1871 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1872 ; GCN-NEXT: s_cmp_lg_u32 s0, 3
1873 ; GCN-NEXT: v_lshrrev_b16_e64 v6, 3, s4
1874 ; GCN-NEXT: v_cndmask_b32_e32 v7, 1, v7, vcc
1875 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1876 ; GCN-NEXT: s_cmp_lg_u32 s0, 2
1877 ; GCN-NEXT: v_lshrrev_b16_e64 v5, 2, s4
1878 ; GCN-NEXT: v_cndmask_b32_e32 v6, 1, v6, vcc
1879 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1880 ; GCN-NEXT: s_cmp_lg_u32 s0, 1
1881 ; GCN-NEXT: v_lshrrev_b16_e64 v4, 1, s4
1882 ; GCN-NEXT: v_cndmask_b32_e32 v5, 1, v5, vcc
1883 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1884 ; GCN-NEXT: s_cmp_lg_u32 s0, 0
1885 ; GCN-NEXT: v_mov_b32_e32 v0, s4
1886 ; GCN-NEXT: v_cndmask_b32_e32 v4, 1, v4, vcc
1887 ; GCN-NEXT: s_cselect_b64 vcc, -1, 0
1888 ; GCN-NEXT: v_cndmask_b32_e32 v0, 1, v0, vcc
1889 ; GCN-NEXT: v_and_b32_e32 v14, 1, v14
1890 ; GCN-NEXT: v_lshlrev_b16_e32 v12, 1, v12
1891 ; GCN-NEXT: v_and_b32_e32 v11, 1, v11
1892 ; GCN-NEXT: v_and_b32_e32 v9, 1, v9
1893 ; GCN-NEXT: v_lshlrev_b16_e32 v8, 1, v8
1894 ; GCN-NEXT: v_and_b32_e32 v7, 1, v7
1895 ; GCN-NEXT: v_and_b32_e32 v5, 1, v5
1896 ; GCN-NEXT: v_lshlrev_b16_e32 v4, 1, v4
1897 ; GCN-NEXT: v_and_b32_e32 v0, 1, v0
1898 ; GCN-NEXT: v_lshlrev_b16_e32 v17, 3, v17
1899 ; GCN-NEXT: v_lshlrev_b16_e32 v14, 2, v14
1900 ; GCN-NEXT: v_or_b32_e32 v11, v11, v12
1901 ; GCN-NEXT: v_lshlrev_b16_e32 v10, 3, v10
1902 ; GCN-NEXT: v_lshlrev_b16_e32 v9, 2, v9
1903 ; GCN-NEXT: v_or_b32_e32 v7, v7, v8
1904 ; GCN-NEXT: v_lshlrev_b16_e32 v6, 3, v6
1905 ; GCN-NEXT: v_lshlrev_b16_e32 v5, 2, v5
1906 ; GCN-NEXT: v_or_b32_e32 v0, v0, v4
1907 ; GCN-NEXT: v_or_b32_e32 v14, v17, v14
1908 ; GCN-NEXT: v_and_b32_e32 v11, 3, v11
1909 ; GCN-NEXT: v_or_b32_e32 v9, v10, v9
1910 ; GCN-NEXT: v_and_b32_e32 v7, 3, v7
1911 ; GCN-NEXT: v_or_b32_e32 v5, v6, v5
1912 ; GCN-NEXT: v_and_b32_e32 v0, 3, v0
1913 ; GCN-NEXT: v_or_b32_e32 v11, v11, v14
1914 ; GCN-NEXT: v_or_b32_e32 v7, v7, v9
1915 ; GCN-NEXT: v_or_b32_e32 v0, v0, v5
1916 ; GCN-NEXT: v_lshlrev_b16_e32 v16, 12, v16
1917 ; GCN-NEXT: v_and_b32_sdwa v11, v11, v13 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD
1918 ; GCN-NEXT: v_lshlrev_b16_e32 v7, 4, v7
1919 ; GCN-NEXT: v_and_b32_e32 v0, 15, v0
1920 ; GCN-NEXT: v_or_b32_e32 v11, v16, v11
1921 ; GCN-NEXT: v_or_b32_e32 v0, v0, v7
1922 ; GCN-NEXT: v_or_b32_sdwa v0, v0, v11 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD
1923 ; GCN-NEXT: v_mov_b32_e32 v5, s3
1924 ; GCN-NEXT: v_or_b32_sdwa v0, v0, v15 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
1925 ; GCN-NEXT: v_mov_b32_e32 v4, s2
1926 ; GCN-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
1927 ; GCN-NEXT: s_endpgm
1929 %v = insertelement <128 x i1> %vec, i1 1, i32 %sel
1930 store <128 x i1> %v, ptr addrspace(1) %out
1934 define amdgpu_ps <32 x float> @float32_inselt_vec(<32 x float> %vec, i32 %sel) {
1935 ; GCN-LABEL: float32_inselt_vec:
1936 ; GCN: ; %bb.0: ; %entry
1937 ; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 1, v32
1938 ; GCN-NEXT: v_cmp_ne_u32_e64 s[0:1], 2, v32
1939 ; GCN-NEXT: v_cmp_ne_u32_e64 s[2:3], 3, v32
1940 ; GCN-NEXT: v_cmp_ne_u32_e64 s[4:5], 4, v32
1941 ; GCN-NEXT: v_cmp_ne_u32_e64 s[6:7], 5, v32
1942 ; GCN-NEXT: v_cmp_ne_u32_e64 s[8:9], 6, v32
1943 ; GCN-NEXT: v_cmp_ne_u32_e64 s[10:11], 7, v32
1944 ; GCN-NEXT: v_cmp_ne_u32_e64 s[12:13], 8, v32
1945 ; GCN-NEXT: v_cmp_ne_u32_e64 s[14:15], 9, v32
1946 ; GCN-NEXT: v_cmp_ne_u32_e64 s[16:17], 10, v32
1947 ; GCN-NEXT: v_cmp_ne_u32_e64 s[18:19], 11, v32
1948 ; GCN-NEXT: v_cmp_ne_u32_e64 s[20:21], 12, v32
1949 ; GCN-NEXT: v_cmp_ne_u32_e64 s[22:23], 13, v32
1950 ; GCN-NEXT: v_cmp_ne_u32_e64 s[24:25], 14, v32
1951 ; GCN-NEXT: v_cmp_ne_u32_e64 s[26:27], 15, v32
1952 ; GCN-NEXT: v_cmp_ne_u32_e64 s[28:29], 16, v32
1953 ; GCN-NEXT: v_cmp_ne_u32_e64 s[30:31], 17, v32
1954 ; GCN-NEXT: v_cmp_ne_u32_e64 s[34:35], 18, v32
1955 ; GCN-NEXT: v_cmp_ne_u32_e64 s[36:37], 19, v32
1956 ; GCN-NEXT: v_cmp_ne_u32_e64 s[38:39], 20, v32
1957 ; GCN-NEXT: v_cmp_ne_u32_e64 s[40:41], 21, v32
1958 ; GCN-NEXT: v_cmp_ne_u32_e64 s[42:43], 22, v32
1959 ; GCN-NEXT: v_cmp_ne_u32_e64 s[44:45], 23, v32
1960 ; GCN-NEXT: v_cmp_ne_u32_e64 s[46:47], 24, v32
1961 ; GCN-NEXT: v_cmp_ne_u32_e64 s[48:49], 25, v32
1962 ; GCN-NEXT: v_cmp_ne_u32_e64 s[50:51], 26, v32
1963 ; GCN-NEXT: v_cmp_ne_u32_e64 s[52:53], 27, v32
1964 ; GCN-NEXT: v_cmp_ne_u32_e64 s[54:55], 28, v32
1965 ; GCN-NEXT: v_cmp_ne_u32_e64 s[56:57], 29, v32
1966 ; GCN-NEXT: v_cmp_ne_u32_e64 s[58:59], 30, v32
1967 ; GCN-NEXT: v_cmp_ne_u32_e64 s[60:61], 31, v32
1968 ; GCN-NEXT: v_cmp_ne_u32_e64 s[62:63], 0, v32
1969 ; GCN-NEXT: v_cndmask_b32_e64 v0, 1.0, v0, s[62:63]
1970 ; GCN-NEXT: v_cndmask_b32_e32 v1, 1.0, v1, vcc
1971 ; GCN-NEXT: v_cndmask_b32_e64 v2, 1.0, v2, s[0:1]
1972 ; GCN-NEXT: v_cndmask_b32_e64 v3, 1.0, v3, s[2:3]
1973 ; GCN-NEXT: v_cndmask_b32_e64 v4, 1.0, v4, s[4:5]
1974 ; GCN-NEXT: v_cndmask_b32_e64 v5, 1.0, v5, s[6:7]
1975 ; GCN-NEXT: v_cndmask_b32_e64 v6, 1.0, v6, s[8:9]
1976 ; GCN-NEXT: v_cndmask_b32_e64 v7, 1.0, v7, s[10:11]
1977 ; GCN-NEXT: v_cndmask_b32_e64 v8, 1.0, v8, s[12:13]
1978 ; GCN-NEXT: v_cndmask_b32_e64 v9, 1.0, v9, s[14:15]
1979 ; GCN-NEXT: v_cndmask_b32_e64 v10, 1.0, v10, s[16:17]
1980 ; GCN-NEXT: v_cndmask_b32_e64 v11, 1.0, v11, s[18:19]
1981 ; GCN-NEXT: v_cndmask_b32_e64 v12, 1.0, v12, s[20:21]
1982 ; GCN-NEXT: v_cndmask_b32_e64 v13, 1.0, v13, s[22:23]
1983 ; GCN-NEXT: v_cndmask_b32_e64 v14, 1.0, v14, s[24:25]
1984 ; GCN-NEXT: v_cndmask_b32_e64 v15, 1.0, v15, s[26:27]
1985 ; GCN-NEXT: v_cndmask_b32_e64 v16, 1.0, v16, s[28:29]
1986 ; GCN-NEXT: v_cndmask_b32_e64 v17, 1.0, v17, s[30:31]
1987 ; GCN-NEXT: v_cndmask_b32_e64 v18, 1.0, v18, s[34:35]
1988 ; GCN-NEXT: v_cndmask_b32_e64 v19, 1.0, v19, s[36:37]
1989 ; GCN-NEXT: v_cndmask_b32_e64 v20, 1.0, v20, s[38:39]
1990 ; GCN-NEXT: v_cndmask_b32_e64 v21, 1.0, v21, s[40:41]
1991 ; GCN-NEXT: v_cndmask_b32_e64 v22, 1.0, v22, s[42:43]
1992 ; GCN-NEXT: v_cndmask_b32_e64 v23, 1.0, v23, s[44:45]
1993 ; GCN-NEXT: v_cndmask_b32_e64 v24, 1.0, v24, s[46:47]
1994 ; GCN-NEXT: v_cndmask_b32_e64 v25, 1.0, v25, s[48:49]
1995 ; GCN-NEXT: v_cndmask_b32_e64 v26, 1.0, v26, s[50:51]
1996 ; GCN-NEXT: v_cndmask_b32_e64 v27, 1.0, v27, s[52:53]
1997 ; GCN-NEXT: v_cndmask_b32_e64 v28, 1.0, v28, s[54:55]
1998 ; GCN-NEXT: v_cndmask_b32_e64 v29, 1.0, v29, s[56:57]
1999 ; GCN-NEXT: v_cndmask_b32_e64 v30, 1.0, v30, s[58:59]
2000 ; GCN-NEXT: v_cndmask_b32_e64 v31, 1.0, v31, s[60:61]
2001 ; GCN-NEXT: ; return to shader part epilog
2003 %v = insertelement <32 x float> %vec, float 1.000000e+00, i32 %sel
2007 define <8 x double> @double8_inselt_vec(<8 x double> %vec, i32 %sel) {
2008 ; GCN-LABEL: double8_inselt_vec:
2009 ; GCN: ; %bb.0: ; %entry
2010 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2011 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 0, v16
2012 ; GCN-NEXT: v_mov_b32_e32 v17, 0x3ff00000
2013 ; GCN-NEXT: v_cndmask_b32_e64 v0, v0, 0, vcc
2014 ; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v17, vcc
2015 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v16
2016 ; GCN-NEXT: v_cndmask_b32_e64 v2, v2, 0, vcc
2017 ; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v17, vcc
2018 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v16
2019 ; GCN-NEXT: v_cndmask_b32_e64 v4, v4, 0, vcc
2020 ; GCN-NEXT: v_cndmask_b32_e32 v5, v5, v17, vcc
2021 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v16
2022 ; GCN-NEXT: v_cndmask_b32_e64 v6, v6, 0, vcc
2023 ; GCN-NEXT: v_cndmask_b32_e32 v7, v7, v17, vcc
2024 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v16
2025 ; GCN-NEXT: v_cndmask_b32_e64 v8, v8, 0, vcc
2026 ; GCN-NEXT: v_cndmask_b32_e32 v9, v9, v17, vcc
2027 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v16
2028 ; GCN-NEXT: v_cndmask_b32_e64 v10, v10, 0, vcc
2029 ; GCN-NEXT: v_cndmask_b32_e32 v11, v11, v17, vcc
2030 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 6, v16
2031 ; GCN-NEXT: v_cndmask_b32_e64 v12, v12, 0, vcc
2032 ; GCN-NEXT: v_cndmask_b32_e32 v13, v13, v17, vcc
2033 ; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 7, v16
2034 ; GCN-NEXT: v_cndmask_b32_e64 v14, v14, 0, vcc
2035 ; GCN-NEXT: v_cndmask_b32_e32 v15, v15, v17, vcc
2036 ; GCN-NEXT: s_setpc_b64 s[30:31]
2038 %v = insertelement <8 x double> %vec, double 1.000000e+00, i32 %sel