150
|
1 # RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass=si-peephole-sdwa -o - %s | FileCheck -check-prefix=GFX9 %s
|
|
2 # RUN: llc -march=amdgcn -mcpu=fiji -verify-machineinstrs -run-pass=si-peephole-sdwa -o - %s | FileCheck -check-prefix=GFX9 %s
|
|
3
|
|
4 # test for 3 consecutive _sdwa's
|
|
5 # GFX9-LABEL: name: test1_add_co_sdwa
|
221
|
6 # GFX9: = nsw V_ADD_CO_U32_sdwa
|
|
7 # GFX9-NEXT: = nuw V_ADDC_U32_e32
|
|
8 # GFX9: V_ADD_CO_U32_sdwa
|
150
|
9 # GFX9-NEXT: V_ADDC_U32_e32
|
221
|
10 # GFX9: V_ADD_CO_U32_sdwa
|
150
|
11 # GFX9-NEXT: V_ADDC_U32_e32
|
|
12 ---
|
|
13 name: test1_add_co_sdwa
|
|
14 tracksRegLiveness: true
|
|
15 registers:
|
|
16 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
17 liveins:
|
|
18 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
19 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
20 body: |
|
|
21 bb.0:
|
|
22 liveins: $vgpr0, $sgpr0_sgpr1
|
|
23
|
|
24 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
25 %0:vgpr_32 = COPY $vgpr0
|
|
26 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
27 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
28 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
29 %63:vgpr_32, %65:sreg_64_xexec = nsw V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
|
30 %64:vgpr_32, dead %66:sreg_64_xexec = nuw V_ADDC_U32_e64 %30.sub1, %0, killed %65, 0, implicit $exec
|
150
|
31 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
32 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
33
|
|
34 %161:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
35 %163:vgpr_32, %165:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %161, 0, implicit $exec
|
150
|
36 %164:vgpr_32, dead %166:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, killed %165, 0, implicit $exec
|
|
37 %162:vreg_64 = REG_SEQUENCE %163, %subreg.sub0, %164, %subreg.sub1
|
221
|
38 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %162, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
39
|
|
40 %171:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
41 %173:vgpr_32, %175:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %171, 0, implicit $exec
|
150
|
42 %174:vgpr_32, dead %176:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, killed %175, 0, implicit $exec
|
|
43 %172:vreg_64 = REG_SEQUENCE %173, %subreg.sub0, %174, %subreg.sub1
|
221
|
44 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %172, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
45
|
|
46 ...
|
|
47
|
|
48 # test for VCC interference on sdwa, should generate 1 xform only
|
|
49 # GFX9-LABEL: name: test2_add_co_sdwa
|
221
|
50 # GFX9: V_ADD_CO_U32_sdwa
|
150
|
51 # GFX9: V_ADDC_U32_e32
|
221
|
52 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
53 # GFX9-NOT: V_ADDC_U32_e32
|
|
54 ---
|
|
55 name: test2_add_co_sdwa
|
|
56 tracksRegLiveness: true
|
|
57 registers:
|
|
58 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
59 liveins:
|
|
60 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
61 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
62 body: |
|
|
63 bb.0:
|
|
64 liveins: $vgpr0, $sgpr0_sgpr1
|
|
65
|
|
66 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
67 %0:vgpr_32 = COPY $vgpr0
|
|
68 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
69 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
70 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
71 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
72
|
|
73 %161:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
74 %163:vgpr_32, %165:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %161, 0, implicit $exec
|
150
|
75 %164:vgpr_32, dead %166:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, killed %165, 0, implicit $exec
|
|
76 %162:vreg_64 = REG_SEQUENCE %163, %subreg.sub0, %164, %subreg.sub1
|
|
77
|
|
78 %64:vgpr_32, dead %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, killed %65, 0, implicit $exec
|
|
79 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
80 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
81
|
|
82 %161:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
83 %163:vgpr_32, %165:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %161, 0, implicit $exec
|
150
|
84 %164:vgpr_32, dead %166:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, killed %165, 0, implicit $exec
|
|
85 %162:vreg_64 = REG_SEQUENCE %163, %subreg.sub0, %164, %subreg.sub1
|
221
|
86 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %162, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
87
|
|
88 ...
|
|
89
|
|
90 # test for CarryOut used, should reject
|
|
91 # GFX9-LABEL: name: test3_add_co_sdwa
|
221
|
92 # GFX9: V_ADD_CO_U32_e64
|
150
|
93 # GFX9: V_ADDC_U32_e64
|
221
|
94 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
95 # GFX9-NOT: V_ADDC_U32_e32
|
|
96 ---
|
|
97 name: test3_add_co_sdwa
|
|
98 tracksRegLiveness: true
|
|
99 registers:
|
|
100 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
101 liveins:
|
|
102 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
103 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
104 body: |
|
|
105 bb.0:
|
|
106 liveins: $vgpr0, $sgpr0_sgpr1
|
|
107
|
|
108 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
109 %0:vgpr_32 = COPY $vgpr0
|
|
110 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
111 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
112 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
113 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
114 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, killed %65, 0, implicit $exec
|
|
115 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %66, %subreg.sub1
|
221
|
116 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
117
|
|
118 ...
|
|
119
|
|
120 # test for CarryIn used more than once, should reject
|
|
121 # GFX9-LABEL: name: test4_add_co_sdwa
|
221
|
122 # GFX9: V_ADD_CO_U32_e64
|
150
|
123 # GFX9: V_ADDC_U32_e64
|
221
|
124 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
125 # GFX9-NOT: V_ADDC_U32_e32
|
|
126 ---
|
|
127 name: test4_add_co_sdwa
|
|
128 tracksRegLiveness: true
|
|
129 registers:
|
|
130 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
131 liveins:
|
|
132 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
133 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
134 body: |
|
|
135 bb.0:
|
|
136 liveins: $vgpr0, $sgpr0_sgpr1
|
|
137
|
|
138 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
139 %0:vgpr_32 = COPY $vgpr0
|
|
140 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
141 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
142 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
143 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
144 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
145 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %65, %subreg.sub1
|
221
|
146 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
147
|
|
148
|
|
149 ...
|
|
150
|
|
151 # test for simple example, should generate sdwa
|
|
152 # GFX9-LABEL: name: test5_add_co_sdwa
|
221
|
153 # GFX9: V_ADD_CO_U32_sdwa
|
150
|
154 # GFX9: V_ADDC_U32_e32
|
|
155 ---
|
|
156 name: test5_add_co_sdwa
|
|
157 tracksRegLiveness: true
|
|
158 registers:
|
|
159 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
160 liveins:
|
|
161 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
162 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
163 body: |
|
|
164 bb.0:
|
|
165 liveins: $vgpr0, $sgpr0_sgpr1
|
|
166
|
|
167 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
168 %0:vgpr_32 = COPY $vgpr0
|
|
169 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
170 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
171 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
172 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
173 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
174 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
175 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
176
|
|
177
|
|
178 ...
|
|
179
|
221
|
180 # test for V_ADD_CO_U32_e64 only, should reject
|
150
|
181 # GFX9-LABEL: name: test6_add_co_sdwa
|
221
|
182 # GFX9: V_ADD_CO_U32_e64
|
|
183 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
184 # GFX9-NOT: V_ADDC_U32_e32
|
|
185 ---
|
|
186 name: test6_add_co_sdwa
|
|
187 tracksRegLiveness: true
|
|
188 registers:
|
|
189 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
190 liveins:
|
|
191 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
192 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
193 body: |
|
|
194 bb.0:
|
|
195 liveins: $vgpr0, $sgpr0_sgpr1
|
|
196
|
|
197 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
198 %0:vgpr_32 = COPY $vgpr0
|
|
199 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
200 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
201 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
202 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
203 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %23, %subreg.sub1
|
221
|
204 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
205
|
|
206
|
|
207 ...
|
|
208
|
|
209 # test for V_ADDC_U32_e64 only, should reject
|
|
210 # GFX9-LABEL: name: test7_add_co_sdwa
|
|
211 # GFX9: V_ADDC_U32_e64
|
221
|
212 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
213 # GFX9-NOT: V_ADDC_U32_e32
|
|
214 ---
|
|
215 name: test7_add_co_sdwa
|
|
216 tracksRegLiveness: true
|
|
217 registers:
|
|
218 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
219 liveins:
|
|
220 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
221 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
222 body: |
|
|
223 bb.0:
|
|
224 liveins: $vgpr0, $sgpr0_sgpr1
|
|
225
|
|
226 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
227 %0:vgpr_32 = COPY $vgpr0
|
|
228 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
229 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
230 %24:sreg_64_xexec = COPY $sgpr0_sgpr1
|
|
231
|
|
232 %30:vreg_64 = COPY $sgpr0_sgpr1
|
|
233 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %24, 0, implicit $exec
|
|
234 %62:vreg_64 = REG_SEQUENCE %23, %subreg.sub0, %23, %subreg.sub1
|
221
|
235 GLOBAL_STORE_DWORDX2_SADDR %30.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
236
|
|
237
|
|
238 ...
|
|
239
|
|
240 # test for $vcc defined between two adds, should not generate
|
|
241 # GFX9-LABEL: name: test8_add_co_sdwa
|
221
|
242 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
243 # GFX9: V_ADDC_U32_e64
|
|
244 ---
|
|
245 name: test8_add_co_sdwa
|
|
246 tracksRegLiveness: true
|
|
247 registers:
|
|
248 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
249 liveins:
|
|
250 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
251 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
252 body: |
|
|
253 bb.0:
|
|
254 liveins: $vgpr0, $sgpr0_sgpr1
|
|
255
|
|
256 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
257 %0:vgpr_32 = COPY $vgpr0
|
|
258 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
259 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
|
260 %30:vreg_64 = COPY $sgpr0_sgpr1
|
221
|
261 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
262 $vcc = COPY %30
|
|
263 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
264 %31:vreg_64 = COPY $vcc
|
|
265 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
266 GLOBAL_STORE_DWORDX2_SADDR %31.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
267
|
|
268
|
|
269 ...
|
|
270
|
|
271 # test for non dead $vcc, should not generate
|
|
272 # GFX9-LABEL: name: test9_add_co_sdwa
|
221
|
273 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
274 # GFX9: V_ADDC_U32_e64
|
|
275 ---
|
|
276 name: test9_add_co_sdwa
|
|
277 tracksRegLiveness: true
|
|
278 registers:
|
|
279 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
280 liveins:
|
|
281 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
282 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
283 body: |
|
|
284 bb.0:
|
|
285 liveins: $vgpr0, $sgpr0_sgpr1
|
|
286
|
|
287 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
288 %0:vgpr_32 = COPY $vgpr0
|
|
289 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
290 %30:vreg_64 = COPY $sgpr0_sgpr1
|
|
291 $vcc = COPY %30
|
|
292 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
293 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
294 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
295 %31:vreg_64 = COPY $vcc
|
|
296 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
297 GLOBAL_STORE_DWORDX2_SADDR %31.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
|
298
|
150
|
299
|
|
300 ...
|
|
301
|
|
302 # test for def $vcc_lo, should not generate
|
|
303 # GFX9-LABEL: name: test10_add_co_sdwa
|
221
|
304 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
305 # GFX9: V_ADDC_U32_e64
|
|
306 ---
|
|
307 name: test10_add_co_sdwa
|
|
308 tracksRegLiveness: true
|
|
309 registers:
|
|
310 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
311 liveins:
|
|
312 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
313 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
314 body: |
|
|
315 bb.0:
|
|
316 liveins: $vgpr0, $sgpr0_sgpr1
|
|
317
|
|
318 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
319 %0:vgpr_32 = COPY $vgpr0
|
|
320 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
321 %30:vreg_64 = COPY $sgpr0_sgpr1
|
|
322 $vcc_lo = COPY %30.sub0
|
|
323 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
324 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
325 %31:vgpr_32 = COPY $vcc_lo
|
|
326 %32:vreg_64 = REG_SEQUENCE %31, %subreg.sub0, %23, %subreg.sub1
|
|
327 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
328 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
329 GLOBAL_STORE_DWORDX2_SADDR %32.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
330
|
|
331 ...
|
|
332
|
|
333 # test for read $vcc_hi, should not generate
|
|
334 # GFX9-LABEL: name: test11_add_co_sdwa
|
221
|
335 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
336 # GFX9: V_ADDC_U32_e64
|
|
337 ---
|
|
338 name: test11_add_co_sdwa
|
|
339 tracksRegLiveness: true
|
|
340 registers:
|
|
341 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
342 liveins:
|
|
343 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
344 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
345 body: |
|
|
346 bb.0:
|
|
347 liveins: $vgpr0, $sgpr0_sgpr1
|
|
348
|
|
349 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
350 %0:vgpr_32 = COPY $vgpr0
|
|
351 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
352 %30:vreg_64 = COPY $sgpr0_sgpr1
|
|
353 $vcc_hi = COPY %30.sub0
|
|
354 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
355 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
356 %31:vgpr_32 = COPY $vcc_hi
|
|
357 %32:vreg_64 = REG_SEQUENCE %31, %subreg.sub0, %23, %subreg.sub1
|
|
358 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
359 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
360 GLOBAL_STORE_DWORDX2_SADDR %32.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
361
|
|
362 ...
|
|
363
|
|
364 # test for $vcc defined and used between adds, should not generate
|
|
365 # GFX9-LABEL: name: test12_add_co_sdwa
|
221
|
366 # GFX9-NOT: V_ADD_CO_U32_sdwa
|
150
|
367 # GFX9: V_ADDC_U32_e64
|
|
368 ---
|
|
369 name: test12_add_co_sdwa
|
|
370 tracksRegLiveness: true
|
|
371 registers:
|
|
372 - { id: 0, class: vgpr_32, preferred-register: '' }
|
|
373 liveins:
|
|
374 - { reg: '$vgpr0', virtual-reg: '%0' }
|
|
375 - { reg: '$sgpr0_sgpr1', virtual-reg: '%1' }
|
|
376 body: |
|
|
377 bb.0:
|
|
378 liveins: $vgpr0, $sgpr0_sgpr1
|
|
379
|
|
380 %1:sgpr_64 = COPY $sgpr0_sgpr1
|
|
381 %0:vgpr_32 = COPY $vgpr0
|
|
382 %22:sreg_32_xm0 = S_MOV_B32 255
|
|
383 %30:vreg_64 = COPY $sgpr0_sgpr1
|
|
384 %23:vgpr_32 = V_AND_B32_e32 %22, %0, implicit $exec
|
221
|
385 %63:vgpr_32, %65:sreg_64_xexec = V_ADD_CO_U32_e64 %30.sub0, %23, 0, implicit $exec
|
150
|
386 $vcc = COPY %30
|
|
387 %31:vreg_64 = COPY killed $vcc
|
|
388 %64:vgpr_32, %66:sreg_64_xexec = V_ADDC_U32_e64 %30.sub1, %0, %65, 0, implicit $exec
|
|
389 %62:vreg_64 = REG_SEQUENCE %63, %subreg.sub0, %64, %subreg.sub1
|
221
|
390 GLOBAL_STORE_DWORDX2_SADDR %31.sub0, %62, %1, 0, 0, implicit $exec, implicit $exec :: (store 8)
|
150
|
391
|