1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GFX11 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -verify-each -o - | FileCheck --check-prefixes=GFX11 %s
6 name: test_fmamk_reg_imm_f16
8 - { id: 0, class: vreg_64 }
9 - { id: 1, class: vgpr_32 }
10 - { id: 2, class: vgpr_32 }
11 - { id: 3, class: vgpr_32 }
12 - { id: 4, class: vgpr_32 }
16 ; GFX11-LABEL: name: test_fmamk_reg_imm_f16
17 ; GFX11: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
18 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub1
19 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub0
20 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
21 ; GFX11-NEXT: [[V_FMA_F16_gfx9_fake16_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_fake16_e64 0, killed [[COPY1]], 0, [[V_MOV_B32_e32_]], 0, killed [[COPY]], 0, 0, 0, implicit $mode, implicit $exec
25 %3 = V_MOV_B32_e32 1078523331, implicit $exec
26 %4 = V_FMAC_F16_fake16_e64 0, killed %2, 0, %3, 0, killed %1, 0, 0, implicit $mode, implicit $exec
31 name: test_fmamk_imm_reg_f16
33 - { id: 0, class: vreg_64 }
34 - { id: 1, class: vgpr_32 }
35 - { id: 2, class: vgpr_32 }
36 - { id: 3, class: vgpr_32 }
37 - { id: 4, class: vgpr_32 }
41 ; GFX11-LABEL: name: test_fmamk_imm_reg_f16
42 ; GFX11: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
43 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub1
44 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub0
45 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
46 ; GFX11-NEXT: [[V_FMA_F16_gfx9_fake16_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_fake16_e64 0, [[COPY1]], 0, killed [[V_MOV_B32_e32_]], 0, killed [[COPY]], 0, 0, 0, implicit $mode, implicit $exec
50 %3 = V_MOV_B32_e32 1078523331, implicit $exec
51 %4 = V_FMAC_F16_fake16_e64 0, %2, 0, killed %3, 0, killed %1, 0, 0, implicit $mode, implicit $exec
58 - { id: 0, class: vreg_64 }
59 - { id: 1, class: vgpr_32 }
60 - { id: 2, class: vgpr_32 }
61 - { id: 3, class: vgpr_32 }
62 - { id: 4, class: vgpr_32 }
66 ; GFX11-LABEL: name: test_fmaak_f16
67 ; GFX11: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
68 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub0
69 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[DEF]].sub1
70 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
71 ; GFX11-NEXT: [[V_FMA_F16_gfx9_fake16_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_fake16_e64 0, killed [[COPY]], 0, [[COPY1]], 0, [[V_MOV_B32_e32_]], 0, 0, 0, implicit $mode, implicit $exec
75 %3 = V_MOV_B32_e32 1078523331, implicit $exec
76 %4 = V_FMAC_F16_fake16_e64 0, killed %1, 0, %2, 0, %3, 0, 0, implicit $mode, implicit $exec
80 name: test_fmaak_inline_literal_f16
81 tracksRegLiveness: true
83 - { reg: '$vgpr0', virtual-reg: '%0' }
88 ; GFX11-LABEL: name: test_fmaak_inline_literal_f16
89 ; GFX11: liveins: $vgpr0
91 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY killed $vgpr0
92 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
93 ; GFX11-NEXT: [[V_FMA_F16_gfx9_fake16_e64_:%[0-9]+]]:vgpr_32 = V_FMA_F16_gfx9_fake16_e64 0, 16384, 0, killed [[COPY]], 0, [[V_MOV_B32_e32_]], 0, 0, 0, implicit $mode, implicit $exec
94 ; GFX11-NEXT: S_ENDPGM 0
95 %0:vgpr_32 = COPY killed $vgpr0
97 %1:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
98 %2:vgpr_32 = V_FMAC_F16_fake16_e64 0, 16384, 0, killed %0, 0, %1, 0, 0, implicit $mode, implicit $exec