1 # RUN: llc --mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -run-pass si-fold-operands,si-shrink-instructions %s -o - | FileCheck %s
3 define amdgpu_kernel void @add_f32_1.0_one_f16_use() #0 {
4 %f16.val0 = load volatile half, half addrspace(1)* undef
5 %f16.val1 = load volatile half, half addrspace(1)* undef
6 %f32.val = load volatile float, float addrspace(1)* undef
7 %f16.add0 = fadd half %f16.val0, 0xH3C00
8 %f32.add = fadd float %f32.val, 1.000000e+00
9 store volatile half %f16.add0, half addrspace(1)* undef
10 store volatile float %f32.add, float addrspace(1)* undef
14 define amdgpu_kernel void @add_f32_1.0_multi_f16_use() #0 {
15 %f16.val0 = load volatile half, half addrspace(1)* undef
16 %f16.val1 = load volatile half, half addrspace(1)* undef
17 %f32.val = load volatile float, float addrspace(1)* undef
18 %f16.add0 = fadd half %f16.val0, 0xH3C00
19 %f32.add = fadd float %f32.val, 1.000000e+00
20 store volatile half %f16.add0, half addrspace(1)* undef
21 store volatile float %f32.add, float addrspace(1)* undef
25 define amdgpu_kernel void @add_f32_1.0_one_f32_use_one_f16_use () #0 {
26 %f16.val0 = load volatile half, half addrspace(1)* undef
27 %f16.val1 = load volatile half, half addrspace(1)* undef
28 %f32.val = load volatile float, float addrspace(1)* undef
29 %f16.add0 = fadd half %f16.val0, 0xH3C00
30 %f32.add = fadd float %f32.val, 1.000000e+00
31 store volatile half %f16.add0, half addrspace(1)* undef
32 store volatile float %f32.add, float addrspace(1)* undef
36 define amdgpu_kernel void @add_f32_1.0_one_f32_use_multi_f16_use () #0 {
37 %f16.val0 = load volatile half, half addrspace(1)* undef
38 %f16.val1 = load volatile half, half addrspace(1)* undef
39 %f32.val = load volatile float, float addrspace(1)* undef
40 %f16.add0 = fadd half %f16.val0, 0xH3C00
41 %f16.add1 = fadd half %f16.val1, 0xH3C00
42 %f32.add = fadd float %f32.val, 1.000000e+00
43 store volatile half %f16.add0, half addrspace(1)* undef
44 store volatile half %f16.add1, half addrspace(1)* undef
45 store volatile float %f32.add, float addrspace(1)* undef
49 define amdgpu_kernel void @add_i32_1_multi_f16_use() #0 {
50 %f16.val0 = load volatile half, half addrspace(1)* undef
51 %f16.val1 = load volatile half, half addrspace(1)* undef
52 %f16.add0 = fadd half %f16.val0, 0xH0001
53 %f16.add1 = fadd half %f16.val1, 0xH0001
54 store volatile half %f16.add0, half addrspace(1)* undef
55 store volatile half %f16.add1,half addrspace(1)* undef
59 define amdgpu_kernel void @add_i32_m2_one_f32_use_multi_f16_use () #0 {
60 %f16.val0 = load volatile half, half addrspace(1)* undef
61 %f16.val1 = load volatile half, half addrspace(1)* undef
62 %f32.val = load volatile float, float addrspace(1)* undef
63 %f16.add0 = fadd half %f16.val0, 0xHFFFE
64 %f16.add1 = fadd half %f16.val1, 0xHFFFE
65 %f32.add = fadd float %f32.val, 0xffffffffc0000000
66 store volatile half %f16.add0, half addrspace(1)* undef
67 store volatile half %f16.add1, half addrspace(1)* undef
68 store volatile float %f32.add, float addrspace(1)* undef
72 define amdgpu_kernel void @add_f16_1.0_multi_f32_use() #0 {
73 %f32.val0 = load volatile float, float addrspace(1)* undef
74 %f32.val1 = load volatile float, float addrspace(1)* undef
75 %f32.val = load volatile float, float addrspace(1)* undef
76 %f32.add0 = fadd float %f32.val0, 1.0
77 %f32.add1 = fadd float %f32.val1, 1.0
78 store volatile float %f32.add0, float addrspace(1)* undef
79 store volatile float %f32.add1, float addrspace(1)* undef
83 define amdgpu_kernel void @add_f16_1.0_other_high_bits_multi_f16_use() #0 {
84 %f16.val0 = load volatile half, half addrspace(1)* undef
85 %f16.val1 = load volatile half, half addrspace(1)* undef
86 %f32.val = load volatile half, half addrspace(1)* undef
87 %f16.add0 = fadd half %f16.val0, 0xH3C00
88 %f32.add = fadd half %f32.val, 1.000000e+00
89 store volatile half %f16.add0, half addrspace(1)* undef
90 store volatile half %f32.add, half addrspace(1)* undef
94 define amdgpu_kernel void @add_f16_1.0_other_high_bits_use_f16_f32() #0 {
95 %f16.val0 = load volatile half, half addrspace(1)* undef
96 %f16.val1 = load volatile half, half addrspace(1)* undef
97 %f32.val = load volatile half, half addrspace(1)* undef
98 %f16.add0 = fadd half %f16.val0, 0xH3C00
99 %f32.add = fadd half %f32.val, 1.000000e+00
100 store volatile half %f16.add0, half addrspace(1)* undef
101 store volatile half %f32.add, half addrspace(1)* undef
105 attributes #0 = { nounwind }
110 # f32 1.0 with a single use should be folded as the low 32-bits of a
113 # CHECK-LABEL: name: add_f32_1.0_one_f16_use
114 # CHECK: %13:vgpr_32 = V_ADD_F16_e32 1065353216, killed %11, implicit $exec
116 name: add_f32_1.0_one_f16_use
118 exposesReturnsTwice: false
120 regBankSelected: false
122 tracksRegLiveness: true
124 - { id: 0, class: sreg_64 }
125 - { id: 1, class: sreg_32 }
126 - { id: 2, class: sgpr_32 }
127 - { id: 3, class: vgpr_32 }
128 - { id: 4, class: sreg_64 }
129 - { id: 5, class: sreg_32 }
130 - { id: 6, class: sreg_64 }
131 - { id: 7, class: sreg_32 }
132 - { id: 8, class: sreg_32 }
133 - { id: 9, class: sreg_32 }
134 - { id: 10, class: sreg_128 }
135 - { id: 11, class: vgpr_32 }
136 - { id: 12, class: vgpr_32 }
137 - { id: 13, class: vgpr_32 }
139 isFrameAddressTaken: false
140 isReturnAddressTaken: false
149 hasOpaqueSPAdjustment: false
151 hasMustTailInVarArgFunc: false
160 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
161 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
162 %12 = V_MOV_B32_e32 1065353216, implicit $exec
163 %13 = V_ADD_F16_e64 0, killed %11, 0, %12, 0, 0, implicit $exec
164 BUFFER_STORE_SHORT_OFFSET killed %13, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
169 # Materialized f32 inline immediate should not be folded into the f16
172 # CHECK-LABEL: name: add_f32_1.0_multi_f16_use
173 # CHECK: %13:vgpr_32 = V_MOV_B32_e32 1065353216, implicit $exec
174 # CHECK: %14:vgpr_32 = V_ADD_F16_e32 killed %11, %13, implicit $exec
175 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 killed %12, killed %13, 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: sreg_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, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
226 %12 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float 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 $exec
229 %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $exec
230 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
231 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half 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 $exec
242 # CHECK: %16:vgpr_32 = V_ADD_F32_e32 1065353216, killed %13, 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: sreg_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, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
293 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
294 %13 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float 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 $exec
297 %16 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $exec
298 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
299 BUFFER_STORE_DWORD_OFFSET killed %16, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float 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: %14:vgpr_32 = V_MOV_B32_e32 1065353216, implicit $exec
310 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 %11, %14, implicit $exec
311 # CHECK: %16:vgpr_32 = V_ADD_F16_e32 %12, %14, implicit $exec
312 # CHECK: %17:vgpr_32 = V_ADD_F32_e32 1065353216, killed %13, implicit $exec
314 name: add_f32_1.0_one_f32_use_multi_f16_use
316 exposesReturnsTwice: false
318 regBankSelected: false
320 tracksRegLiveness: true
322 - { id: 0, class: sreg_64 }
323 - { id: 1, class: sreg_32 }
324 - { id: 2, class: sgpr_32 }
325 - { id: 3, class: vgpr_32 }
326 - { id: 4, class: sreg_64 }
327 - { id: 5, class: sreg_32 }
328 - { id: 6, class: sreg_64 }
329 - { id: 7, class: sreg_32 }
330 - { id: 8, class: sreg_32 }
331 - { id: 9, class: sreg_32 }
332 - { id: 10, class: sreg_128 }
333 - { id: 11, class: vgpr_32 }
334 - { id: 12, class: vgpr_32 }
335 - { id: 13, class: vgpr_32 }
336 - { id: 14, class: vgpr_32 }
337 - { id: 15, class: vgpr_32 }
338 - { id: 16, class: vgpr_32 }
339 - { id: 17, class: vgpr_32 }
341 isFrameAddressTaken: false
342 isReturnAddressTaken: false
351 hasOpaqueSPAdjustment: false
353 hasMustTailInVarArgFunc: false
362 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
363 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
364 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
365 %13 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
366 %14 = V_MOV_B32_e32 1065353216, implicit $exec
367 %15 = V_ADD_F16_e64 0, %11, 0, %14, 0, 0, implicit $exec
368 %16 = V_ADD_F16_e64 0, %12, 0, %14, 0, 0, implicit $exec
369 %17 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $exec
370 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
371 BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
372 BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
377 # CHECK-LABEL: name: add_i32_1_multi_f16_use
378 # CHECK: %13:vgpr_32 = V_MOV_B32_e32 1, implicit $exec
379 # CHECK: %14:vgpr_32 = V_ADD_F16_e32 1, killed %11, implicit $exec
380 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 1, killed %12, implicit $exec
383 name: add_i32_1_multi_f16_use
385 exposesReturnsTwice: false
387 regBankSelected: false
389 tracksRegLiveness: true
391 - { id: 0, class: sreg_64 }
392 - { id: 1, class: sreg_32 }
393 - { id: 2, class: sgpr_32 }
394 - { id: 3, class: vgpr_32 }
395 - { id: 4, class: sreg_64 }
396 - { id: 5, class: sreg_32 }
397 - { id: 6, class: sreg_64 }
398 - { id: 7, class: sreg_32 }
399 - { id: 8, class: sreg_32 }
400 - { id: 9, class: sreg_32 }
401 - { id: 10, class: sreg_128 }
402 - { id: 11, class: vgpr_32 }
403 - { id: 12, class: vgpr_32 }
404 - { id: 13, class: vgpr_32 }
405 - { id: 14, class: vgpr_32 }
406 - { id: 15, class: vgpr_32 }
408 isFrameAddressTaken: false
409 isReturnAddressTaken: false
418 hasOpaqueSPAdjustment: false
420 hasMustTailInVarArgFunc: false
429 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
430 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
431 %12 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
432 %13 = V_MOV_B32_e32 1, implicit $exec
433 %14 = V_ADD_F16_e64 0, killed %11, 0, %13, 0, 0, implicit $exec
434 %15 = V_ADD_F16_e64 0, killed %12, 0, killed %13, 0, 0, implicit $exec
435 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
436 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
442 # CHECK-LABEL: name: add_i32_m2_one_f32_use_multi_f16_use
443 # CHECK: %14:vgpr_32 = V_MOV_B32_e32 -2, implicit $exec
444 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 -2, %11, implicit $exec
445 # CHECK: %16:vgpr_32 = V_ADD_F16_e32 -2, %12, implicit $exec
446 # CHECK: %17:vgpr_32 = V_ADD_F32_e32 -2, killed %13, implicit $exec
448 name: add_i32_m2_one_f32_use_multi_f16_use
450 exposesReturnsTwice: false
452 regBankSelected: false
454 tracksRegLiveness: true
456 - { id: 0, class: sreg_64 }
457 - { id: 1, class: sreg_32 }
458 - { id: 2, class: sgpr_32 }
459 - { id: 3, class: vgpr_32 }
460 - { id: 4, class: sreg_64 }
461 - { id: 5, class: sreg_32 }
462 - { id: 6, class: sreg_64 }
463 - { id: 7, class: sreg_32 }
464 - { id: 8, class: sreg_32 }
465 - { id: 9, class: sreg_32 }
466 - { id: 10, class: sreg_128 }
467 - { id: 11, class: vgpr_32 }
468 - { id: 12, class: vgpr_32 }
469 - { id: 13, class: vgpr_32 }
470 - { id: 14, class: vgpr_32 }
471 - { id: 15, class: vgpr_32 }
472 - { id: 16, class: vgpr_32 }
473 - { id: 17, class: vgpr_32 }
475 isFrameAddressTaken: false
476 isReturnAddressTaken: false
485 hasOpaqueSPAdjustment: false
487 hasMustTailInVarArgFunc: false
496 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
497 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
498 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
499 %13 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
500 %14 = V_MOV_B32_e32 -2, implicit $exec
501 %15 = V_ADD_F16_e64 0, %11, 0, %14, 0, 0, implicit $exec
502 %16 = V_ADD_F16_e64 0, %12, 0, %14, 0, 0, implicit $exec
503 %17 = V_ADD_F32_e64 0, killed %13, 0, killed %14, 0, 0, implicit $exec
504 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
505 BUFFER_STORE_SHORT_OFFSET killed %16, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
506 BUFFER_STORE_DWORD_OFFSET killed %17, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
512 # f32 1.0 should be folded for the single f32 use as an inline
513 # constant, and not folded as a multi-use literal for the f16 cases
515 # CHECK-LABEL: name: add_f16_1.0_multi_f32_use
516 # CHECK: %13:vgpr_32 = V_MOV_B32_e32 15360, implicit $exec
517 # CHECK: %14:vgpr_32 = V_ADD_F32_e32 %11, %13, implicit $exec
518 # CHECK: %15:vgpr_32 = V_ADD_F32_e32 %12, %13, implicit $exec
520 name: add_f16_1.0_multi_f32_use
522 exposesReturnsTwice: false
524 regBankSelected: false
526 tracksRegLiveness: true
528 - { id: 0, class: sreg_64 }
529 - { id: 1, class: sreg_32 }
530 - { id: 2, class: sgpr_32 }
531 - { id: 3, class: vgpr_32 }
532 - { id: 4, class: sreg_64 }
533 - { id: 5, class: sreg_32 }
534 - { id: 6, class: sreg_64 }
535 - { id: 7, class: sreg_32 }
536 - { id: 8, class: sreg_32 }
537 - { id: 9, class: sreg_32 }
538 - { id: 10, class: sreg_128 }
539 - { id: 11, class: vgpr_32 }
540 - { id: 12, class: vgpr_32 }
541 - { id: 13, class: vgpr_32 }
542 - { id: 14, class: vgpr_32 }
543 - { id: 15, class: vgpr_32 }
545 isFrameAddressTaken: false
546 isReturnAddressTaken: false
555 hasOpaqueSPAdjustment: false
557 hasMustTailInVarArgFunc: false
566 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
567 %11 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
568 %12 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
569 %13 = V_MOV_B32_e32 15360, implicit $exec
570 %14 = V_ADD_F32_e64 0, %11, 0, %13, 0, 0, implicit $exec
571 %15 = V_ADD_F32_e64 0, %12, 0, %13, 0, 0, implicit $exec
572 BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
573 BUFFER_STORE_DWORD_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
579 # The low 16-bits are an inline immediate, but the high bits are junk
580 # FIXME: Should be able to fold this
582 # CHECK-LABEL: name: add_f16_1.0_other_high_bits_multi_f16_use
583 # CHECK: %13:vgpr_32 = V_MOV_B32_e32 80886784, implicit $exec
584 # CHECK: %14:vgpr_32 = V_ADD_F16_e32 %11, %13, implicit $exec
585 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 %12, %13, implicit $exec
587 name: add_f16_1.0_other_high_bits_multi_f16_use
589 exposesReturnsTwice: false
591 regBankSelected: false
593 tracksRegLiveness: true
595 - { id: 0, class: sreg_64 }
596 - { id: 1, class: sreg_32 }
597 - { id: 2, class: sgpr_32 }
598 - { id: 3, class: vgpr_32 }
599 - { id: 4, class: sreg_64 }
600 - { id: 5, class: sreg_32 }
601 - { id: 6, class: sreg_64 }
602 - { id: 7, class: sreg_32 }
603 - { id: 8, class: sreg_32 }
604 - { id: 9, class: sreg_32 }
605 - { id: 10, class: sreg_128 }
606 - { id: 11, class: vgpr_32 }
607 - { id: 12, class: vgpr_32 }
608 - { id: 13, class: vgpr_32 }
609 - { id: 14, class: vgpr_32 }
610 - { id: 15, class: vgpr_32 }
612 isFrameAddressTaken: false
613 isReturnAddressTaken: false
622 hasOpaqueSPAdjustment: false
624 hasMustTailInVarArgFunc: false
633 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
634 %11 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
635 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
636 %13 = V_MOV_B32_e32 80886784, implicit $exec
637 %14 = V_ADD_F16_e64 0, %11, 0, %13, 0, 0, implicit $exec
638 %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $exec
639 BUFFER_STORE_SHORT_OFFSET killed %14, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
640 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)
646 # FIXME: Should fold inline immediate into f16 and literal use into
649 # CHECK-LABEL: name: add_f16_1.0_other_high_bits_use_f16_f32
650 # CHECK: %13:vgpr_32 = V_MOV_B32_e32 305413120, implicit $exec
651 # CHECK: %14:vgpr_32 = V_ADD_F32_e32 %11, %13, implicit $exec
652 # CHECK: %15:vgpr_32 = V_ADD_F16_e32 %12, %13, implicit $exec
653 name: add_f16_1.0_other_high_bits_use_f16_f32
655 exposesReturnsTwice: false
657 regBankSelected: false
659 tracksRegLiveness: true
661 - { id: 0, class: sreg_64 }
662 - { id: 1, class: sreg_32 }
663 - { id: 2, class: sgpr_32 }
664 - { id: 3, class: vgpr_32 }
665 - { id: 4, class: sreg_64 }
666 - { id: 5, class: sreg_32 }
667 - { id: 6, class: sreg_64 }
668 - { id: 7, class: sreg_32 }
669 - { id: 8, class: sreg_32 }
670 - { id: 9, class: sreg_32 }
671 - { id: 10, class: sreg_128 }
672 - { id: 11, class: vgpr_32 }
673 - { id: 12, class: vgpr_32 }
674 - { id: 13, class: vgpr_32 }
675 - { id: 14, class: vgpr_32 }
676 - { id: 15, class: vgpr_32 }
678 isFrameAddressTaken: false
679 isReturnAddressTaken: false
688 hasOpaqueSPAdjustment: false
690 hasMustTailInVarArgFunc: false
699 %10 = REG_SEQUENCE killed %7, 1, killed %5, 2, killed %9, 3, killed %8, 4
700 %11 = BUFFER_LOAD_DWORD_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
701 %12 = BUFFER_LOAD_USHORT_OFFSET %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 2 from `half addrspace(1)* undef`)
702 %13 = V_MOV_B32_e32 305413120, implicit $exec
703 %14 = V_ADD_F32_e64 0, %11, 0, %13, 0, 0, implicit $exec
704 %15 = V_ADD_F16_e64 0, %12, 0, %13, 0, 0, implicit $exec
705 BUFFER_STORE_DWORD_OFFSET killed %14, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `float addrspace(1)* undef`)
706 BUFFER_STORE_SHORT_OFFSET killed %15, %10, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 2 into `half addrspace(1)* undef`)