1 # RUN: llc -march=amdgcn -mcpu=gfx1010 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: name: test_fmamk_reg_imm_f32
4 # GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $exec
6 name: test_fmamk_reg_imm_f32
8 - { id: 0, class: vreg_64 }
9 - { id: 1, class: vgpr_32 }
10 - { id: 2, class: vgpr_32 }
11 - { id: 3, class: vgpr_32 }
17 %2 = V_MOV_B32_e32 1078523331, implicit $exec
18 %3 = V_FMAC_F32_e32 killed %0.sub0, %2, killed %1, implicit $exec
22 # GCN-LABEL: name: test_fmamk_imm_reg_f32
23 # GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $exec
25 name: test_fmamk_imm_reg_f32
27 - { id: 0, class: vreg_64 }
28 - { id: 1, class: vgpr_32 }
29 - { id: 2, class: vgpr_32 }
30 - { id: 3, class: vgpr_32 }
36 %2 = V_MOV_B32_e32 1078523331, implicit $exec
37 %3 = V_FMAC_F32_e32 %2, killed %0.sub0, killed %1, implicit $exec
41 # GCN-LABEL: name: test_fmaak_f32
42 # GCN: V_FMAAK_F32 killed %0.sub0, %0.sub1, 1078523331, implicit $exec
46 - { id: 0, class: vreg_64 }
47 - { id: 1, class: vgpr_32 }
48 - { id: 2, class: vgpr_32 }
53 %1 = V_MOV_B32_e32 1078523331, implicit $exec
54 %2 = V_FMAC_F32_e32 killed %0.sub0, %0.sub1, %1, implicit $exec
58 # GCN-LABEL: name: test_fmamk_reg_imm_f16
59 # GCN: V_FMAMK_F16 killed %0.sub0, 1078523331, killed %1, implicit $exec
61 name: test_fmamk_reg_imm_f16
63 - { id: 0, class: vreg_64 }
64 - { id: 1, class: vgpr_32 }
65 - { id: 2, class: vgpr_32 }
66 - { id: 3, class: vgpr_32 }
72 %2 = V_MOV_B32_e32 1078523331, implicit $exec
73 %3 = V_FMAC_F16_e32 killed %0.sub0, %2, killed %1, implicit $exec
77 # GCN-LABEL: name: test_fmamk_imm_reg_f16
78 # GCN: V_FMAMK_F16 killed %0.sub0, 1078523331, killed %1, implicit $exec
80 name: test_fmamk_imm_reg_f16
82 - { id: 0, class: vreg_64 }
83 - { id: 1, class: vgpr_32 }
84 - { id: 2, class: vgpr_32 }
85 - { id: 3, class: vgpr_32 }
91 %2 = V_MOV_B32_e32 1078523331, implicit $exec
92 %3 = V_FMAC_F16_e32 %2, killed %0.sub0, killed %1, implicit $exec
96 # GCN-LABEL: name: test_fmaak_f16
97 # GCN: V_FMAAK_F16 killed %0.sub0, %0.sub1, 1078523331, implicit $exec
101 - { id: 0, class: vreg_64 }
102 - { id: 1, class: vgpr_32 }
103 - { id: 2, class: vgpr_32 }
108 %1 = V_MOV_B32_e32 1078523331, implicit $exec
109 %2 = V_FMAC_F16_e32 killed %0.sub0, %0.sub1, %1, implicit $exec
112 # GCN-LABEL: name: test_fmaak_sgpr_src0_f32
113 # GCN: %2:vgpr_32 = V_FMAMK_F32 killed %0, 1078523331, %3:vgpr_32, implicit $exec
116 name: test_fmaak_sgpr_src0_f32
118 - { id: 0, class: sreg_32_xm0 }
119 - { id: 1, class: vgpr_32}
120 - { id: 2, class: vgpr_32 }
121 - { id: 3, class: vgpr_32 }
126 %1 = V_MOV_B32_e32 1078523331, implicit $exec
127 %2 = V_FMAC_F32_e32 killed %0, %1, %3, implicit $exec
131 # GCN-LABEL: name: test_fmaak_inlineimm_src0_f32
132 # GCN: %1:vgpr_32 = V_FMAMK_F32 1073741824, 1078523331, %2:vgpr_32, implicit $exec
135 name: test_fmaak_inlineimm_src0_f32
137 - { id: 0, class: vgpr_32}
138 - { id: 1, class: vgpr_32 }
139 - { id: 2, class: vgpr_32 }
143 %0 = V_MOV_B32_e32 1078523331, implicit $exec
144 %1 = V_FMAC_F32_e32 1073741824, %0, %2, implicit $exec
148 # GCN-LABEL: name: test_fmaak_otherimm_src0_f32
149 # GCN: %1:vgpr_32 = V_FMAC_F32_e32 1120403456, %0, %1, implicit $exec
152 name: test_fmaak_otherimm_src0_f32
154 - { id: 0, class: vgpr_32}
155 - { id: 1, class: vgpr_32 }
156 - { id: 2, class: vgpr_32 }
160 %0 = V_MOV_B32_e32 1078523331, implicit $exec
161 %1 = V_FMAC_F32_e32 1120403456, %0, %2, implicit $exec
165 # GCN-LABEL: name: test_fmaak_other_constantlike_src0_f32
166 # GCN: %1:vgpr_32 = V_FMAC_F32_e32 %stack.0, %0, %1, implicit $exec
168 name: test_fmaak_other_constantlike_src0_f32
170 - { id: 0, class: vgpr_32}
171 - { id: 1, class: vgpr_32 }
172 - { id: 2, class: vgpr_32 }
174 - { id: 0, name: "", type: default, offset: 0, size: 128, alignment: 8,
175 callee-saved-register: '', local-offset: 0, debug-info-variable: '',
176 debug-info-expression: '', debug-info-location: '' }
180 %0 = V_MOV_B32_e32 1078523331, implicit $exec
181 %1 = V_FMAC_F32_e32 %stack.0, %0, %2, implicit $exec
185 # GCN-LABEL: name: test_fmaak_inline_literal_f16
186 # GCN: %2:vgpr_32 = V_FMAAK_F16 16384, killed %0, 49664, implicit $exec
189 name: test_fmaak_inline_literal_f16
191 - { reg: '$vgpr0', virtual-reg: '%3' }
196 %3:vgpr_32 = COPY killed $vgpr0
198 %26:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
199 %28:vgpr_32 = V_FMAC_F16_e32 16384, killed %3, %26, implicit $exec