1 # RUN: llc --mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -run-pass si-fold-operands,si-shrink-instructions %s -o - | FileCheck %s
2 # RUN: llc --mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -passes si-fold-operands,si-shrink-instructions %s -o - | FileCheck %s
4 define amdgpu_kernel void @add_f32_1.0_one_f16_use() #0 {
5 %f16.val0 = load volatile half, ptr addrspace(1) undef
6 %f16.val1 = load volatile half, ptr addrspace(1) undef
7 %f32.val = load volatile float, ptr addrspace(1) undef
8 %f16.add0 = fadd half %f16.val0, 0xH3C00
9 %f32.add = fadd float %f32.val, 1.000000e+00
10 store volatile half %f16.add0, ptr addrspace(1) undef
11 store volatile float %f32.add, ptr addrspace(1) undef
15 define amdgpu_kernel void @add_f32_1.0_multi_f16_use() #0 {
16 %f16.val0 = load volatile half, ptr addrspace(1) undef
17 %f16.val1 = load volatile half, ptr addrspace(1) undef
18 %f32.val = load volatile float, ptr addrspace(1) undef
19 %f16.add0 = fadd half %f16.val0, 0xH3C00
20 %f32.add = fadd float %f32.val, 1.000000e+00
21 store volatile half %f16.add0, ptr addrspace(1) undef
22 store volatile float %f32.add, ptr addrspace(1) undef
26 define amdgpu_kernel void @add_f32_1.0_one_f32_use_one_f16_use () #0 {
27 %f16.val0 = load volatile half, ptr addrspace(1) undef
28 %f16.val1 = load volatile half, ptr addrspace(1) undef
29 %f32.val = load volatile float, ptr addrspace(1) undef
30 %f16.add0 = fadd half %f16.val0, 0xH3C00
31 %f32.add = fadd float %f32.val, 1.000000e+00
32 store volatile half %f16.add0, ptr addrspace(1) undef
33 store volatile float %f32.add, ptr addrspace(1) undef
37 define amdgpu_kernel void @add_f32_1.0_one_f32_use_multi_f16_use () #0 {
38 %f16.val0 = load volatile half, ptr addrspace(1) undef
39 %f16.val1 = load volatile half, ptr addrspace(1) undef
40 %f32.val = load volatile float, ptr addrspace(1) undef
41 %f16.add0 = fadd half %f16.val0, 0xH3C00
42 %f16.add1 = fadd half %f16.val1, 0xH3C00
43 %f32.add = fadd float %f32.val, 1.000000e+00
44 store volatile half %f16.add0, ptr addrspace(1) undef
45 store volatile half %f16.add1, ptr addrspace(1) undef
46 store volatile float %f32.add, ptr addrspace(1) undef
50 define amdgpu_kernel void @add_i32_1_multi_f16_use() #0 {
51 %f16.val0 = load volatile half, ptr addrspace(1) undef
52 %f16.val1 = load volatile half, ptr addrspace(1) undef
53 %f16.add0 = fadd half %f16.val0, 0xH0001
54 %f16.add1 = fadd half %f16.val1, 0xH0001
55 store volatile half %f16.add0, ptr addrspace(1) undef
56 store volatile half %f16.add1,ptr addrspace(1) undef
60 define amdgpu_kernel void @add_i32_m2_one_f32_use_multi_f16_use () #0 {
61 %f16.val0 = load volatile half, ptr addrspace(1) undef
62 %f16.val1 = load volatile half, ptr addrspace(1) undef
63 %f32.val = load volatile float, ptr addrspace(1) undef
64 %f16.add0 = fadd half %f16.val0, 0xHFFFE
65 %f16.add1 = fadd half %f16.val1, 0xHFFFE
66 %f32.add = fadd float %f32.val, 0xffffffffc0000000
67 store volatile half %f16.add0, ptr addrspace(1) undef
68 store volatile half %f16.add1, ptr addrspace(1) undef
69 store volatile float %f32.add, ptr addrspace(1) undef
73 define amdgpu_kernel void @add_f16_1.0_multi_f32_use() #0 {
74 %f32.val0 = load volatile float, ptr addrspace(1) undef
75 %f32.val1 = load volatile float, ptr addrspace(1) undef
76 %f32.val = load volatile float, ptr addrspace(1) undef
77 %f32.add0 = fadd float %f32.val0, 1.0
78 %f32.add1 = fadd float %f32.val1, 1.0
79 store volatile float %f32.add0, ptr addrspace(1) undef
80 store volatile float %f32.add1, ptr addrspace(1) undef
84 define amdgpu_kernel void @add_f16_1.0_other_high_bits_multi_f16_use() #0 {
85 %f16.val0 = load volatile half, ptr addrspace(1) undef
86 %f16.val1 = load volatile half, ptr addrspace(1) undef
87 %f32.val = load volatile half, ptr addrspace(1) undef
88 %f16.add0 = fadd half %f16.val0, 0xH3C00
89 %f32.add = fadd half %f32.val, 1.000000e+00
90 store volatile half %f16.add0, ptr addrspace(1) undef
91 store volatile half %f32.add, ptr addrspace(1) undef
95 define amdgpu_kernel void @add_f16_1.0_other_high_bits_use_f16_f32() #0 {
96 %f16.val0 = load volatile half, ptr addrspace(1) undef
97 %f16.val1 = load volatile half, ptr addrspace(1) undef
98 %f32.val = load volatile half, ptr addrspace(1) undef
99 %f16.add0 = fadd half %f16.val0, 0xH3C00
100 %f32.add = fadd half %f32.val, 1.000000e+00
101 store volatile half %f16.add0, ptr addrspace(1) undef
102 store volatile half %f32.add, ptr addrspace(1) undef
106 attributes #0 = { nounwind }
111 # f32 1.0 with a single use should be folded as the low 32-bits of a
114 # CHECK-LABEL: name: add_f32_1.0_one_f16_use
115 # CHECK: %13:vgpr_32 = V_ADD_F16_e32 1065353216, killed %11, implicit $mode, implicit $exec
117 name: add_f32_1.0_one_f16_use
119 exposesReturnsTwice: false
121 regBankSelected: false
123 tracksRegLiveness: true
125 - { id: 0, class: sreg_64 }
126 - { id: 1, class: sreg_32 }
127 - { id: 2, class: sgpr_32 }
128 - { id: 3, class: vgpr_32 }
129 - { id: 4, class: sreg_64 }
130 - { id: 5, class: sreg_32 }
131 - { id: 6, class: sreg_64 }
132 - { id: 7, class: sreg_32 }
133 - { id: 8, class: sreg_32 }
134 - { id: 9, class: sreg_32 }
135 - { id: 10, class: sgpr_128 }
136 - { id: 11, class: vgpr_32 }
137 - { id: 12, class: vgpr_32 }
138 - { id: 13, class: vgpr_32 }
140 isFrameAddressTaken: false
141 isReturnAddressTaken: false
150 hasOpaqueSPAdjustment: false
152 hasMustTailInVarArgFunc: false
161 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
162 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
163 %12 = V_MOV_B32_e32 1065353216, implicit $exec
164 %13 = V_ADD_F16_e64 0, killed %11, 0, %12, 0, 0, implicit $mode, implicit $exec
165 BUFFER_STORE_SHORT_OFFSET killed %13, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
170 # Materialized f32 inline immediate should not be folded into the f16
173 # CHECK-LABEL: name: add_f32_1.0_multi_f16_use
174 # CHECK: %14:vgpr_32 = V_ADD_F16_e32 1065353216, killed %11, implicit $mode, implicit $exec
175 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 1065353216, killed %12, implicit $mode, implicit $exec
178 name: add_f32_1.0_multi_f16_use
180 exposesReturnsTwice: false
182 regBankSelected: false
184 tracksRegLiveness: true
186 - { id: 0, class: sreg_64 }
187 - { id: 1, class: sreg_32 }
188 - { id: 2, class: sgpr_32 }
189 - { id: 3, class: vgpr_32 }
190 - { id: 4, class: sreg_64 }
191 - { id: 5, class: sreg_32 }
192 - { id: 6, class: sreg_64 }
193 - { id: 7, class: sreg_32 }
194 - { id: 8, class: sreg_32 }
195 - { id: 9, class: sreg_32 }
196 - { id: 10, class: sgpr_128 }
197 - { id: 11, class: vgpr_32 }
198 - { id: 12, class: vgpr_32 }
199 - { id: 13, class: vgpr_32 }
200 - { id: 14, class: vgpr_32 }
201 - { id: 15, class: vgpr_32 }
203 isFrameAddressTaken: false
204 isReturnAddressTaken: false
213 hasOpaqueSPAdjustment: false
215 hasMustTailInVarArgFunc: false
224 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
225 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
226 %12 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
227 %13 = V_MOV_B32_e32 1065353216, implicit $exec
228 %14 = V_ADD_F16_e64 0, killed %11, 0, %13, 0, 0, implicit $mode, implicit $exec
229 %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $mode, implicit $exec
230 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
231 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
237 # f32 1.0 should be folded into the single f32 use as an inline
238 # immediate, and folded into the single f16 use as a literal constant
240 # CHECK-LABEL: name: add_f32_1.0_one_f32_use_one_f16_use
241 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 1065353216, %11, implicit $mode, implicit $exec
242 # CHECK: %16:vgpr_32 = V_ADD_F32_e32 1065353216, killed %13, implicit $mode, implicit $exec
244 name: add_f32_1.0_one_f32_use_one_f16_use
246 exposesReturnsTwice: false
248 regBankSelected: false
250 tracksRegLiveness: true
252 - { id: 0, class: sreg_64 }
253 - { id: 1, class: sreg_32 }
254 - { id: 2, class: sgpr_32 }
255 - { id: 3, class: vgpr_32 }
256 - { id: 4, class: sreg_64 }
257 - { id: 5, class: sreg_32 }
258 - { id: 6, class: sreg_64 }
259 - { id: 7, class: sreg_32 }
260 - { id: 8, class: sreg_32 }
261 - { id: 9, class: sreg_32 }
262 - { id: 10, class: sgpr_128 }
263 - { id: 11, class: vgpr_32 }
264 - { id: 12, class: vgpr_32 }
265 - { id: 13, class: vgpr_32 }
266 - { id: 14, class: vgpr_32 }
267 - { id: 15, class: vgpr_32 }
268 - { id: 16, class: vgpr_32 }
270 isFrameAddressTaken: false
271 isReturnAddressTaken: false
280 hasOpaqueSPAdjustment: false
282 hasMustTailInVarArgFunc: false
291 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
292 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
293 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
294 %13 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
295 %14 = V_MOV_B32_e32 1065353216, implicit $exec
296 %15 = V_ADD_F16_e64 0, %11, 0, %14, 0, 0, implicit $mode, implicit $exec
297 %16 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $mode, implicit $exec
298 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
299 BUFFER_STORE_DWORD_OFFSET killed %16, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s32) into `ptr addrspace(1) undef`)
305 # f32 1.0 should be folded for the single f32 use as an inline
306 # constant, and not folded as a multi-use literal for the f16 cases
308 # CHECK-LABEL: name: add_f32_1.0_one_f32_use_multi_f16_use
309 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 1065353216, %11, implicit $mode, implicit $exec
310 # CHECK: %16:vgpr_32 = V_ADD_F16_e32 1065353216, %12, implicit $mode, implicit $exec
311 # CHECK: %17:vgpr_32 = V_ADD_F32_e32 1065353216, killed %13, implicit $mode, implicit $exec
313 name: add_f32_1.0_one_f32_use_multi_f16_use
315 exposesReturnsTwice: false
317 regBankSelected: false
319 tracksRegLiveness: true
321 - { id: 0, class: sreg_64 }
322 - { id: 1, class: sreg_32 }
323 - { id: 2, class: sgpr_32 }
324 - { id: 3, class: vgpr_32 }
325 - { id: 4, class: sreg_64 }
326 - { id: 5, class: sreg_32 }
327 - { id: 6, class: sreg_64 }
328 - { id: 7, class: sreg_32 }
329 - { id: 8, class: sreg_32 }
330 - { id: 9, class: sreg_32 }
331 - { id: 10, class: sgpr_128 }
332 - { id: 11, class: vgpr_32 }
333 - { id: 12, class: vgpr_32 }
334 - { id: 13, class: vgpr_32 }
335 - { id: 14, class: vgpr_32 }
336 - { id: 15, class: vgpr_32 }
337 - { id: 16, class: vgpr_32 }
338 - { id: 17, class: vgpr_32 }
340 isFrameAddressTaken: false
341 isReturnAddressTaken: false
350 hasOpaqueSPAdjustment: false
352 hasMustTailInVarArgFunc: false
361 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
362 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
363 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
364 %13 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
365 %14 = V_MOV_B32_e32 1065353216, implicit $exec
366 %15 = V_ADD_F16_e64 0, %11, 0, %14, 0, 0, implicit $mode, implicit $exec
367 %16 = V_ADD_F16_e64 0, %12, 0, %14, 0, 0, implicit $mode, implicit $exec
368 %17 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $mode, implicit $exec
369 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
370 BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
371 BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s32) into `ptr addrspace(1) undef`)
376 # CHECK-LABEL: name: add_i32_1_multi_f16_use
377 # CHECK: %14:vgpr_32 = V_ADD_F16_e32 1, killed %11, implicit $mode, implicit $exec
378 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 1, killed %12, implicit $mode, implicit $exec
381 name: add_i32_1_multi_f16_use
383 exposesReturnsTwice: false
385 regBankSelected: false
387 tracksRegLiveness: true
389 - { id: 0, class: sreg_64 }
390 - { id: 1, class: sreg_32 }
391 - { id: 2, class: sgpr_32 }
392 - { id: 3, class: vgpr_32 }
393 - { id: 4, class: sreg_64 }
394 - { id: 5, class: sreg_32 }
395 - { id: 6, class: sreg_64 }
396 - { id: 7, class: sreg_32 }
397 - { id: 8, class: sreg_32 }
398 - { id: 9, class: sreg_32 }
399 - { id: 10, class: sgpr_128 }
400 - { id: 11, class: vgpr_32 }
401 - { id: 12, class: vgpr_32 }
402 - { id: 13, class: vgpr_32 }
403 - { id: 14, class: vgpr_32 }
404 - { id: 15, class: vgpr_32 }
406 isFrameAddressTaken: false
407 isReturnAddressTaken: false
416 hasOpaqueSPAdjustment: false
418 hasMustTailInVarArgFunc: false
427 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
428 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
429 %12 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
430 %13 = V_MOV_B32_e32 1, implicit $exec
431 %14 = V_ADD_F16_e64 0, killed %11, 0, %13, 0, 0, implicit $mode, implicit $exec
432 %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $mode, implicit $exec
433 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
434 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
440 # CHECK-LABEL: name: add_i32_m2_one_f32_use_multi_f16_use
441 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 -2, %11, implicit $mode, implicit $exec
442 # CHECK: %16:vgpr_32 = V_ADD_F16_e32 -2, %12, implicit $mode, implicit $exec
443 # CHECK: %17:vgpr_32 = V_ADD_F32_e32 -2, killed %13, implicit $mode, implicit $exec
445 name: add_i32_m2_one_f32_use_multi_f16_use
447 exposesReturnsTwice: false
449 regBankSelected: false
451 tracksRegLiveness: true
453 - { id: 0, class: sreg_64 }
454 - { id: 1, class: sreg_32 }
455 - { id: 2, class: sgpr_32 }
456 - { id: 3, class: vgpr_32 }
457 - { id: 4, class: sreg_64 }
458 - { id: 5, class: sreg_32 }
459 - { id: 6, class: sreg_64 }
460 - { id: 7, class: sreg_32 }
461 - { id: 8, class: sreg_32 }
462 - { id: 9, class: sreg_32 }
463 - { id: 10, class: sgpr_128 }
464 - { id: 11, class: vgpr_32 }
465 - { id: 12, class: vgpr_32 }
466 - { id: 13, class: vgpr_32 }
467 - { id: 14, class: vgpr_32 }
468 - { id: 15, class: vgpr_32 }
469 - { id: 16, class: vgpr_32 }
470 - { id: 17, class: vgpr_32 }
472 isFrameAddressTaken: false
473 isReturnAddressTaken: false
482 hasOpaqueSPAdjustment: false
484 hasMustTailInVarArgFunc: false
493 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
494 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
495 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
496 %13 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
497 %14 = V_MOV_B32_e32 -2, implicit $exec
498 %15 = V_ADD_F16_e64 0, %11, 0, %14, 0, 0, implicit $mode, implicit $exec
499 %16 = V_ADD_F16_e64 0, %12, 0, %14, 0, 0, implicit $mode, implicit $exec
500 %17 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $mode, implicit $exec
501 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
502 BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
503 BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s32) into `ptr addrspace(1) undef`)
509 # f32 1.0 should be folded for the single f32 use as an inline
510 # constant, and not folded as a multi-use literal for the f16 cases
512 # CHECK-LABEL: name: add_f16_1.0_multi_f32_use
513 # CHECK: %14:vgpr_32 = V_ADD_F32_e32 15360, %11, implicit $mode, implicit $exec
514 # CHECK: %15:vgpr_32 = V_ADD_F32_e32 15360, %12, implicit $mode, implicit $exec
516 name: add_f16_1.0_multi_f32_use
518 exposesReturnsTwice: false
520 regBankSelected: false
522 tracksRegLiveness: true
524 - { id: 0, class: sreg_64 }
525 - { id: 1, class: sreg_32 }
526 - { id: 2, class: sgpr_32 }
527 - { id: 3, class: vgpr_32 }
528 - { id: 4, class: sreg_64 }
529 - { id: 5, class: sreg_32 }
530 - { id: 6, class: sreg_64 }
531 - { id: 7, class: sreg_32 }
532 - { id: 8, class: sreg_32 }
533 - { id: 9, class: sreg_32 }
534 - { id: 10, class: sgpr_128 }
535 - { id: 11, class: vgpr_32 }
536 - { id: 12, class: vgpr_32 }
537 - { id: 13, class: vgpr_32 }
538 - { id: 14, class: vgpr_32 }
539 - { id: 15, class: vgpr_32 }
541 isFrameAddressTaken: false
542 isReturnAddressTaken: false
551 hasOpaqueSPAdjustment: false
553 hasMustTailInVarArgFunc: false
562 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
563 %11 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
564 %12 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
565 %13 = V_MOV_B32_e32 15360, implicit $exec
566 %14 = V_ADD_F32_e64 0, %11, 0, %13, 0, 0, implicit $mode, implicit $exec
567 %15 = V_ADD_F32_e64 0, %12, 0, %13, 0, 0, implicit $mode, implicit $exec
568 BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s32) into `ptr addrspace(1) undef`)
569 BUFFER_STORE_DWORD_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s32) into `ptr addrspace(1) undef`)
575 # The low 16-bits are an inline immediate, but the high bits are junk
577 # CHECK-LABEL: name: add_f16_1.0_other_high_bits_multi_f16_use
578 # CHECK: %14:vgpr_32 = V_ADD_F16_e32 80886784, %11, implicit $mode, implicit $exec
579 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 80886784, %12, implicit $mode, implicit $exec
581 name: add_f16_1.0_other_high_bits_multi_f16_use
583 exposesReturnsTwice: false
585 regBankSelected: false
587 tracksRegLiveness: true
589 - { id: 0, class: sreg_64 }
590 - { id: 1, class: sreg_32 }
591 - { id: 2, class: sgpr_32 }
592 - { id: 3, class: vgpr_32 }
593 - { id: 4, class: sreg_64 }
594 - { id: 5, class: sreg_32 }
595 - { id: 6, class: sreg_64 }
596 - { id: 7, class: sreg_32 }
597 - { id: 8, class: sreg_32 }
598 - { id: 9, class: sreg_32 }
599 - { id: 10, class: sgpr_128 }
600 - { id: 11, class: vgpr_32 }
601 - { id: 12, class: vgpr_32 }
602 - { id: 13, class: vgpr_32 }
603 - { id: 14, class: vgpr_32 }
604 - { id: 15, class: vgpr_32 }
606 isFrameAddressTaken: false
607 isReturnAddressTaken: false
616 hasOpaqueSPAdjustment: false
618 hasMustTailInVarArgFunc: false
627 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
628 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
629 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
630 %13 = V_MOV_B32_e32 80886784, implicit $exec
631 %14 = V_ADD_F16_e64 0, %11, 0, %13, 0, 0, implicit $mode, implicit $exec
632 %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $mode, implicit $exec
633 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
634 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)
640 # CHECK-LABEL: name: add_f16_1.0_other_high_bits_use_f16_f32
641 # CHECK: %14:vgpr_32 = V_ADD_F32_e32 305413120, %11, implicit $mode, implicit $exec
642 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 305413120, %12, implicit $mode, implicit $exec
643 name: add_f16_1.0_other_high_bits_use_f16_f32
645 exposesReturnsTwice: false
647 regBankSelected: false
649 tracksRegLiveness: true
651 - { id: 0, class: sreg_64 }
652 - { id: 1, class: sreg_32 }
653 - { id: 2, class: sgpr_32 }
654 - { id: 3, class: vgpr_32 }
655 - { id: 4, class: sreg_64 }
656 - { id: 5, class: sreg_32 }
657 - { id: 6, class: sreg_64 }
658 - { id: 7, class: sreg_32 }
659 - { id: 8, class: sreg_32 }
660 - { id: 9, class: sreg_32 }
661 - { id: 10, class: sgpr_128 }
662 - { id: 11, class: vgpr_32 }
663 - { id: 12, class: vgpr_32 }
664 - { id: 13, class: vgpr_32 }
665 - { id: 14, class: vgpr_32 }
666 - { id: 15, class: vgpr_32 }
668 isFrameAddressTaken: false
669 isReturnAddressTaken: false
678 hasOpaqueSPAdjustment: false
680 hasMustTailInVarArgFunc: false
689 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
690 %11 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s32) from `ptr addrspace(1) undef`)
691 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, implicit $exec :: (volatile load (s16) from `ptr addrspace(1) undef`)
692 %13 = V_MOV_B32_e32 305413120, implicit $exec
693 %14 = V_ADD_F32_e64 0, %11, 0, %13, 0, 0, implicit $mode, implicit $exec
694 %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $mode, implicit $exec
695 BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s32) into `ptr addrspace(1) undef`)
696 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, implicit $exec :: (volatile store (s16) into `ptr addrspace(1) undef`)