1# RUN: llc -march=amdgcn -mcpu=gfx1010 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
2
3# GCN-LABEL: name: test_fmamk_reg_imm_f32
4# GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
5---
6name:            test_fmamk_reg_imm_f32
7registers:
8  - { id: 0, class: vreg_64 }
9  - { id: 1, class: vgpr_32 }
10  - { id: 2, class: vgpr_32 }
11  - { id: 3, class: vgpr_32 }
12body:             |
13  bb.0:
14
15    %0 = IMPLICIT_DEF
16    %1 = COPY %0.sub1
17    %2 = V_MOV_B32_e32 1078523331, implicit $exec
18    %3 = V_FMAC_F32_e32 killed %0.sub0, %2, killed %1, implicit $mode, implicit $exec
19
20...
21
22# GCN-LABEL: name: test_fmamk_imm_reg_f32
23# GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
24---
25name:            test_fmamk_imm_reg_f32
26registers:
27  - { id: 0, class: vreg_64 }
28  - { id: 1, class: vgpr_32 }
29  - { id: 2, class: vgpr_32 }
30  - { id: 3, class: vgpr_32 }
31body:             |
32  bb.0:
33
34    %0 = IMPLICIT_DEF
35    %1 = COPY %0.sub1
36    %2 = V_MOV_B32_e32 1078523331, implicit $exec
37    %3 = V_FMAC_F32_e32 %2, killed %0.sub0, killed %1, implicit $mode, implicit $exec
38
39...
40
41# GCN-LABEL: name: test_fmaak_f32
42# GCN: V_FMAAK_F32 killed %0.sub0, %0.sub1, 1078523331, implicit $mode, implicit $exec
43---
44name:            test_fmaak_f32
45registers:
46  - { id: 0, class: vreg_64 }
47  - { id: 1, class: vgpr_32 }
48  - { id: 2, class: vgpr_32 }
49body:             |
50  bb.0:
51
52    %0 = IMPLICIT_DEF
53    %1 = V_MOV_B32_e32 1078523331, implicit $exec
54    %2 = V_FMAC_F32_e32 killed %0.sub0, %0.sub1, %1, implicit $mode, implicit $exec
55
56...
57
58# GCN-LABEL: name: test_fmamk_reg_imm_f16
59# GCN: V_FMAMK_F16 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
60---
61name:            test_fmamk_reg_imm_f16
62registers:
63  - { id: 0, class: vreg_64 }
64  - { id: 1, class: vgpr_32 }
65  - { id: 2, class: vgpr_32 }
66  - { id: 3, class: vgpr_32 }
67body:             |
68  bb.0:
69
70    %0 = IMPLICIT_DEF
71    %1 = COPY %0.sub1
72    %2 = V_MOV_B32_e32 1078523331, implicit $exec
73    %3 = V_FMAC_F16_e32 killed %0.sub0, %2, killed %1, implicit $mode, implicit $exec
74
75...
76
77# GCN-LABEL: name: test_fmamk_imm_reg_f16
78# GCN: V_FMAMK_F16 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
79---
80name:            test_fmamk_imm_reg_f16
81registers:
82  - { id: 0, class: vreg_64 }
83  - { id: 1, class: vgpr_32 }
84  - { id: 2, class: vgpr_32 }
85  - { id: 3, class: vgpr_32 }
86body:             |
87  bb.0:
88
89    %0 = IMPLICIT_DEF
90    %1 = COPY %0.sub1
91    %2 = V_MOV_B32_e32 1078523331, implicit $exec
92    %3 = V_FMAC_F16_e32 %2, killed %0.sub0, killed %1, implicit $mode, implicit $exec
93
94...
95
96# GCN-LABEL: name: test_fmaak_f16
97# GCN: V_FMAAK_F16 killed %0.sub0, %0.sub1, 1078523331, implicit $mode, implicit $exec
98---
99name:            test_fmaak_f16
100registers:
101  - { id: 0, class: vreg_64 }
102  - { id: 1, class: vgpr_32 }
103  - { id: 2, class: vgpr_32 }
104body:             |
105  bb.0:
106
107    %0 = IMPLICIT_DEF
108    %1 = V_MOV_B32_e32 1078523331, implicit $exec
109    %2 = V_FMAC_F16_e32 killed %0.sub0, %0.sub1, %1, implicit $mode, implicit $exec
110...
111
112# GCN-LABEL: name: test_fmaak_sgpr_src0_f32
113# GCN: %2:vgpr_32 = V_FMAMK_F32 killed %0, 1078523331, %3:vgpr_32, implicit $mode, implicit $exec
114
115---
116name:            test_fmaak_sgpr_src0_f32
117registers:
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 }
122body:             |
123  bb.0:
124
125    %0 = IMPLICIT_DEF
126    %1 = V_MOV_B32_e32 1078523331, implicit $exec
127    %2 = V_FMAC_F32_e32 killed %0, %1, %3, implicit $mode, implicit $exec
128
129...
130
131# GCN-LABEL: name: test_fmaak_inlineimm_src0_f32
132# GCN: %1:vgpr_32 = V_FMAMK_F32 1073741824, 1078523331, %2:vgpr_32, implicit $mode, implicit $exec
133
134---
135name:            test_fmaak_inlineimm_src0_f32
136registers:
137  - { id: 0, class: vgpr_32}
138  - { id: 1, class: vgpr_32 }
139  - { id: 2, class: vgpr_32 }
140body:             |
141  bb.0:
142
143    %0 = V_MOV_B32_e32 1078523331, implicit $exec
144    %1 = V_FMAC_F32_e32 1073741824, %0, %2, implicit $mode, implicit $exec
145
146...
147
148# GCN-LABEL: name: test_fmaak_otherimm_src0_f32
149# GCN: %1:vgpr_32 = V_FMAC_F32_e32 1120403456, %0, %1, implicit $mode, implicit $exec
150
151---
152name:            test_fmaak_otherimm_src0_f32
153registers:
154  - { id: 0, class: vgpr_32}
155  - { id: 1, class: vgpr_32 }
156  - { id: 2, class: vgpr_32 }
157body:             |
158  bb.0:
159
160    %0 = V_MOV_B32_e32 1078523331, implicit $exec
161    %1 = V_FMAC_F32_e32 1120403456, %0, %2, implicit $mode, implicit $exec
162
163...
164
165# GCN-LABEL: name: test_fmaak_other_constantlike_src0_f32
166# GCN: %1:vgpr_32 = V_FMAC_F32_e32 %stack.0, %0, %1, implicit $mode, implicit $exec
167---
168name:            test_fmaak_other_constantlike_src0_f32
169registers:
170  - { id: 0, class: vgpr_32}
171  - { id: 1, class: vgpr_32 }
172  - { id: 2, class: vgpr_32 }
173stack:
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: '' }
177body:             |
178  bb.0:
179
180    %0 = V_MOV_B32_e32 1078523331, implicit $exec
181    %1 = V_FMAC_F32_e32 %stack.0, %0, %2, implicit $mode, implicit $exec
182
183...
184
185# GCN-LABEL: name: test_fmaak_inline_literal_f16
186# GCN: %2:vgpr_32 = V_FMAAK_F16 16384, killed %0, 49664, implicit $mode, implicit $exec
187
188---
189name:            test_fmaak_inline_literal_f16
190liveins:
191  - { reg: '$vgpr0', virtual-reg: '%3' }
192body:             |
193  bb.0:
194    liveins: $vgpr0
195
196    %3:vgpr_32 = COPY killed $vgpr0
197
198    %26:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
199    %28:vgpr_32 = V_FMAC_F16_e32 16384, killed %3, %26, implicit $mode, implicit $exec
200    S_ENDPGM 0
201
202...
203
204