1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GFX11 %s
5 name: test_fmamk_reg_imm_f16
7 - { id: 0, class: vreg_64 }
8 - { id: 1, class: vgpr_32 }
9 - { id: 2, class: vgpr_32 }
10 - { id: 3, class: vgpr_32 }
11 - { id: 4, class: vgpr_32 }
15 ; GFX11-LABEL: name: test_fmamk_reg_imm_f16
16 ; GFX11: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
17 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub1
18 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub0
19 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
20 ; GFX11-NEXT: [[V_FMA_F16_gfx9_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_e64 0, killed [[COPY1]], 0, [[V_MOV_B32_e32_]], 0, killed [[COPY]], 0, 0, 0, implicit $mode, implicit $exec
24 %3 = V_MOV_B32_e32 1078523331, implicit $exec
25 %4 = V_FMAC_F16_t16_e64 0, killed %2, 0, %3, 0, killed %1, 0, 0, 0, implicit $mode, implicit $exec
30 name: test_fmamk_imm_reg_f16
32 - { id: 0, class: vreg_64 }
33 - { id: 1, class: vgpr_32 }
34 - { id: 2, class: vgpr_32 }
35 - { id: 3, class: vgpr_32 }
36 - { id: 4, class: vgpr_32 }
40 ; GFX11-LABEL: name: test_fmamk_imm_reg_f16
41 ; GFX11: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
42 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub1
43 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub0
44 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
45 ; GFX11-NEXT: [[V_FMA_F16_gfx9_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_e64 0, [[COPY1]], 0, killed [[V_MOV_B32_e32_]], 0, killed [[COPY]], 0, 0, 0, implicit $mode, implicit $exec
49 %3 = V_MOV_B32_e32 1078523331, implicit $exec
50 %4 = V_FMAC_F16_t16_e64 0, %2, 0, killed %3, 0, killed %1, 0, 0, 0, implicit $mode, implicit $exec
57 - { id: 0, class: vreg_64 }
58 - { id: 1, class: vgpr_32 }
59 - { id: 2, class: vgpr_32 }
60 - { id: 3, class: vgpr_32 }
61 - { id: 4, class: vgpr_32 }
65 ; GFX11-LABEL: name: test_fmaak_f16
66 ; GFX11: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
67 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub0
68 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub1
69 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
70 ; GFX11-NEXT: [[V_FMA_F16_gfx9_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_e64 0, killed [[COPY]], 0, [[COPY1]], 0, [[V_MOV_B32_e32_]], 0, 0, 0, implicit $mode, implicit $exec
74 %3 = V_MOV_B32_e32 1078523331, implicit $exec
75 %4 = V_FMAC_F16_t16_e64 0, killed %1, 0, %2, 0, %3, 0, 0, 0, implicit $mode, implicit $exec
79 name: test_fmaak_inline_literal_f16
80 tracksRegLiveness: true
82 - { reg: '$vgpr0', virtual-reg: '%0' }
87 ; GFX11-LABEL: name: test_fmaak_inline_literal_f16
88 ; GFX11: liveins: $vgpr0
90 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY killed $vgpr0
91 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
92 ; GFX11-NEXT: [[V_FMA_F16_gfx9_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_e64 0, 16384, 0, killed [[COPY]], 0, [[V_MOV_B32_e32_]], 0, 0, 0, implicit $mode, implicit $exec
93 ; GFX11-NEXT: S_ENDPGM 0
94 %0:vgpr_32 = COPY killed $vgpr0
96 %1:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
97 %2:vgpr_32 = V_FMAC_F16_t16_e64 0, 16384, 0, killed %0, 0, %1, 0, 0, 0, implicit $mode, implicit $exec