1 ; RUN: llc -mtriple=amdgcn -amdgpu-codegenprepare-break-large-phis-threshold=4096 < %s | FileCheck %s
2 ; RUN: llc -mtriple=amdgcn -mcpu=tonga -amdgpu-codegenprepare-break-large-phis-threshold=4096 < %s | FileCheck %s
3 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -amdgpu-codegenprepare-break-large-phis-threshold=4096 < %s | FileCheck %s
4 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -amdgpu-codegenprepare-break-large-phis-threshold=4096 < %s | FileCheck %s
6 ; This test just checks that the compiler doesn't crash.
8 ; CHECK-LABEL: {{^}}v32i8_to_v8i32:
9 define amdgpu_ps float @v32i8_to_v8i32(ptr addrspace(4) inreg) #0 {
11 %1 = load <32 x i8>, ptr addrspace(4) %0
12 %2 = bitcast <32 x i8> %1 to <8 x i32>
13 %3 = extractelement <8 x i32> %2, i32 1
14 %4 = icmp ne i32 %3, 0
15 %5 = select i1 %4, float 0.0, float 1.0
19 ; CHECK-LABEL: {{^}}i8ptr_v16i8ptr:
21 define amdgpu_kernel void @i8ptr_v16i8ptr(ptr addrspace(1) %out, ptr addrspace(1) %in) {
23 %0 = load <16 x i8>, ptr addrspace(1) %in
24 store <16 x i8> %0, ptr addrspace(1) %out
28 define amdgpu_kernel void @f32_to_v2i16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
29 %load = load float, ptr addrspace(1) %in, align 4
30 %fadd32 = fadd float %load, 1.0
31 %bc = bitcast float %fadd32 to <2 x i16>
32 %add.bitcast = add <2 x i16> %bc, <i16 2, i16 2>
33 store <2 x i16> %add.bitcast, ptr addrspace(1) %out
37 define amdgpu_kernel void @v2i16_to_f32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
38 %load = load <2 x i16>, ptr addrspace(1) %in, align 4
39 %add.v2i16 = add <2 x i16> %load, <i16 2, i16 2>
40 %bc = bitcast <2 x i16> %add.v2i16 to float
41 %fadd.bitcast = fadd float %bc, 1.0
42 store float %fadd.bitcast, ptr addrspace(1) %out
46 define amdgpu_kernel void @f32_to_v2f16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
47 %load = load float, ptr addrspace(1) %in, align 4
48 %fadd32 = fadd float %load, 1.0
49 %bc = bitcast float %fadd32 to <2 x half>
50 %add.bitcast = fadd <2 x half> %bc, <half 2.0, half 2.0>
51 store <2 x half> %add.bitcast, ptr addrspace(1) %out
55 define amdgpu_kernel void @v2f16_to_f32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
56 %load = load <2 x half>, ptr addrspace(1) %in, align 4
57 %add.v2f16 = fadd <2 x half> %load, <half 2.0, half 2.0>
58 %bc = bitcast <2 x half> %add.v2f16 to float
59 %fadd.bitcast = fadd float %bc, 1.0
60 store float %fadd.bitcast, ptr addrspace(1) %out
64 define amdgpu_kernel void @v4i8_to_i32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
65 %load = load <4 x i8>, ptr addrspace(1) %in, align 4
66 %bc = bitcast <4 x i8> %load to i32
67 store i32 %bc, ptr addrspace(1) %out, align 4
71 define amdgpu_kernel void @i32_to_v4i8(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
72 %load = load i32, ptr addrspace(1) %in, align 4
73 %bc = bitcast i32 %load to <4 x i8>
74 store <4 x i8> %bc, ptr addrspace(1) %out, align 4
78 ; CHECK-LABEL: {{^}}bitcast_v2i32_to_f64:
80 define amdgpu_kernel void @bitcast_v2i32_to_f64(ptr addrspace(1) %out, ptr addrspace(1) %in) {
81 %val = load <2 x i32>, ptr addrspace(1) %in, align 8
82 %add = add <2 x i32> %val, <i32 4, i32 9>
83 %bc = bitcast <2 x i32> %add to double
84 %fadd.bc = fadd double %bc, 1.0
85 store double %fadd.bc, ptr addrspace(1) %out, align 8
89 ; CHECK-LABEL: {{^}}bitcast_f64_to_v2i32:
91 define amdgpu_kernel void @bitcast_f64_to_v2i32(ptr addrspace(1) %out, ptr addrspace(1) %in) {
92 %val = load double, ptr addrspace(1) %in, align 8
93 %add = fadd double %val, 4.0
94 %bc = bitcast double %add to <2 x i32>
95 store <2 x i32> %bc, ptr addrspace(1) %out, align 8
99 ; CHECK-LABEL: {{^}}bitcast_v2i64_to_v2f64:
100 define amdgpu_kernel void @bitcast_v2i64_to_v2f64(i32 %cond, ptr addrspace(1) %out, <2 x i64> %value) {
102 %cmp0 = icmp eq i32 %cond, 0
103 br i1 %cmp0, label %if, label %end
106 %cast = bitcast <2 x i64> %value to <2 x double>
110 %phi = phi <2 x double> [zeroinitializer, %entry], [%cast, %if]
111 store <2 x double> %phi, ptr addrspace(1) %out
115 ; CHECK-LABEL: {{^}}bitcast_v2f64_to_v2i64:
116 define amdgpu_kernel void @bitcast_v2f64_to_v2i64(i32 %cond, ptr addrspace(1) %out, <2 x double> %value) {
118 %cmp0 = icmp eq i32 %cond, 0
119 br i1 %cmp0, label %if, label %end
122 %cast = bitcast <2 x double> %value to <2 x i64>
126 %phi = phi <2 x i64> [zeroinitializer, %entry], [%cast, %if]
127 store <2 x i64> %phi, ptr addrspace(1) %out
131 ; CHECK-LABEL: {{^}}v4i16_to_f64:
132 define amdgpu_kernel void @v4i16_to_f64(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
133 %load = load <4 x i16>, ptr addrspace(1) %in, align 4
134 %add.v4i16 = add <4 x i16> %load, <i16 4, i16 4, i16 4, i16 4>
135 %bc = bitcast <4 x i16> %add.v4i16 to double
136 %fadd.bitcast = fadd double %bc, 1.0
137 store double %fadd.bitcast, ptr addrspace(1) %out
141 ; CHECK-LABEL: {{^}}v4f16_to_f64:
142 define amdgpu_kernel void @v4f16_to_f64(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
143 %load = load <4 x half>, ptr addrspace(1) %in, align 4
144 %add.v4half = fadd <4 x half> %load, <half 4.0, half 4.0, half 4.0, half 4.0>
145 %bc = bitcast <4 x half> %add.v4half to double
146 %fadd.bitcast = fadd double %bc, 1.0
147 store double %fadd.bitcast, ptr addrspace(1) %out
151 ; CHECK-LABEL: {{^}}f64_to_v4f16:
152 define amdgpu_kernel void @f64_to_v4f16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
153 %load = load double, ptr addrspace(1) %in, align 4
154 %fadd32 = fadd double %load, 1.0
155 %bc = bitcast double %fadd32 to <4 x half>
156 %add.bitcast = fadd <4 x half> %bc, <half 2.0, half 2.0, half 2.0, half 2.0>
157 store <4 x half> %add.bitcast, ptr addrspace(1) %out
161 ; CHECK-LABEL: {{^}}f64_to_v4i16:
162 define amdgpu_kernel void @f64_to_v4i16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
163 %load = load double, ptr addrspace(1) %in, align 4
164 %fadd32 = fadd double %load, 1.0
165 %bc = bitcast double %fadd32 to <4 x i16>
166 %add.bitcast = add <4 x i16> %bc, <i16 2, i16 2, i16 2, i16 2>
167 store <4 x i16> %add.bitcast, ptr addrspace(1) %out
171 ; CHECK-LABEL: {{^}}v4i16_to_i64:
172 define amdgpu_kernel void @v4i16_to_i64(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
173 %load = load <4 x i16>, ptr addrspace(1) %in, align 4
174 %add.v4i16 = add <4 x i16> %load, <i16 4, i16 4, i16 4, i16 4>
175 %bc = bitcast <4 x i16> %add.v4i16 to i64
176 %add.bitcast = add i64 %bc, 1
177 store i64 %add.bitcast, ptr addrspace(1) %out
181 ; CHECK-LABEL: {{^}}v4f16_to_i64:
182 define amdgpu_kernel void @v4f16_to_i64(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
183 %load = load <4 x half>, ptr addrspace(1) %in, align 4
184 %add.v4half = fadd <4 x half> %load, <half 4.0, half 4.0, half 4.0, half 4.0>
185 %bc = bitcast <4 x half> %add.v4half to i64
186 %add.bitcast = add i64 %bc, 1
187 store i64 %add.bitcast, ptr addrspace(1) %out
191 ; CHECK-LABEL: {{^}}bitcast_i64_to_v4i16:
192 define amdgpu_kernel void @bitcast_i64_to_v4i16(ptr addrspace(1) %out, ptr addrspace(1) %in) {
193 %val = load i64, ptr addrspace(1) %in, align 8
194 %add = add i64 %val, 4
195 %bc = bitcast i64 %add to <4 x i16>
196 %add.v4i16 = add <4 x i16> %bc, <i16 1, i16 2, i16 3, i16 4>
197 store <4 x i16> %add.v4i16, ptr addrspace(1) %out, align 8
201 ; CHECK-LABEL: {{^}}bitcast_i64_to_v4f16:
202 define amdgpu_kernel void @bitcast_i64_to_v4f16(ptr addrspace(1) %out, ptr addrspace(1) %in) {
203 %val = load i64, ptr addrspace(1) %in, align 8
204 %add = add i64 %val, 4
205 %bc = bitcast i64 %add to <4 x half>
206 %add.v4i16 = fadd <4 x half> %bc, <half 1.0, half 2.0, half 4.0, half 8.0>
207 store <4 x half> %add.v4i16, ptr addrspace(1) %out, align 8
211 ; CHECK-LABEL: {{^}}v4i16_to_v2f32:
212 define amdgpu_kernel void @v4i16_to_v2f32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
213 %load = load <4 x i16>, ptr addrspace(1) %in, align 4
214 %add.v4i16 = add <4 x i16> %load, <i16 4, i16 4, i16 4, i16 4>
215 %bc = bitcast <4 x i16> %add.v4i16 to <2 x float>
216 %fadd.bitcast = fadd <2 x float> %bc, <float 1.0, float 1.0>
217 store <2 x float> %fadd.bitcast, ptr addrspace(1) %out
221 ; CHECK-LABEL: {{^}}v4f16_to_v2f32:
222 define amdgpu_kernel void @v4f16_to_v2f32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
223 %load = load <4 x half>, ptr addrspace(1) %in, align 4
224 %add.v4half = fadd <4 x half> %load, <half 4.0, half 4.0, half 4.0, half 4.0>
225 %bc = bitcast <4 x half> %add.v4half to <2 x float>
226 %fadd.bitcast = fadd <2 x float> %bc, <float 1.0, float 1.0>
227 store <2 x float> %fadd.bitcast, ptr addrspace(1) %out
231 ; CHECK-LABEL: {{^}}v2f32_to_v4i16:
232 define amdgpu_kernel void @v2f32_to_v4i16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
233 %load = load <2 x float>, ptr addrspace(1) %in, align 4
234 %add.v2f32 = fadd <2 x float> %load, <float 2.0, float 4.0>
235 %bc = bitcast <2 x float> %add.v2f32 to <4 x i16>
236 %add.bitcast = add <4 x i16> %bc, <i16 1, i16 2, i16 3, i16 4>
237 store <4 x i16> %add.bitcast, ptr addrspace(1) %out
241 ; CHECK-LABEL: {{^}}v2f32_to_v4f16:
242 define amdgpu_kernel void @v2f32_to_v4f16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
243 %load = load <2 x float>, ptr addrspace(1) %in, align 4
244 %add.v2f32 = fadd <2 x float> %load, <float 2.0, float 4.0>
245 %bc = bitcast <2 x float> %add.v2f32 to <4 x half>
246 %add.bitcast = fadd <4 x half> %bc, <half 1.0, half 2.0, half 4.0, half 8.0>
247 store <4 x half> %add.bitcast, ptr addrspace(1) %out
251 ; CHECK-LABEL: {{^}}v4i16_to_v2i32:
252 define amdgpu_kernel void @v4i16_to_v2i32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
253 %load = load <4 x i16>, ptr addrspace(1) %in, align 4
254 %add.v4i16 = add <4 x i16> %load, <i16 4, i16 4, i16 4, i16 4>
255 %bc = bitcast <4 x i16> %add.v4i16 to <2 x i32>
256 %add.bitcast = add <2 x i32> %bc, <i32 1, i32 1>
257 store <2 x i32> %add.bitcast, ptr addrspace(1) %out
261 ; CHECK-LABEL: {{^}}v4f16_to_v2i32:
262 define amdgpu_kernel void @v4f16_to_v2i32(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
263 %load = load <4 x half>, ptr addrspace(1) %in, align 4
264 %add.v4half = fadd <4 x half> %load, <half 4.0, half 4.0, half 4.0, half 4.0>
265 %bc = bitcast <4 x half> %add.v4half to <2 x i32>
266 %add.bitcast = add <2 x i32> %bc, <i32 1, i32 1>
267 store <2 x i32> %add.bitcast, ptr addrspace(1) %out
271 ; CHECK-LABEL: {{^}}v2i32_to_v4i16:
272 define amdgpu_kernel void @v2i32_to_v4i16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
273 %load = load <2 x i32>, ptr addrspace(1) %in, align 4
274 %add.v2i32 = add <2 x i32> %load, <i32 2, i32 4>
275 %bc = bitcast <2 x i32> %add.v2i32 to <4 x i16>
276 %add.bitcast = add <4 x i16> %bc, <i16 1, i16 2, i16 3, i16 4>
277 store <4 x i16> %add.bitcast, ptr addrspace(1) %out
281 ; CHECK-LABEL: {{^}}v2i32_to_v4f16:
282 define amdgpu_kernel void @v2i32_to_v4f16(ptr addrspace(1) %out, ptr addrspace(1) %in) nounwind {
283 %load = load <2 x i32>, ptr addrspace(1) %in, align 4
284 %add.v2i32 = add <2 x i32> %load, <i32 2, i32 4>
285 %bc = bitcast <2 x i32> %add.v2i32 to <4 x half>
286 %add.bitcast = fadd <4 x half> %bc, <half 1.0, half 2.0, half 4.0, half 8.0>
287 store <4 x half> %add.bitcast, ptr addrspace(1) %out
291 declare <4 x float> @llvm.amdgcn.s.buffer.load.v4f32(<4 x i32>, i32, i32 immarg)
293 ; CHECK-LABEL: {{^}}bitcast_v4f32_to_v2i64:
294 ; CHECK: s_buffer_load_{{dwordx4|b128}}
295 define <2 x i64> @bitcast_v4f32_to_v2i64(<2 x i64> %arg) {
296 %val = call <4 x float> @llvm.amdgcn.s.buffer.load.v4f32(<4 x i32> undef, i32 0, i32 0)
297 %cast = bitcast <4 x float> %val to <2 x i64>
298 %div = udiv <2 x i64> %cast, %arg
302 declare half @llvm.canonicalize.f16(half)
304 ; CHECK-LABEL: {{^}}bitcast_f32_to_v1i32:
305 define amdgpu_kernel void @bitcast_f32_to_v1i32(ptr addrspace(1) %out) {
306 %f16 = call arcp afn half @llvm.canonicalize.f16(half 0xH03F0)
307 %f32 = fpext half %f16 to float
308 %v = bitcast float %f32 to <1 x i32>
309 %v1 = extractelement <1 x i32> %v, i32 0
310 store i32 %v1, ptr addrspace(1) %out
314 ; CHECK-LABEL: {{^}}bitcast_v4i64_to_v16i16:
315 define amdgpu_kernel void @bitcast_v4i64_to_v16i16(i32 %cond, ptr addrspace(1) %out, <4 x i64> %value) {
317 %cmp0 = icmp eq i32 %cond, 0
318 br i1 %cmp0, label %if, label %end
321 %phi_value = phi <4 x i64> [zeroinitializer, %entry], [%value, %if]
322 %cast = bitcast <4 x i64> %phi_value to <16 x i16>
323 %cmp1 = icmp eq i32 %cond, 1
324 br i1 %cmp1, label %if, label %end
327 %phi_cast = phi <16 x i16> [zeroinitializer, %entry], [%cast, %if]
328 store <16 x i16> %phi_cast, ptr addrspace(1) %out
332 ; CHECK-LABEL: {{^}}bitcast_v4f64_to_v16f16:
333 define amdgpu_kernel void @bitcast_v4f64_to_v16f16(i32 %cond, ptr addrspace(1) %out, <4 x double> %value) {
335 %cmp0 = icmp eq i32 %cond, 0
336 br i1 %cmp0, label %if, label %end
339 %phi_value = phi <4 x double> [zeroinitializer, %entry], [%value, %if]
340 %cast = bitcast <4 x double> %phi_value to <16 x half>
341 %cmp1 = icmp eq i32 %cond, 1
342 br i1 %cmp1, label %if, label %end
345 %phi_cast = phi <16 x half> [zeroinitializer, %entry], [%cast, %if]
346 store <16 x half> %phi_cast, ptr addrspace(1) %out
350 ; CHECK-LABEL: {{^}}bitcast_v16i16_to_v4i64:
351 define amdgpu_kernel void @bitcast_v16i16_to_v4i64(i32 %cond, ptr addrspace(1) %out, <16 x i16> %value) {
353 %cmp0 = icmp eq i32 %cond, 0
354 br i1 %cmp0, label %if, label %end
357 %phi_value = phi <16 x i16> [zeroinitializer, %entry], [%value, %if]
358 %cast = bitcast <16 x i16> %phi_value to <4 x i64>
359 %cmp1 = icmp eq i32 %cond, 1
360 br i1 %cmp1, label %if, label %end
363 %phi_cast = phi <4 x i64> [zeroinitializer, %entry], [%cast, %if]
364 store <4 x i64> %phi_cast, ptr addrspace(1) %out
368 ; CHECK-LABEL: {{^}}bitcast_v16f16_to_v4f64:
369 define amdgpu_kernel void @bitcast_v16f16_to_v4f64(i32 %cond, ptr addrspace(1) %out, <16 x half> %value) {
371 %cmp0 = icmp eq i32 %cond, 0
372 br i1 %cmp0, label %if, label %end
375 %phi_value = phi <16 x half> [zeroinitializer, %entry], [%value, %if]
376 %cast = bitcast <16 x half> %phi_value to <4 x double>
377 %cmp1 = icmp eq i32 %cond, 1
378 br i1 %cmp1, label %if, label %end
381 %phi_cast = phi <4 x double> [zeroinitializer, %entry], [%cast, %if]
382 store <4 x double> %phi_cast, ptr addrspace(1) %out
386 ; CHECK-LABEL: {{^}}bitcast_v20f16_to_v5f64:
387 ; CHECK: ScratchSize: 0
388 define amdgpu_kernel void @bitcast_v20f16_to_v5f64(i32 %cond, ptr addrspace(1) %out, <20 x half> %value) {
390 %cmp0 = icmp eq i32 %cond, 0
391 br i1 %cmp0, label %if, label %end
394 %phi_value = phi <20 x half> [zeroinitializer, %entry], [%value, %if]
395 %cast = bitcast <20 x half> %phi_value to <5 x double>
396 %cmp1 = icmp eq i32 %cond, 1
397 br i1 %cmp1, label %if, label %end
400 %phi_cast = phi <5 x double> [zeroinitializer, %entry], [%cast, %if]
401 store <5 x double> %phi_cast, ptr addrspace(1) %out
405 ; CHECK-LABEL: {{^}}bitcast_v10f32_to_v5f64:
406 ; CHECK: ScratchSize: 0
407 define amdgpu_kernel void @bitcast_v10f32_to_v5f64(i32 %cond, ptr addrspace(1) %out, <10 x float> %value) {
409 %cmp0 = icmp eq i32 %cond, 0
410 br i1 %cmp0, label %if, label %end
413 %phi_value = phi <10 x float> [zeroinitializer, %entry], [%value, %if]
414 %cast = bitcast <10 x float> %phi_value to <5 x double>
415 %cmp1 = icmp eq i32 %cond, 1
416 br i1 %cmp1, label %if, label %end
419 %phi_cast = phi <5 x double> [zeroinitializer, %entry], [%cast, %if]
420 store <5 x double> %phi_cast, ptr addrspace(1) %out
424 ; CHECK-LABEL: {{^}}bitcast_v10i32_to_v5f64:
425 ; CHECK: ScratchSize: 0
426 define amdgpu_kernel void @bitcast_v10i32_to_v5f64(i32 %cond, ptr addrspace(1) %out, <10 x i32> %value) {
428 %cmp0 = icmp eq i32 %cond, 0
429 br i1 %cmp0, label %if, label %end
432 %phi_value = phi <10 x i32> [zeroinitializer, %entry], [%value, %if]
433 %cast = bitcast <10 x i32> %phi_value to <5 x double>
434 %cmp1 = icmp eq i32 %cond, 1
435 br i1 %cmp1, label %if, label %end
438 %phi_cast = phi <5 x double> [zeroinitializer, %entry], [%cast, %if]
439 store <5 x double> %phi_cast, ptr addrspace(1) %out
443 ; CHECK-LABEL: {{^}}bitcast_v10f32_to_v5i64:
444 ; CHECK: ScratchSize: 0
445 define amdgpu_kernel void @bitcast_v10f32_to_v5i64(i32 %cond, ptr addrspace(1) %out, <10 x float> %value) {
447 %cmp0 = icmp eq i32 %cond, 0
448 br i1 %cmp0, label %if, label %end
451 %phi_value = phi <10 x float> [zeroinitializer, %entry], [%value, %if]
452 %cast = bitcast <10 x float> %phi_value to <5 x i64>
453 %cmp1 = icmp eq i32 %cond, 1
454 br i1 %cmp1, label %if, label %end
457 %phi_cast = phi <5 x i64> [zeroinitializer, %entry], [%cast, %if]
458 store <5 x i64> %phi_cast, ptr addrspace(1) %out
462 ; CHECK-LABEL: {{^}}bitcast_v10i32_to_v5i64:
463 ; CHECK: ScratchSize: 0
464 define amdgpu_kernel void @bitcast_v10i32_to_v5i64(i32 %cond, ptr addrspace(1) %out, <10 x i32> %value) {
466 %cmp0 = icmp eq i32 %cond, 0
467 br i1 %cmp0, label %if, label %end
470 %phi_value = phi <10 x i32> [zeroinitializer, %entry], [%value, %if]
471 %cast = bitcast <10 x i32> %phi_value to <5 x i64>
472 %cmp1 = icmp eq i32 %cond, 1
473 br i1 %cmp1, label %if, label %end
476 %phi_cast = phi <5 x i64> [zeroinitializer, %entry], [%cast, %if]
477 store <5 x i64> %phi_cast, ptr addrspace(1) %out
481 ; CHECK-LABEL: {{^}}bitcast_v40i8_to_v5f64:
482 ; CHECK: ScratchSize: 0
483 define amdgpu_kernel void @bitcast_v40i8_to_v5f64(i32 %cond, ptr addrspace(1) %out, <40 x i8> %value) {
485 %cmp0 = icmp eq i32 %cond, 0
486 br i1 %cmp0, label %if, label %end
489 %phi_value = phi <40 x i8> [zeroinitializer, %entry], [%value, %if]
490 %cast = bitcast <40 x i8> %phi_value to <5 x double>
491 %cmp1 = icmp eq i32 %cond, 1
492 br i1 %cmp1, label %if, label %end
495 %phi_cast = phi <5 x double> [zeroinitializer, %entry], [%cast, %if]
496 store <5 x double> %phi_cast, ptr addrspace(1) %out
500 ; CHECK-LABEL: {{^}}bitcast_v40i8_to_v5i64:
501 ; CHECK: ScratchSize: 0
502 define amdgpu_kernel void @bitcast_v40i8_to_v5i64(i32 %cond, ptr addrspace(1) %out, <40 x i8> %value) {
504 %cmp0 = icmp eq i32 %cond, 0
505 br i1 %cmp0, label %if, label %end
508 %phi_value = phi <40 x i8> [zeroinitializer, %entry], [%value, %if]
509 %cast = bitcast <40 x i8> %phi_value to <5 x i64>
510 %cmp1 = icmp eq i32 %cond, 1
511 br i1 %cmp1, label %if, label %end
514 %phi_cast = phi <5 x i64> [zeroinitializer, %entry], [%cast, %if]
515 store <5 x i64> %phi_cast, ptr addrspace(1) %out
519 ; CHECK-LABEL: {{^}}bitcast_v5f64_to_v10f32:
520 ; CHECK: ScratchSize: 0
521 define amdgpu_kernel void @bitcast_v5f64_to_v10f32(i32 %cond, ptr addrspace(1) %out, <5 x double> %value) {
523 %cmp0 = icmp eq i32 %cond, 0
524 br i1 %cmp0, label %if, label %end
527 %phi_value = phi <5 x double> [zeroinitializer, %entry], [%value, %if]
528 %cast = bitcast <5 x double> %phi_value to <10 x float>
529 %cmp1 = icmp eq i32 %cond, 1
530 br i1 %cmp1, label %if, label %end
533 %phi_cast = phi <10 x float> [zeroinitializer, %entry], [%cast, %if]
534 store <10 x float> %phi_cast, ptr addrspace(1) %out
538 ; CHECK-LABEL: {{^}}bitcast_v5f64_to_v10i32:
539 ; CHECK: ScratchSize: 0
540 define amdgpu_kernel void @bitcast_v5f64_to_v10i32(i32 %cond, ptr addrspace(1) %out, <5 x double> %value) {
542 %cmp0 = icmp eq i32 %cond, 0
543 br i1 %cmp0, label %if, label %end
546 %phi_value = phi <5 x double> [zeroinitializer, %entry], [%value, %if]
547 %cast = bitcast <5 x double> %phi_value to <10 x i32>
548 %cmp1 = icmp eq i32 %cond, 1
549 br i1 %cmp1, label %if, label %end
552 %phi_cast = phi <10 x i32> [zeroinitializer, %entry], [%cast, %if]
553 store <10 x i32> %phi_cast, ptr addrspace(1) %out
557 ; CHECK-LABEL: {{^}}bitcast_v5i64_to_v10f32:
558 ; CHECK: ScratchSize: 0
559 define amdgpu_kernel void @bitcast_v5i64_to_v10f32(i32 %cond, ptr addrspace(1) %out, <5 x i64> %value) {
561 %cmp0 = icmp eq i32 %cond, 0
562 br i1 %cmp0, label %if, label %end
565 %phi_value = phi <5 x i64> [zeroinitializer, %entry], [%value, %if]
566 %cast = bitcast <5 x i64> %phi_value to <10 x float>
567 %cmp1 = icmp eq i32 %cond, 1
568 br i1 %cmp1, label %if, label %end
571 %phi_cast = phi <10 x float> [zeroinitializer, %entry], [%cast, %if]
572 store <10 x float> %phi_cast, ptr addrspace(1) %out
576 ; CHECK-LABEL: {{^}}bitcast_v5i64_to_v10i32:
577 ; CHECK: ScratchSize: 0
578 define amdgpu_kernel void @bitcast_v5i64_to_v10i32(i32 %cond, ptr addrspace(1) %out, <5 x i64> %value) {
580 %cmp0 = icmp eq i32 %cond, 0
581 br i1 %cmp0, label %if, label %end
584 %phi_value = phi <5 x i64> [zeroinitializer, %entry], [%value, %if]
585 %cast = bitcast <5 x i64> %phi_value to <10 x i32>
586 %cmp1 = icmp eq i32 %cond, 1
587 br i1 %cmp1, label %if, label %end
590 %phi_cast = phi <10 x i32> [zeroinitializer, %entry], [%cast, %if]
591 store <10 x i32> %phi_cast, ptr addrspace(1) %out
595 ; CHECK-LABEL: {{^}}bitcast_v6f64_to_v12i32:
596 ; CHECK: ScratchSize: 0
597 define amdgpu_kernel void @bitcast_v6f64_to_v12i32(i32 %cond, ptr addrspace(1) %out, <6 x double> %value) {
599 %cmp0 = icmp eq i32 %cond, 0
600 br i1 %cmp0, label %if, label %end
603 %phi_value = phi <6 x double> [zeroinitializer, %entry], [%value, %if]
604 %cast = bitcast <6 x double> %phi_value to <12 x i32>
605 %cmp1 = icmp eq i32 %cond, 1
606 br i1 %cmp1, label %if, label %end
609 %phi_cast = phi <12 x i32> [zeroinitializer, %entry], [%cast, %if]
610 store <12 x i32> %phi_cast, ptr addrspace(1) %out
614 ; CHECK-LABEL: {{^}}bitcast_v6f64_to_v12f32:
615 ; CHECK: ScratchSize: 0
616 define amdgpu_kernel void @bitcast_v6f64_to_v12f32(i32 %cond, ptr addrspace(1) %out, <6 x double> %value) {
618 %cmp0 = icmp eq i32 %cond, 0
619 br i1 %cmp0, label %if, label %end
622 %phi_value = phi <6 x double> [zeroinitializer, %entry], [%value, %if]
623 %cast = bitcast <6 x double> %phi_value to <12 x float>
624 %cmp1 = icmp eq i32 %cond, 1
625 br i1 %cmp1, label %if, label %end
628 %phi_cast = phi <12 x float> [zeroinitializer, %entry], [%cast, %if]
629 store <12 x float> %phi_cast, ptr addrspace(1) %out
633 ; CHECK-LABEL: {{^}}bitcast_v12i32_to_v6i64:
634 ; CHECK: ScratchSize: 0
635 define amdgpu_kernel void @bitcast_v12i32_to_v6i64(i32 %cond, ptr addrspace(1) %out, <12 x i32> %value) {
637 %cmp0 = icmp eq i32 %cond, 0
638 br i1 %cmp0, label %if, label %end
641 %phi_value = phi <12 x i32> [zeroinitializer, %entry], [%value, %if]
642 %cast = bitcast <12 x i32> %phi_value to <6 x i64>
643 %cmp1 = icmp eq i32 %cond, 1
644 br i1 %cmp1, label %if, label %end
647 %phi_cast = phi <6 x i64> [zeroinitializer, %entry], [%cast, %if]
648 store <6 x i64> %phi_cast, ptr addrspace(1) %out
652 ; CHECK-LABEL: {{^}}bitcast_v12i32_to_v6f64:
653 ; CHECK: ScratchSize: 0
654 define amdgpu_kernel void @bitcast_v12i32_to_v6f64(i32 %cond, ptr addrspace(1) %out, <12 x i32> %value) {
656 %cmp0 = icmp eq i32 %cond, 0
657 br i1 %cmp0, label %if, label %end
660 %phi_value = phi <12 x i32> [zeroinitializer, %entry], [%value, %if]
661 %cast = bitcast <12 x i32> %phi_value to <6 x double>
662 %cmp1 = icmp eq i32 %cond, 1
663 br i1 %cmp1, label %if, label %end
666 %phi_cast = phi <6 x double> [zeroinitializer, %entry], [%cast, %if]
667 store <6 x double> %phi_cast, ptr addrspace(1) %out
671 ; CHECK-LABEL: {{^}}bitcast_v6i64_to_v12i32:
672 ; CHECK: ScratchSize: 0
673 define amdgpu_kernel void @bitcast_v6i64_to_v12i32(i32 %cond, ptr addrspace(1) %out, <6 x i64> %value) {
675 %cmp0 = icmp eq i32 %cond, 0
676 br i1 %cmp0, label %if, label %end
679 %phi_value = phi <6 x i64> [zeroinitializer, %entry], [%value, %if]
680 %cast = bitcast <6 x i64> %phi_value to <12 x i32>
681 %cmp1 = icmp eq i32 %cond, 1
682 br i1 %cmp1, label %if, label %end
685 %phi_cast = phi <12 x i32> [zeroinitializer, %entry], [%cast, %if]
686 store <12 x i32> %phi_cast, ptr addrspace(1) %out
690 ; CHECK-LABEL: {{^}}bitcast_v7i64_to_v14i32:
691 ; CHECK: ScratchSize: 0
692 define amdgpu_kernel void @bitcast_v7i64_to_v14i32(i32 %cond, ptr addrspace(1) %out, <7 x i64> %value) {
694 %cmp0 = icmp eq i32 %cond, 0
695 br i1 %cmp0, label %if, label %end
698 %phi_value = phi <7 x i64> [zeroinitializer, %entry], [%value, %if]
699 %cast = bitcast <7 x i64> %phi_value to <14 x i32>
700 %cmp1 = icmp eq i32 %cond, 1
701 br i1 %cmp1, label %if, label %end
704 %phi_cast = phi <14 x i32> [zeroinitializer, %entry], [%cast, %if]
705 store <14 x i32> %phi_cast, ptr addrspace(1) %out
709 ; CHECK-LABEL: {{^}}bitcast_v7f64_to_v14i32:
710 ; CHECK: ScratchSize: 0
711 define amdgpu_kernel void @bitcast_v7f64_to_v14i32(i32 %cond, ptr addrspace(1) %out, <7 x double> %value) {
713 %cmp0 = icmp eq i32 %cond, 0
714 br i1 %cmp0, label %if, label %end
717 %phi_value = phi <7 x double> [zeroinitializer, %entry], [%value, %if]
718 %cast = bitcast <7 x double> %phi_value to <14 x i32>
719 %cmp1 = icmp eq i32 %cond, 1
720 br i1 %cmp1, label %if, label %end
723 %phi_cast = phi <14 x i32> [zeroinitializer, %entry], [%cast, %if]
724 store <14 x i32> %phi_cast, ptr addrspace(1) %out
728 ; CHECK-LABEL: {{^}}bitcast_v9i64_to_v18i32:
729 ; CHECK: ScratchSize: 0
730 define amdgpu_kernel void @bitcast_v9i64_to_v18i32(i32 %cond, ptr addrspace(1) %out, <9 x i64> %value) {
732 %cmp0 = icmp eq i32 %cond, 0
733 br i1 %cmp0, label %if, label %end
736 %phi_value = phi <9 x i64> [zeroinitializer, %entry], [%value, %if]
737 %cast = bitcast <9 x i64> %phi_value to <18 x i32>
738 %cmp1 = icmp eq i32 %cond, 1
739 br i1 %cmp1, label %if, label %end
742 %phi_cast = phi <18 x i32> [zeroinitializer, %entry], [%cast, %if]
743 store <18 x i32> %phi_cast, ptr addrspace(1) %out
747 ; CHECK-LABEL: {{^}}bitcast_v10i64_to_v20i32:
748 ; CHECK: ScratchSize: 0
749 define amdgpu_kernel void @bitcast_v10i64_to_v20i32(i32 %cond, ptr addrspace(1) %out, <10 x i64> %value) {
751 %cmp0 = icmp eq i32 %cond, 0
752 br i1 %cmp0, label %if, label %end
755 %phi_value = phi <10 x i64> [zeroinitializer, %entry], [%value, %if]
756 %cast = bitcast <10 x i64> %phi_value to <20 x i32>
757 %cmp1 = icmp eq i32 %cond, 1
758 br i1 %cmp1, label %if, label %end
761 %phi_cast = phi <20 x i32> [zeroinitializer, %entry], [%cast, %if]
762 store <20 x i32> %phi_cast, ptr addrspace(1) %out
766 ; CHECK-LABEL: {{^}}bitcast_v11i64_to_v20i32:
767 ; CHECK: ScratchSize: 0
768 define amdgpu_kernel void @bitcast_v11i64_to_v20i32(i32 %cond, ptr addrspace(1) %out, <11 x i64> %value) {
770 %cmp0 = icmp eq i32 %cond, 0
771 br i1 %cmp0, label %if, label %end
774 %phi_value = phi <11 x i64> [zeroinitializer, %entry], [%value, %if]
775 %cast = bitcast <11 x i64> %phi_value to <22 x i32>
776 %cmp1 = icmp eq i32 %cond, 1
777 br i1 %cmp1, label %if, label %end
780 %phi_cast = phi <22 x i32> [zeroinitializer, %entry], [%cast, %if]
781 store <22 x i32> %phi_cast, ptr addrspace(1) %out
785 ; CHECK-LABEL: {{^}}bitcast_v12i64_to_v22i32:
786 ; CHECK: ScratchSize: 0
787 define amdgpu_kernel void @bitcast_v12i64_to_v22i32(i32 %cond, ptr addrspace(1) %out, <12 x i64> %value) {
789 %cmp0 = icmp eq i32 %cond, 0
790 br i1 %cmp0, label %if, label %end
793 %phi_value = phi <12 x i64> [zeroinitializer, %entry], [%value, %if]
794 %cast = bitcast <12 x i64> %phi_value to <24 x i32>
795 %cmp1 = icmp eq i32 %cond, 1
796 br i1 %cmp1, label %if, label %end
799 %phi_cast = phi <24 x i32> [zeroinitializer, %entry], [%cast, %if]
800 store <24 x i32> %phi_cast, ptr addrspace(1) %out
804 ; CHECK-LABEL: {{^}}bitcast_v13i64_to_v24i32:
805 ; CHECK: ScratchSize: 0
806 define amdgpu_kernel void @bitcast_v13i64_to_v24i32(i32 %cond, ptr addrspace(1) %out, <13 x i64> %value) {
808 %cmp0 = icmp eq i32 %cond, 0
809 br i1 %cmp0, label %if, label %end
812 %phi_value = phi <13 x i64> [zeroinitializer, %entry], [%value, %if]
813 %cast = bitcast <13 x i64> %phi_value to <26 x i32>
814 %cmp1 = icmp eq i32 %cond, 1
815 br i1 %cmp1, label %if, label %end
818 %phi_cast = phi <26 x i32> [zeroinitializer, %entry], [%cast, %if]
819 store <26 x i32> %phi_cast, ptr addrspace(1) %out
823 ; CHECK-LABEL: {{^}}bitcast_v14i64_to_v26i32:
824 ; CHECK: ScratchSize: 0
825 define amdgpu_kernel void @bitcast_v14i64_to_v26i32(i32 %cond, ptr addrspace(1) %out, <14 x i64> %value) {
827 %cmp0 = icmp eq i32 %cond, 0
828 br i1 %cmp0, label %if, label %end
831 %phi_value = phi <14 x i64> [zeroinitializer, %entry], [%value, %if]
832 %cast = bitcast <14 x i64> %phi_value to <28 x i32>
833 %cmp1 = icmp eq i32 %cond, 1
834 br i1 %cmp1, label %if, label %end
837 %phi_cast = phi <28 x i32> [zeroinitializer, %entry], [%cast, %if]
838 store <28 x i32> %phi_cast, ptr addrspace(1) %out
842 ; CHECK-LABEL: {{^}}bitcast_v15i64_to_v26i32:
843 ; CHECK: ScratchSize: 0
844 define amdgpu_kernel void @bitcast_v15i64_to_v26i32(i32 %cond, ptr addrspace(1) %out, <15 x i64> %value) {
846 %cmp0 = icmp eq i32 %cond, 0
847 br i1 %cmp0, label %if, label %end
850 %phi_value = phi <15 x i64> [zeroinitializer, %entry], [%value, %if]
851 %cast = bitcast <15 x i64> %phi_value to <30 x i32>
852 %cmp1 = icmp eq i32 %cond, 1
853 br i1 %cmp1, label %if, label %end
856 %phi_cast = phi <30 x i32> [zeroinitializer, %entry], [%cast, %if]
857 store <30 x i32> %phi_cast, ptr addrspace(1) %out
861 ; CHECK-LABEL: {{^}}v_bitcast_v2bf16_to_i32:
862 define void @v_bitcast_v2bf16_to_i32(i32 %cond, ptr addrspace(1) %out, <2 x bfloat> %value) {
864 %cmp0 = icmp eq i32 %cond, 0
865 br i1 %cmp0, label %if, label %end
868 %cast = bitcast <2 x bfloat> %value to i32
872 %phi = phi i32 [0, %entry], [%cast, %if]
873 store i32 %phi, ptr addrspace(1) %out
877 ; CHECK-LABEL: {{^}}v_bitcast_v2bf16_to_v2i16:
878 define void @v_bitcast_v2bf16_to_v2i16(i32 %cond, ptr addrspace(1) %out, <2 x bfloat> %value) {
880 %cmp0 = icmp eq i32 %cond, 0
881 br i1 %cmp0, label %if, label %end
884 %cast = bitcast <2 x bfloat> %value to <2 x i16>
888 %phi = phi <2 x i16> [zeroinitializer, %entry], [%cast, %if]
889 store <2 x i16> %phi, ptr addrspace(1) %out
893 ; CHECK-LABEL: {{^}}v_bitcast_v2bf16_to_v2f16:
894 define void @v_bitcast_v2bf16_to_v2f16(i32 %cond, ptr addrspace(1) %out, <2 x bfloat> %value) {
896 %cmp0 = icmp eq i32 %cond, 0
897 br i1 %cmp0, label %if, label %end
900 %cast = bitcast <2 x bfloat> %value to <2 x half>
904 %phi = phi <2 x half> [zeroinitializer, %entry], [%cast, %if]
905 store <2 x half> %phi, ptr addrspace(1) %out
909 ; CHECK-LABEL: {{^}}v_bitcast_v2bf16_to_v4i8:
910 define void @v_bitcast_v2bf16_to_v4i8(i32 %cond, ptr addrspace(1) %out, <2 x bfloat> %value) {
912 %cmp0 = icmp eq i32 %cond, 0
913 br i1 %cmp0, label %if, label %end
916 %cast = bitcast <2 x bfloat> %value to <4 x i8>
920 %phi = phi <4 x i8> [zeroinitializer, %entry], [%cast, %if]
921 store <4 x i8> %phi, ptr addrspace(1) %out
925 ; CHECK-LABEL: {{^}}v_bitcast_v3bf16_to_v3i16:
926 define void @v_bitcast_v3bf16_to_v3i16(i32 %cond, ptr addrspace(1) %out, <3 x bfloat> %value) {
928 %cmp0 = icmp eq i32 %cond, 0
929 br i1 %cmp0, label %if, label %end
932 %cast = bitcast <3 x bfloat> %value to <3 x i16>
936 %phi = phi <3 x i16> [zeroinitializer, %entry], [%cast, %if]
937 store <3 x i16> %phi, ptr addrspace(1) %out
941 ; CHECK-LABEL: {{^}}v_bitcast_v3bf16_to_v3f16:
942 define void @v_bitcast_v3bf16_to_v3f16(i32 %cond, ptr addrspace(1) %out, <3 x bfloat> %value) {
944 %cmp0 = icmp eq i32 %cond, 0
945 br i1 %cmp0, label %if, label %end
948 %cast = bitcast <3 x bfloat> %value to <3 x half>
952 %phi = phi <3 x half> [zeroinitializer, %entry], [%cast, %if]
953 store <3 x half> %phi, ptr addrspace(1) %out
957 ; CHECK-LABEL: {{^}}v_bitcast_i32_to_v2bf16:
958 define void @v_bitcast_i32_to_v2bf16(i32 %cond, ptr addrspace(1) %out, i32 %value) {
960 %cmp0 = icmp eq i32 %cond, 0
961 br i1 %cmp0, label %if, label %end
964 %cast = bitcast i32 %value to <2 x bfloat>
968 %phi = phi <2 x bfloat> [zeroinitializer, %entry], [%cast, %if]
969 store <2 x bfloat> %phi, ptr addrspace(1) %out
973 ; CHECK-LABEL: {{^}}v_bitcast_v2i16_to_v2bf16:
974 define void @v_bitcast_v2i16_to_v2bf16(i32 %cond, ptr addrspace(1) %out, <2 x i16> %value) {
976 %cmp0 = icmp eq i32 %cond, 0
977 br i1 %cmp0, label %if, label %end
980 %cast = bitcast <2 x i16> %value to <2 x bfloat>
984 %phi = phi <2 x bfloat> [zeroinitializer, %entry], [%cast, %if]
985 store <2 x bfloat> %phi, ptr addrspace(1) %out
989 ; CHECK-LABEL: {{^}}v_bitcast_v2f16_to_v2bf16:
990 define void @v_bitcast_v2f16_to_v2bf16(i32 %cond, ptr addrspace(1) %out, <2 x half> %value) {
992 %cmp0 = icmp eq i32 %cond, 0
993 br i1 %cmp0, label %if, label %end
996 %cast = bitcast <2 x half> %value to <2 x bfloat>
1000 %phi = phi <2 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1001 store <2 x bfloat> %phi, ptr addrspace(1) %out
1005 ; CHECK-LABEL: {{^}}v_bitcast_v4i8_to_v2bf16:
1006 define void @v_bitcast_v4i8_to_v2bf16(i32 %cond, ptr addrspace(1) %out, <4 x i8> %value) {
1008 %cmp0 = icmp eq i32 %cond, 0
1009 br i1 %cmp0, label %if, label %end
1012 %cast = bitcast <4 x i8> %value to <2 x bfloat>
1016 %phi = phi <2 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1017 store <2 x bfloat> %phi, ptr addrspace(1) %out
1021 ; CHECK-LABEL: {{^}}v_bitcast_v3i16_to_v3bf16:
1022 define void @v_bitcast_v3i16_to_v3bf16(i32 %cond, ptr addrspace(1) %out, <3 x i16> %value) {
1024 %cmp0 = icmp eq i32 %cond, 0
1025 br i1 %cmp0, label %if, label %end
1028 %cast = bitcast <3 x i16> %value to <3 x bfloat>
1032 %phi = phi <3 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1033 store <3 x bfloat> %phi, ptr addrspace(1) %out
1037 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_v4f16:
1038 define void @v_bitcast_v4bf16_to_v4f16(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1040 %cmp0 = icmp eq i32 %cond, 0
1041 br i1 %cmp0, label %if, label %end
1044 %cast = bitcast <4 x bfloat> %value to <4 x half>
1048 %phi = phi <4 x half> [zeroinitializer, %entry], [%cast, %if]
1049 store <4 x half> %phi, ptr addrspace(1) %out
1053 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_v4i16:
1054 define void @v_bitcast_v4bf16_to_v4i16(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1056 %cmp0 = icmp eq i32 %cond, 0
1057 br i1 %cmp0, label %if, label %end
1060 %cast = bitcast <4 x bfloat> %value to <4 x i16>
1064 %phi = phi <4 x i16> [zeroinitializer, %entry], [%cast, %if]
1065 store <4 x i16> %phi, ptr addrspace(1) %out
1069 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_v2i32:
1070 define void @v_bitcast_v4bf16_to_v2i32(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1072 %cmp0 = icmp eq i32 %cond, 0
1073 br i1 %cmp0, label %if, label %end
1076 %cast = bitcast <4 x bfloat> %value to <2 x i32>
1080 %phi = phi <2 x i32> [zeroinitializer, %entry], [%cast, %if]
1081 store <2 x i32> %phi, ptr addrspace(1) %out
1085 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_v2f32:
1086 define void @v_bitcast_v4bf16_to_v2f32(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1088 %cmp0 = icmp eq i32 %cond, 0
1089 br i1 %cmp0, label %if, label %end
1092 %cast = bitcast <4 x bfloat> %value to <2 x float>
1096 %phi = phi <2 x float> [zeroinitializer, %entry], [%cast, %if]
1097 store <2 x float> %phi, ptr addrspace(1) %out
1101 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_f64:
1102 define void @v_bitcast_v4bf16_to_f64(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1104 %cmp0 = icmp eq i32 %cond, 0
1105 br i1 %cmp0, label %if, label %end
1108 %cast = bitcast <4 x bfloat> %value to double
1112 %phi = phi double [0.0, %entry], [%cast, %if]
1113 store double %phi, ptr addrspace(1) %out
1117 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_i64:
1118 define void @v_bitcast_v4bf16_to_i64(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1120 %cmp0 = icmp eq i32 %cond, 0
1121 br i1 %cmp0, label %if, label %end
1124 %cast = bitcast <4 x bfloat> %value to i64
1128 %phi = phi i64 [0, %entry], [%cast, %if]
1129 store i64 %phi, ptr addrspace(1) %out
1133 ; CHECK-LABEL: {{^}}v_bitcast_v4bf16_to_v8i8:
1134 define void @v_bitcast_v4bf16_to_v8i8(i32 %cond, ptr addrspace(1) %out, <4 x bfloat> %value) {
1136 %cmp0 = icmp eq i32 %cond, 0
1137 br i1 %cmp0, label %if, label %end
1140 %cast = bitcast <4 x bfloat> %value to <8 x i8>
1144 %phi = phi <8 x i8> [zeroinitializer, %entry], [%cast, %if]
1145 store <8 x i8> %phi, ptr addrspace(1) %out
1149 ; CHECK-LABEL: {{^}}v_bitcast_i64_to_v4bf16:
1150 define void @v_bitcast_i64_to_v4bf16(i32 %cond, ptr addrspace(1) %out, i64 %value) {
1152 %cmp0 = icmp eq i32 %cond, 0
1153 br i1 %cmp0, label %if, label %end
1156 %cast = bitcast i64 %value to <4 x bfloat>
1160 %phi = phi <4 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1161 store <4 x bfloat> %phi, ptr addrspace(1) %out
1165 ; CHECK-LABEL: {{^}}v_bitcast_v2f32_to_v4bf16:
1166 define void @v_bitcast_v2f32_to_v4bf16(i32 %cond, ptr addrspace(1) %out, <2 x float> %value) {
1168 %cmp0 = icmp eq i32 %cond, 0
1169 br i1 %cmp0, label %if, label %end
1172 %cast = bitcast <2 x float> %value to <4 x bfloat>
1176 %phi = phi <4 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1177 store <4 x bfloat> %phi, ptr addrspace(1) %out
1181 ; CHECK-LABEL: {{^}}v_bitcast_v2i32_to_v4bf16:
1182 define void @v_bitcast_v2i32_to_v4bf16(i32 %cond, ptr addrspace(1) %out, <2 x i32> %value) {
1184 %cmp0 = icmp eq i32 %cond, 0
1185 br i1 %cmp0, label %if, label %end
1188 %cast = bitcast <2 x i32> %value to <4 x bfloat>
1192 %phi = phi <4 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1193 store <4 x bfloat> %phi, ptr addrspace(1) %out
1197 ; CHECK-LABEL: {{^}}v_bitcast_v4i16_to_v4bf16:
1198 define void @v_bitcast_v4i16_to_v4bf16(i32 %cond, ptr addrspace(1) %out, <4 x i16> %value) {
1200 %cmp0 = icmp eq i32 %cond, 0
1201 br i1 %cmp0, label %if, label %end
1204 %cast = bitcast <4 x i16> %value to <4 x bfloat>
1208 %phi = phi <4 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1209 store <4 x bfloat> %phi, ptr addrspace(1) %out
1213 ; CHECK-LABEL: {{^}}v_bitcast_v4f16_to_v4bf16:
1214 define void @v_bitcast_v4f16_to_v4bf16(i32 %cond, ptr addrspace(1) %out, <4 x half> %value) {
1216 %cmp0 = icmp eq i32 %cond, 0
1217 br i1 %cmp0, label %if, label %end
1220 %cast = bitcast <4 x half> %value to <4 x bfloat>
1224 %phi = phi <4 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1225 store <4 x bfloat> %phi, ptr addrspace(1) %out
1229 ; CHECK-LABEL: {{^}}v_bitcast_v6bf16_to_v6i16:
1230 define void @v_bitcast_v6bf16_to_v6i16(i32 %cond, ptr addrspace(1) %out, <6 x bfloat> %value) {
1232 %cmp0 = icmp eq i32 %cond, 0
1233 br i1 %cmp0, label %if, label %end
1236 %cast = bitcast <6 x bfloat> %value to <6 x i16>
1240 %phi = phi <6 x i16> [zeroinitializer, %entry], [%cast, %if]
1241 store <6 x i16> %phi, ptr addrspace(1) %out
1245 ; CHECK-LABEL: {{^}}v_bitcast_v6bf16_to_v6f16:
1246 define void @v_bitcast_v6bf16_to_v6f16(i32 %cond, ptr addrspace(1) %out, <6 x bfloat> %value) {
1248 %cmp0 = icmp eq i32 %cond, 0
1249 br i1 %cmp0, label %if, label %end
1252 %cast = bitcast <6 x bfloat> %value to <6 x half>
1256 %phi = phi <6 x half> [zeroinitializer, %entry], [%cast, %if]
1257 store <6 x half> %phi, ptr addrspace(1) %out
1261 ; CHECK-LABEL: {{^}}v_bitcast_v6bf16_to_v12i8:
1262 define void @v_bitcast_v6bf16_to_v12i8(i32 %cond, ptr addrspace(1) %out, <6 x bfloat> %value) {
1264 %cmp0 = icmp eq i32 %cond, 0
1265 br i1 %cmp0, label %if, label %end
1268 %cast = bitcast <6 x bfloat> %value to <12 x i8>
1272 %phi = phi <12 x i8> [zeroinitializer, %entry], [%cast, %if]
1273 store <12 x i8> %phi, ptr addrspace(1) %out
1277 ; CHECK-LABEL: {{^}}v_bitcast_v6f16_to_v6bf16:
1278 define void @v_bitcast_v6f16_to_v6bf16(i32 %cond, ptr addrspace(1) %out, <6 x half> %value) {
1280 %cmp0 = icmp eq i32 %cond, 0
1281 br i1 %cmp0, label %if, label %end
1284 %cast = bitcast <6 x half> %value to <6 x bfloat>
1288 %phi = phi <6 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1289 store <6 x bfloat> %phi, ptr addrspace(1) %out
1293 ; CHECK-LABEL: {{^}}v_bitcast_v6i16_to_v6bf16:
1294 define void @v_bitcast_v6i16_to_v6bf16(i32 %cond, ptr addrspace(1) %out, <6 x i16> %value) {
1296 %cmp0 = icmp eq i32 %cond, 0
1297 br i1 %cmp0, label %if, label %end
1300 %cast = bitcast <6 x i16> %value to <6 x bfloat>
1304 %phi = phi <6 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1305 store <6 x bfloat> %phi, ptr addrspace(1) %out
1309 ; CHECK-LABEL: {{^}}v_bitcast_v12i8_to_v6bf16:
1310 define void @v_bitcast_v12i8_to_v6bf16(i32 %cond, ptr addrspace(1) %out, <12 x i8> %value) {
1312 %cmp0 = icmp eq i32 %cond, 0
1313 br i1 %cmp0, label %if, label %end
1316 %cast = bitcast <12 x i8> %value to <6 x bfloat>
1320 %phi = phi <6 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1321 store <6 x bfloat> %phi, ptr addrspace(1) %out
1325 ; CHECK-LABEL: {{^}}v_bitcast_v8bf16_to_v2f64:
1326 define void @v_bitcast_v8bf16_to_v2f64(i32 %cond, ptr addrspace(1) %out, <8 x bfloat> %value) {
1328 %cmp0 = icmp eq i32 %cond, 0
1329 br i1 %cmp0, label %if, label %end
1332 %cast = bitcast <8 x bfloat> %value to <2 x double>
1336 %phi = phi <2 x double> [zeroinitializer, %entry], [%cast, %if]
1337 store <2 x double> %phi, ptr addrspace(1) %out
1341 ; CHECK-LABEL: {{^}}v_bitcast_v8bf16_to_v2i64:
1342 define void @v_bitcast_v8bf16_to_v2i64(i32 %cond, ptr addrspace(1) %out, <8 x bfloat> %value) {
1344 %cmp0 = icmp eq i32 %cond, 0
1345 br i1 %cmp0, label %if, label %end
1348 %cast = bitcast <8 x bfloat> %value to <2 x i64>
1352 %phi = phi <2 x i64> [zeroinitializer, %entry], [%cast, %if]
1353 store <2 x i64> %phi, ptr addrspace(1) %out
1357 ; CHECK-LABEL: {{^}}v_bitcast_v8bf16_to_v4f32:
1358 define void @v_bitcast_v8bf16_to_v4f32(i32 %cond, ptr addrspace(1) %out, <8 x bfloat> %value) {
1360 %cmp0 = icmp eq i32 %cond, 0
1361 br i1 %cmp0, label %if, label %end
1364 %cast = bitcast <8 x bfloat> %value to <4 x float>
1368 %phi = phi <4 x float> [zeroinitializer, %entry], [%cast, %if]
1369 store <4 x float> %phi, ptr addrspace(1) %out
1373 ; CHECK-LABEL: {{^}}v_bitcast_v8bf16_to_v4i32:
1374 define void @v_bitcast_v8bf16_to_v4i32(i32 %cond, ptr addrspace(1) %out, <8 x bfloat> %value) {
1376 %cmp0 = icmp eq i32 %cond, 0
1377 br i1 %cmp0, label %if, label %end
1380 %cast = bitcast <8 x bfloat> %value to <4 x i32>
1384 %phi = phi <4 x i32> [zeroinitializer, %entry], [%cast, %if]
1385 store <4 x i32> %phi, ptr addrspace(1) %out
1389 ; CHECK-LABEL: {{^}}v_bitcast_v8bf16_to_v8f16:
1390 define void @v_bitcast_v8bf16_to_v8f16(i32 %cond, ptr addrspace(1) %out, <8 x bfloat> %value) {
1392 %cmp0 = icmp eq i32 %cond, 0
1393 br i1 %cmp0, label %if, label %end
1396 %cast = bitcast <8 x bfloat> %value to <8 x half>
1400 %phi = phi <8 x half> [zeroinitializer, %entry], [%cast, %if]
1401 store <8 x half> %phi, ptr addrspace(1) %out
1405 ; CHECK-LABEL: {{^}}v_bitcast_v8bf16_to_v8i16:
1406 define void @v_bitcast_v8bf16_to_v8i16(i32 %cond, ptr addrspace(1) %out, <8 x bfloat> %value) {
1408 %cmp0 = icmp eq i32 %cond, 0
1409 br i1 %cmp0, label %if, label %end
1412 %cast = bitcast <8 x bfloat> %value to <8 x i16>
1416 %phi = phi <8 x i16> [zeroinitializer, %entry], [%cast, %if]
1417 store <8 x i16> %phi, ptr addrspace(1) %out
1421 ; CHECK-LABEL: {{^}}v_bitcast_v8f16_to_v8bf16:
1422 define void @v_bitcast_v8f16_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <8 x half> %value) {
1424 %cmp0 = icmp eq i32 %cond, 0
1425 br i1 %cmp0, label %if, label %end
1428 %cast = bitcast <8 x half> %value to <8 x bfloat>
1432 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1433 store <8 x bfloat> %phi, ptr addrspace(1) %out
1437 ; CHECK-LABEL: {{^}}v_bitcast_v8i16_to_v8bf16:
1438 define void @v_bitcast_v8i16_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <8 x i16> %value) {
1440 %cmp0 = icmp eq i32 %cond, 0
1441 br i1 %cmp0, label %if, label %end
1444 %cast = bitcast <8 x i16> %value to <8 x bfloat>
1448 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1449 store <8 x bfloat> %phi, ptr addrspace(1) %out
1453 ; CHECK-LABEL: {{^}}v_bitcast_v16i8_to_v8bf16:
1454 define void @v_bitcast_v16i8_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <16 x i8> %value) {
1456 %cmp0 = icmp eq i32 %cond, 0
1457 br i1 %cmp0, label %if, label %end
1460 %cast = bitcast <16 x i8> %value to <8 x bfloat>
1464 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1465 store <8 x bfloat> %phi, ptr addrspace(1) %out
1469 ; CHECK-LABEL: {{^}}v_bitcast_v2i64_to_v8bf16:
1470 define void @v_bitcast_v2i64_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <2 x i64> %value) {
1472 %cmp0 = icmp eq i32 %cond, 0
1473 br i1 %cmp0, label %if, label %end
1476 %cast = bitcast <2 x i64> %value to <8 x bfloat>
1480 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1481 store <8 x bfloat> %phi, ptr addrspace(1) %out
1485 ; CHECK-LABEL: {{^}}v_bitcast_v2f64_to_v8bf16:
1486 define void @v_bitcast_v2f64_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <2 x double> %value) {
1488 %cmp0 = icmp eq i32 %cond, 0
1489 br i1 %cmp0, label %if, label %end
1492 %cast = bitcast <2 x double> %value to <8 x bfloat>
1496 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1497 store <8 x bfloat> %phi, ptr addrspace(1) %out
1501 ; CHECK-LABEL: {{^}}v_bitcast_v4i32_to_v8bf16:
1502 define void @v_bitcast_v4i32_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <4 x i32> %value) {
1504 %cmp0 = icmp eq i32 %cond, 0
1505 br i1 %cmp0, label %if, label %end
1508 %cast = bitcast <4 x i32> %value to <8 x bfloat>
1512 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1513 store <8 x bfloat> %phi, ptr addrspace(1) %out
1517 ; CHECK-LABEL: {{^}}v_bitcast_v4f32_to_v8bf16:
1518 define void @v_bitcast_v4f32_to_v8bf16(i32 %cond, ptr addrspace(1) %out, <4 x float> %value) {
1520 %cmp0 = icmp eq i32 %cond, 0
1521 br i1 %cmp0, label %if, label %end
1524 %cast = bitcast <4 x float> %value to <8 x bfloat>
1528 %phi = phi <8 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1529 store <8 x bfloat> %phi, ptr addrspace(1) %out
1533 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v16i16:
1534 define void @v_bitcast_v16bf16_to_v16i16(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1536 %cmp0 = icmp eq i32 %cond, 0
1537 br i1 %cmp0, label %if, label %end
1540 %cast = bitcast <16 x bfloat> %value to <16 x i16>
1544 %phi = phi <16 x i16> [zeroinitializer, %entry], [%cast, %if]
1545 store <16 x i16> %phi, ptr addrspace(1) %out
1549 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v16f16:
1550 define void @v_bitcast_v16bf16_to_v16f16(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1552 %cmp0 = icmp eq i32 %cond, 0
1553 br i1 %cmp0, label %if, label %end
1556 %cast = bitcast <16 x bfloat> %value to <16 x half>
1560 %phi = phi <16 x half> [zeroinitializer, %entry], [%cast, %if]
1561 store <16 x half> %phi, ptr addrspace(1) %out
1565 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v8i32:
1566 define void @v_bitcast_v16bf16_to_v8i32(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1568 %cmp0 = icmp eq i32 %cond, 0
1569 br i1 %cmp0, label %if, label %end
1572 %cast = bitcast <16 x bfloat> %value to <8 x i32>
1576 %phi = phi <8 x i32> [zeroinitializer, %entry], [%cast, %if]
1577 store <8 x i32> %phi, ptr addrspace(1) %out
1581 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v8f32:
1582 define void @v_bitcast_v16bf16_to_v8f32(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1584 %cmp0 = icmp eq i32 %cond, 0
1585 br i1 %cmp0, label %if, label %end
1588 %cast = bitcast <16 x bfloat> %value to <8 x float>
1592 %phi = phi <8 x float> [zeroinitializer, %entry], [%cast, %if]
1593 store <8 x float> %phi, ptr addrspace(1) %out
1597 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v4f64:
1598 define void @v_bitcast_v16bf16_to_v4f64(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1600 %cmp0 = icmp eq i32 %cond, 0
1601 br i1 %cmp0, label %if, label %end
1604 %cast = bitcast <16 x bfloat> %value to <4 x double>
1608 %phi = phi <4 x double> [zeroinitializer, %entry], [%cast, %if]
1609 store <4 x double> %phi, ptr addrspace(1) %out
1613 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v4i64:
1614 define void @v_bitcast_v16bf16_to_v4i64(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1616 %cmp0 = icmp eq i32 %cond, 0
1617 br i1 %cmp0, label %if, label %end
1620 %cast = bitcast <16 x bfloat> %value to <4 x i64>
1624 %phi = phi <4 x i64> [zeroinitializer, %entry], [%cast, %if]
1625 store <4 x i64> %phi, ptr addrspace(1) %out
1629 ; CHECK-LABEL: {{^}}v_bitcast_v16bf16_to_v32i8:
1630 define void @v_bitcast_v16bf16_to_v32i8(i32 %cond, ptr addrspace(1) %out, <16 x bfloat> %value) {
1632 %cmp0 = icmp eq i32 %cond, 0
1633 br i1 %cmp0, label %if, label %end
1636 %cast = bitcast <16 x bfloat> %value to <32 x i8>
1640 %phi = phi <32 x i8> [zeroinitializer, %entry], [%cast, %if]
1641 store <32 x i8> %phi, ptr addrspace(1) %out
1645 ; CHECK-LABEL: {{^}}v_bitcast_v8f32_to_v16bf16:
1646 define void @v_bitcast_v8f32_to_v16bf16(i32 %cond, ptr addrspace(1) %out, <8 x float> %value) {
1648 %cmp0 = icmp eq i32 %cond, 0
1649 br i1 %cmp0, label %if, label %end
1652 %cast = bitcast <8 x float> %value to <16 x bfloat>
1656 %phi = phi <16 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1657 store <16 x bfloat> %phi, ptr addrspace(1) %out
1661 ; CHECK-LABEL: {{^}}v_bitcast_v8i32_to_v16bf16:
1662 define void @v_bitcast_v8i32_to_v16bf16(i32 %cond, ptr addrspace(1) %out, <8 x i32> %value) {
1664 %cmp0 = icmp eq i32 %cond, 0
1665 br i1 %cmp0, label %if, label %end
1668 %cast = bitcast <8 x i32> %value to <16 x bfloat>
1672 %phi = phi <16 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1673 store <16 x bfloat> %phi, ptr addrspace(1) %out
1677 ; CHECK-LABEL: {{^}}v_bitcast_v4i64_to_v16bf16:
1678 define void @v_bitcast_v4i64_to_v16bf16(i32 %cond, ptr addrspace(1) %out, <4 x i64> %value) {
1680 %cmp0 = icmp eq i32 %cond, 0
1681 br i1 %cmp0, label %if, label %end
1684 %cast = bitcast <4 x i64> %value to <16 x bfloat>
1688 %phi = phi <16 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1689 store <16 x bfloat> %phi, ptr addrspace(1) %out
1693 ; CHECK-LABEL: {{^}}v_bitcast_v4f64_to_v16bf16:
1694 define void @v_bitcast_v4f64_to_v16bf16(i32 %cond, ptr addrspace(1) %out, <4 x double> %value) {
1696 %cmp0 = icmp eq i32 %cond, 0
1697 br i1 %cmp0, label %if, label %end
1700 %cast = bitcast <4 x double> %value to <16 x bfloat>
1704 %phi = phi <16 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1705 store <16 x bfloat> %phi, ptr addrspace(1) %out
1709 ; CHECK-LABEL: {{^}}v_bitcast_v32i8_to_v16bf16:
1710 define void @v_bitcast_v32i8_to_v16bf16(i32 %cond, ptr addrspace(1) %out, <32 x i8> %value) {
1712 %cmp0 = icmp eq i32 %cond, 0
1713 br i1 %cmp0, label %if, label %end
1716 %cast = bitcast <32 x i8> %value to <16 x bfloat>
1720 %phi = phi <16 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1721 store <16 x bfloat> %phi, ptr addrspace(1) %out
1725 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v8i64:
1726 define void @v_bitcast_v32bf16_to_v8i64(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1728 %cmp0 = icmp eq i32 %cond, 0
1729 br i1 %cmp0, label %if, label %end
1732 %cast = bitcast <32 x bfloat> %value to <8 x i64>
1736 %phi = phi <8 x i64> [zeroinitializer, %entry], [%cast, %if]
1737 store <8 x i64> %phi, ptr addrspace(1) %out
1741 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v8f64:
1742 define void @v_bitcast_v32bf16_to_v8f64(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1744 %cmp0 = icmp eq i32 %cond, 0
1745 br i1 %cmp0, label %if, label %end
1748 %cast = bitcast <32 x bfloat> %value to <8 x double>
1752 %phi = phi <8 x double> [zeroinitializer, %entry], [%cast, %if]
1753 store <8 x double> %phi, ptr addrspace(1) %out
1757 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v16i32:
1758 define void @v_bitcast_v32bf16_to_v16i32(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1760 %cmp0 = icmp eq i32 %cond, 0
1761 br i1 %cmp0, label %if, label %end
1764 %cast = bitcast <32 x bfloat> %value to <16 x i32>
1768 %phi = phi <16 x i32> [zeroinitializer, %entry], [%cast, %if]
1769 store <16 x i32> %phi, ptr addrspace(1) %out
1773 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v16f32:
1774 define void @v_bitcast_v32bf16_to_v16f32(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1776 %cmp0 = icmp eq i32 %cond, 0
1777 br i1 %cmp0, label %if, label %end
1780 %cast = bitcast <32 x bfloat> %value to <16 x float>
1784 %phi = phi <16 x float> [zeroinitializer, %entry], [%cast, %if]
1785 store <16 x float> %phi, ptr addrspace(1) %out
1789 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v32f16:
1790 define void @v_bitcast_v32bf16_to_v32f16(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1792 %cmp0 = icmp eq i32 %cond, 0
1793 br i1 %cmp0, label %if, label %end
1796 %cast = bitcast <32 x bfloat> %value to <32 x half>
1800 %phi = phi <32 x half> [zeroinitializer, %entry], [%cast, %if]
1801 store <32 x half> %phi, ptr addrspace(1) %out
1805 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v32i16:
1806 define void @v_bitcast_v32bf16_to_v32i16(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1808 %cmp0 = icmp eq i32 %cond, 0
1809 br i1 %cmp0, label %if, label %end
1812 %cast = bitcast <32 x bfloat> %value to <32 x i16>
1816 %phi = phi <32 x i16> [zeroinitializer, %entry], [%cast, %if]
1817 store <32 x i16> %phi, ptr addrspace(1) %out
1821 ; CHECK-LABEL: {{^}}v_bitcast_v32bf16_to_v64i8:
1822 define void @v_bitcast_v32bf16_to_v64i8(i32 %cond, ptr addrspace(1) %out, <32 x bfloat> %value) {
1824 %cmp0 = icmp eq i32 %cond, 0
1825 br i1 %cmp0, label %if, label %end
1828 %cast = bitcast <32 x bfloat> %value to <64 x i8>
1832 %phi = phi <64 x i8> [zeroinitializer, %entry], [%cast, %if]
1833 store <64 x i8> %phi, ptr addrspace(1) %out
1837 ; CHECK-LABEL: {{^}}v_bitcast_v64i8_to_v32bf16:
1838 define void @v_bitcast_v64i8_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <64 x i8> %value) {
1840 %cmp0 = icmp eq i32 %cond, 0
1841 br i1 %cmp0, label %if, label %end
1844 %cast = bitcast <64 x i8> %value to <32 x bfloat>
1848 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1849 store <32 x bfloat> %phi, ptr addrspace(1) %out
1853 ; CHECK-LABEL: {{^}}v_bitcast_v32i16_to_v32bf16:
1854 define void @v_bitcast_v32i16_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <32 x i16> %value) {
1856 %cmp0 = icmp eq i32 %cond, 0
1857 br i1 %cmp0, label %if, label %end
1860 %cast = bitcast <32 x i16> %value to <32 x bfloat>
1864 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1865 store <32 x bfloat> %phi, ptr addrspace(1) %out
1869 ; CHECK-LABEL: {{^}}v_bitcast_v32f16_to_v32bf16:
1870 define void @v_bitcast_v32f16_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <32 x half> %value) {
1872 %cmp0 = icmp eq i32 %cond, 0
1873 br i1 %cmp0, label %if, label %end
1876 %cast = bitcast <32 x half> %value to <32 x bfloat>
1880 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1881 store <32 x bfloat> %phi, ptr addrspace(1) %out
1885 ; CHECK-LABEL: {{^}}v_bitcast_v16i32_to_v32bf16:
1886 define void @v_bitcast_v16i32_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <16 x i32> %value) {
1888 %cmp0 = icmp eq i32 %cond, 0
1889 br i1 %cmp0, label %if, label %end
1892 %cast = bitcast <16 x i32> %value to <32 x bfloat>
1896 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1897 store <32 x bfloat> %phi, ptr addrspace(1) %out
1901 ; CHECK-LABEL: {{^}}v_bitcast_v16f32_to_v32bf16:
1902 define void @v_bitcast_v16f32_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <16 x float> %value) {
1904 %cmp0 = icmp eq i32 %cond, 0
1905 br i1 %cmp0, label %if, label %end
1908 %cast = bitcast <16 x float> %value to <32 x bfloat>
1912 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1913 store <32 x bfloat> %phi, ptr addrspace(1) %out
1917 ; CHECK-LABEL: {{^}}v_bitcast_v8f64_to_v32bf16:
1918 define void @v_bitcast_v8f64_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <8 x double> %value) {
1920 %cmp0 = icmp eq i32 %cond, 0
1921 br i1 %cmp0, label %if, label %end
1924 %cast = bitcast <8 x double> %value to <32 x bfloat>
1928 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1929 store <32 x bfloat> %phi, ptr addrspace(1) %out
1933 ; CHECK-LABEL: {{^}}v_bitcast_v8i64_to_v32bf16:
1934 define void @v_bitcast_v8i64_to_v32bf16(i32 %cond, ptr addrspace(1) %out, <8 x i64> %value) {
1936 %cmp0 = icmp eq i32 %cond, 0
1937 br i1 %cmp0, label %if, label %end
1940 %cast = bitcast <8 x i64> %value to <32 x bfloat>
1944 %phi = phi <32 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1945 store <32 x bfloat> %phi, ptr addrspace(1) %out
1956 ; CHECK-LABEL: {{^}}v_bitcast_v32f32_to_v64bf16:
1957 define void @v_bitcast_v32f32_to_v64bf16(i32 %cond, ptr addrspace(1) %out, <32 x float> %value) {
1959 %cmp0 = icmp eq i32 %cond, 0
1960 br i1 %cmp0, label %if, label %end
1963 %cast = bitcast <32 x float> %value to <64 x bfloat>
1967 %phi = phi <64 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1968 store <64 x bfloat> %phi, ptr addrspace(1) %out
1972 ; CHECK-LABEL: {{^}}v_bitcast_v32i32_to_v64bf16:
1973 define void @v_bitcast_v32i32_to_v64bf16(i32 %cond, ptr addrspace(1) %out, <32 x i32> %value) {
1975 %cmp0 = icmp eq i32 %cond, 0
1976 br i1 %cmp0, label %if, label %end
1979 %cast = bitcast <32 x i32> %value to <64 x bfloat>
1983 %phi = phi <64 x bfloat> [zeroinitializer, %entry], [%cast, %if]
1984 store <64 x bfloat> %phi, ptr addrspace(1) %out
1988 ; CHECK-LABEL: {{^}}v_bitcast_v64i16_to_v64bf16:
1989 define void @v_bitcast_v64i16_to_v64bf16(i32 %cond, ptr addrspace(1) %out, <64 x i16> %value) {
1991 %cmp0 = icmp eq i32 %cond, 0
1992 br i1 %cmp0, label %if, label %end
1995 %cast = bitcast <64 x i16> %value to <64 x bfloat>
1999 %phi = phi <64 x bfloat> [zeroinitializer, %entry], [%cast, %if]
2000 store <64 x bfloat> %phi, ptr addrspace(1) %out
2004 ; CHECK-LABEL: {{^}}v_bitcast_v64f16_to_v64bf16:
2005 define void @v_bitcast_v64f16_to_v64bf16(i32 %cond, ptr addrspace(1) %out, <64 x half> %value) {
2007 %cmp0 = icmp eq i32 %cond, 0
2008 br i1 %cmp0, label %if, label %end
2011 %cast = bitcast <64 x half> %value to <64 x bfloat>
2015 %phi = phi <64 x bfloat> [zeroinitializer, %entry], [%cast, %if]
2016 store <64 x bfloat> %phi, ptr addrspace(1) %out
2020 ; CHECK-LABEL: {{^}}v_bitcast_v128i8_to_v64bf16:
2021 define void @v_bitcast_v128i8_to_v64bf16(i32 %cond, ptr addrspace(1) %out, <128 x i8> %value) {
2023 %cmp0 = icmp eq i32 %cond, 0
2024 br i1 %cmp0, label %if, label %end
2027 %cast = bitcast <128 x i8> %value to <64 x bfloat>
2031 %phi = phi <64 x bfloat> [zeroinitializer, %entry], [%cast, %if]
2032 store <64 x bfloat> %phi, ptr addrspace(1) %out
2036 ; CHECK-LABEL: {{^}}v_bitcast_v64bf16_to_v64i16:
2037 define void @v_bitcast_v64bf16_to_v64i16(i32 %cond, ptr addrspace(1) %out, <64 x bfloat> %value) {
2039 %cmp0 = icmp eq i32 %cond, 0
2040 br i1 %cmp0, label %if, label %end
2043 %cast = bitcast <64 x bfloat> %value to <64 x i16>
2047 %phi = phi <64 x i16> [zeroinitializer, %entry], [%cast, %if]
2048 store <64 x i16> %phi, ptr addrspace(1) %out
2052 ; CHECK-LABEL: {{^}}v_bitcast_v64bf16_to_v64f16:
2053 define void @v_bitcast_v64bf16_to_v64f16(i32 %cond, ptr addrspace(1) %out, <64 x bfloat> %value) {
2055 %cmp0 = icmp eq i32 %cond, 0
2056 br i1 %cmp0, label %if, label %end
2059 %cast = bitcast <64 x bfloat> %value to <64 x half>
2063 %phi = phi <64 x half> [zeroinitializer, %entry], [%cast, %if]
2064 store <64 x half> %phi, ptr addrspace(1) %out
2068 ; CHECK-LABEL: {{^}}v_bitcast_v64bf16_to_v128i8:
2069 define void @v_bitcast_v64bf16_to_v128i8(i32 %cond, ptr addrspace(1) %out, <64 x bfloat> %value) {
2071 %cmp0 = icmp eq i32 %cond, 0
2072 br i1 %cmp0, label %if, label %end
2075 %cast = bitcast <64 x bfloat> %value to <128 x i8>
2079 %phi = phi <128 x i8> [zeroinitializer, %entry], [%cast, %if]
2080 store <128 x i8> %phi, ptr addrspace(1) %out
2084 ; CHECK-LABEL: {{^}}v_bitcast_v64bf16_to_v16i64:
2085 define void @v_bitcast_v64bf16_to_v16i64(i32 %cond, ptr addrspace(1) %out, <64 x bfloat> %value) {
2087 %cmp0 = icmp eq i32 %cond, 0
2088 br i1 %cmp0, label %if, label %end
2091 %cast = bitcast <64 x bfloat> %value to <16 x i64>
2095 %phi = phi <16 x i64> [zeroinitializer, %entry], [%cast, %if]
2096 store <16 x i64> %phi, ptr addrspace(1) %out
2100 ; CHECK-LABEL: {{^}}v_bitcast_v64bf16_to_v16f64:
2101 define void @v_bitcast_v64bf16_to_v16f64(i32 %cond, ptr addrspace(1) %out, <64 x bfloat> %value) {
2103 %cmp0 = icmp eq i32 %cond, 0
2104 br i1 %cmp0, label %if, label %end
2107 %cast = bitcast <64 x bfloat> %value to <16 x double>
2111 %phi = phi <16 x double> [zeroinitializer, %entry], [%cast, %if]
2112 store <16 x double> %phi, ptr addrspace(1) %out