File: twoaddr-fma.mir

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (274 lines) | stat: -rw-r--r-- 7,761 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# RUN: llc -march=amdgcn -mcpu=gfx1010 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s

# GCN-LABEL: name: test_fmamk_reg_imm_f32
# GCN: %2:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
---
name:            test_fmamk_reg_imm_f32
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = COPY %0.sub1
    %2 = V_MOV_B32_e32 1078523331, implicit $exec
    %3 = V_FMAC_F32_e32 killed %0.sub0, %2, killed %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmamk_imm_reg_f32
# GCN: %2:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
---
name:            test_fmamk_imm_reg_f32
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = COPY %0.sub1
    %2 = V_MOV_B32_e32 1078523331, implicit $exec
    %3 = V_FMAC_F32_e32 %2, killed %0.sub0, killed %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmaak_f32
# GCN: %1:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAAK_F32 killed %0.sub0, %0.sub1, 1078523331, implicit $mode, implicit $exec
---
name:            test_fmaak_f32
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = V_MOV_B32_e32 1078523331, implicit $exec
    %2 = V_FMAC_F32_e32 killed %0.sub0, %0.sub1, %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmamk_reg_imm_f16
# GCN: %2:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAMK_F16 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
---
name:            test_fmamk_reg_imm_f16
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = COPY %0.sub1
    %2 = V_MOV_B32_e32 1078523331, implicit $exec
    %3 = V_FMAC_F16_e32 killed %0.sub0, %2, killed %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmamk_imm_reg_f16
# GCN: %2:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAMK_F16 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
---
name:            test_fmamk_imm_reg_f16
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = COPY %0.sub1
    %2 = V_MOV_B32_e32 1078523331, implicit $exec
    %3 = V_FMAC_F16_e32 %2, killed %0.sub0, killed %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmaak_f16
# GCN: %1:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAAK_F16 killed %0.sub0, %0.sub1, 1078523331, implicit $mode, implicit $exec
---
name:            test_fmaak_f16
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = V_MOV_B32_e32 1078523331, implicit $exec
    %2 = V_FMAC_F16_e32 killed %0.sub0, %0.sub1, %1, implicit $mode, implicit $exec
...

# GCN-LABEL: name: test_fmaak_sgpr_src0_f32
# GCN: %1:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: %3:vgpr_32 = V_FMAMK_F32 killed %0, 1078523331, %2, implicit $mode, implicit $exec

---
name:            test_fmaak_sgpr_src0_f32
registers:
  - { id: 0, class: sreg_32_xm0 }
  - { id: 1, class: vgpr_32}
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = V_MOV_B32_e32 1078523331, implicit $exec
    %2 = IMPLICIT_DEF
    %3 = V_FMAC_F32_e32 killed %0, %1, %2, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmaak_inlineimm_src0_f32
# GCN: %0:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: %2:vgpr_32 = V_FMAMK_F32 1073741824, 1078523331, %1, implicit $mode, implicit $exec

---
name:            test_fmaak_inlineimm_src0_f32
registers:
  - { id: 0, class: vgpr_32}
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
body:             |
  bb.0:

    %0 = V_MOV_B32_e32 1078523331, implicit $exec
    %1 = IMPLICIT_DEF
    %2 = V_FMAC_F32_e32 1073741824, %0, %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmaak_otherimm_src0_f32
# GCN: %2:vgpr_32 = V_FMAC_F32_e32 1120403456, %0, %2, implicit $mode, implicit $exec

---
name:            test_fmaak_otherimm_src0_f32
registers:
  - { id: 0, class: vgpr_32}
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
body:             |
  bb.0:

    %0 = V_MOV_B32_e32 1078523331, implicit $exec
    %1 = IMPLICIT_DEF
    %2 = V_FMAC_F32_e32 1120403456, %0, %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmaak_other_constantlike_src0_f32
# GCN: %2:vgpr_32 = COPY %1
# GCN: %2:vgpr_32 = V_FMAC_F32_e32 %stack.0, %0, %2, implicit $mode, implicit $exec
---
name:            test_fmaak_other_constantlike_src0_f32
tracksRegLiveness: true
registers:
  - { id: 0, class: vgpr_32 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
machineFunctionInfo:
  stackPtrOffsetReg: $sgpr32
stack:
  - { id: 0, name: "", type: default, offset: 0, size: 128, alignment: 8,
      callee-saved-register: '', local-offset: 0, debug-info-variable: '',
      debug-info-expression: '', debug-info-location: '' }
body:             |
  bb.0:

    %0 = V_MOV_B32_e32 1078523331, implicit $exec
    %1 = IMPLICIT_DEF
    %2 = V_FMAC_F32_e32 %stack.0, %0, %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmaak_inline_literal_f16
# GCN: %1:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: %2:vgpr_32 = V_FMAAK_F16 16384, killed %0, 49664, implicit $mode, implicit $exec

---
name:            test_fmaak_inline_literal_f16
tracksRegLiveness: true
liveins:
  - { reg: '$vgpr0', virtual-reg: '%0' }
body:             |
  bb.0:
    liveins: $vgpr0

    %0:vgpr_32 = COPY killed $vgpr0

    %1:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec
    %2:vgpr_32 = V_FMAC_F16_e32 16384, killed %0, %1, implicit $mode, implicit $exec
    S_ENDPGM 0

...

# GCN-LABEL: name: test_fmamk_reg_imm_f32_2_folds
# GCN: %2:vgpr_32 = IMPLICIT_DEF
# GCN-NOT: V_MOV_B32
# GCN: V_FMAMK_F32 %0.sub0, 1078523331, %1, implicit $mode, implicit $exec
# GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
---
name:            test_fmamk_reg_imm_f32_2_folds
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
  - { id: 4, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = COPY %0.sub1
    %2 = V_MOV_B32_e32 1078523331, implicit $exec
    %3 = V_FMAC_F32_e32 %0.sub0, %2, %1, implicit $mode, implicit $exec
    %4 = V_FMAC_F32_e32 killed %0.sub0, %2, killed %1, implicit $mode, implicit $exec

...

# GCN-LABEL: name: test_fmamk_reg_imm_f32_used_imm
# GCN: %2:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec
# GCN: V_FMAMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec
---
name:            test_fmamk_reg_imm_f32_used_imm
registers:
  - { id: 0, class: vreg_64 }
  - { id: 1, class: vgpr_32 }
  - { id: 2, class: vgpr_32 }
  - { id: 3, class: vgpr_32 }
body:             |
  bb.0:

    %0 = IMPLICIT_DEF
    %1 = COPY %0.sub1
    %2 = V_MOV_B32_e32 1078523331, implicit $exec
    %3 = V_FMAC_F32_e32 killed %0.sub0, %2, killed %1, implicit $mode, implicit $exec
    S_NOP 0, implicit %2

...