1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=SI %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=VI %s
4 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
5 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX10 %s
6 # RUN: llc -march=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -global-isel-abort=0 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX10 %s
12 tracksRegLiveness: true
17 ; SI-LABEL: name: fneg_s32_ss
20 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
21 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
22 ; SI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
23 ; SI-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
25 ; VI-LABEL: name: fneg_s32_ss
28 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
29 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
30 ; VI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
31 ; VI-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
33 ; GFX9-LABEL: name: fneg_s32_ss
34 ; GFX9: liveins: $sgpr0
36 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
37 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
38 ; GFX9-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
39 ; GFX9-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
41 ; GFX10-LABEL: name: fneg_s32_ss
42 ; GFX10: liveins: $sgpr0
44 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
45 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
46 ; GFX10-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
47 ; GFX10-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
48 %0:sgpr(s32) = COPY $sgpr0
49 %1:sgpr(s32) = G_FNEG %0
57 tracksRegLiveness: true
62 ; SI-LABEL: name: fneg_s32_vv
65 ; SI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
66 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
67 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
68 ; SI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
70 ; VI-LABEL: name: fneg_s32_vv
73 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
74 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
75 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
76 ; VI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
78 ; GFX9-LABEL: name: fneg_s32_vv
79 ; GFX9: liveins: $vgpr0
81 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
82 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
83 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
84 ; GFX9-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
86 ; GFX10-LABEL: name: fneg_s32_vv
87 ; GFX10: liveins: $vgpr0
89 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
90 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
91 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
92 ; GFX10-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
93 %0:vgpr(s32) = COPY $vgpr0
94 %1:vgpr(s32) = G_FNEG %0
101 regBankSelected: true
102 tracksRegLiveness: true
107 ; SI-LABEL: name: fneg_s32_vs
108 ; SI: liveins: $sgpr0
110 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
111 ; SI-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s32) = G_FNEG [[COPY]]
112 ; SI-NEXT: $vgpr0 = COPY [[FNEG]](s32)
114 ; VI-LABEL: name: fneg_s32_vs
115 ; VI: liveins: $sgpr0
117 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
118 ; VI-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s32) = G_FNEG [[COPY]]
119 ; VI-NEXT: $vgpr0 = COPY [[FNEG]](s32)
121 ; GFX9-LABEL: name: fneg_s32_vs
122 ; GFX9: liveins: $sgpr0
124 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
125 ; GFX9-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s32) = G_FNEG [[COPY]]
126 ; GFX9-NEXT: $vgpr0 = COPY [[FNEG]](s32)
128 ; GFX10-LABEL: name: fneg_s32_vs
129 ; GFX10: liveins: $sgpr0
131 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
132 ; GFX10-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s32) = G_FNEG [[COPY]]
133 ; GFX10-NEXT: $vgpr0 = COPY [[FNEG]](s32)
134 %0:sgpr(s32) = COPY $sgpr0
135 %1:vgpr(s32) = G_FNEG %0
142 regBankSelected: true
143 tracksRegLiveness: true
148 ; SI-LABEL: name: fneg_s16_ss
149 ; SI: liveins: $sgpr0
151 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
152 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
153 ; SI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
154 ; SI-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
156 ; VI-LABEL: name: fneg_s16_ss
157 ; VI: liveins: $sgpr0
159 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
160 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
161 ; VI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
162 ; VI-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
164 ; GFX9-LABEL: name: fneg_s16_ss
165 ; GFX9: liveins: $sgpr0
167 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
168 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
169 ; GFX9-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
170 ; GFX9-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
172 ; GFX10-LABEL: name: fneg_s16_ss
173 ; GFX10: liveins: $sgpr0
175 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
176 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
177 ; GFX10-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
178 ; GFX10-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
179 %0:sgpr(s32) = COPY $sgpr0
180 %1:sgpr(s16) = G_TRUNC %0
181 %2:sgpr(s16) = G_FNEG %1
182 %3:sgpr(s32) = G_ANYEXT %2
189 regBankSelected: true
190 tracksRegLiveness: true
195 ; SI-LABEL: name: fneg_s16_vv
196 ; SI: liveins: $vgpr0
198 ; SI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
199 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
200 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
201 ; SI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
203 ; VI-LABEL: name: fneg_s16_vv
204 ; VI: liveins: $vgpr0
206 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
207 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
208 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
209 ; VI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
211 ; GFX9-LABEL: name: fneg_s16_vv
212 ; GFX9: liveins: $vgpr0
214 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
215 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
216 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
217 ; GFX9-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
219 ; GFX10-LABEL: name: fneg_s16_vv
220 ; GFX10: liveins: $vgpr0
222 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
223 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
224 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
225 ; GFX10-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
226 %0:vgpr(s32) = COPY $vgpr0
227 %1:vgpr(s16) = G_TRUNC %0
228 %2:vgpr(s16) = G_FNEG %1
229 %3:vgpr(s32) = G_ANYEXT %2
236 regBankSelected: true
237 tracksRegLiveness: true
243 ; SI-LABEL: name: fneg_s16_vs
244 ; SI: liveins: $sgpr0
246 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
247 ; SI-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
248 ; SI-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[TRUNC]]
249 ; SI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FNEG]](s16)
250 ; SI-NEXT: $vgpr0 = COPY [[COPY1]](s32)
252 ; VI-LABEL: name: fneg_s16_vs
253 ; VI: liveins: $sgpr0
255 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
256 ; VI-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
257 ; VI-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[TRUNC]]
258 ; VI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FNEG]](s16)
259 ; VI-NEXT: $vgpr0 = COPY [[COPY1]](s32)
261 ; GFX9-LABEL: name: fneg_s16_vs
262 ; GFX9: liveins: $sgpr0
264 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
265 ; GFX9-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
266 ; GFX9-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[TRUNC]]
267 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FNEG]](s16)
268 ; GFX9-NEXT: $vgpr0 = COPY [[COPY1]](s32)
270 ; GFX10-LABEL: name: fneg_s16_vs
271 ; GFX10: liveins: $sgpr0
273 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
274 ; GFX10-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
275 ; GFX10-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[TRUNC]]
276 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FNEG]](s16)
277 ; GFX10-NEXT: $vgpr0 = COPY [[COPY1]](s32)
278 %0:sgpr(s32) = COPY $sgpr0
279 %1:sgpr(s16) = G_TRUNC %0
280 %2:vgpr(s16) = G_FNEG %1
281 %3:vgpr(s32) = G_ANYEXT %2
288 regBankSelected: true
289 tracksRegLiveness: true
293 liveins: $sgpr0_sgpr1
294 ; SI-LABEL: name: fneg_v2s16_ss
295 ; SI: liveins: $sgpr0_sgpr1
297 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
298 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
299 ; SI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
300 ; SI-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
302 ; VI-LABEL: name: fneg_v2s16_ss
303 ; VI: liveins: $sgpr0_sgpr1
305 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
306 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
307 ; VI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
308 ; VI-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
310 ; GFX9-LABEL: name: fneg_v2s16_ss
311 ; GFX9: liveins: $sgpr0_sgpr1
313 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
314 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
315 ; GFX9-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
316 ; GFX9-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
318 ; GFX10-LABEL: name: fneg_v2s16_ss
319 ; GFX10: liveins: $sgpr0_sgpr1
321 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
322 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
323 ; GFX10-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
324 ; GFX10-NEXT: $sgpr0 = COPY [[S_XOR_B32_]]
325 %0:sgpr(<2 x s16>) = COPY $sgpr0
326 %1:sgpr(<2 x s16>) = G_FNEG %0
333 regBankSelected: true
334 tracksRegLiveness: true
339 ; SI-LABEL: name: fneg_v2s16_vv
340 ; SI: liveins: $vgpr0
342 ; SI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
343 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
344 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
345 ; SI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
347 ; VI-LABEL: name: fneg_v2s16_vv
348 ; VI: liveins: $vgpr0
350 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
351 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
352 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
353 ; VI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
355 ; GFX9-LABEL: name: fneg_v2s16_vv
356 ; GFX9: liveins: $vgpr0
358 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
359 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
360 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
361 ; GFX9-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
363 ; GFX10-LABEL: name: fneg_v2s16_vv
364 ; GFX10: liveins: $vgpr0
366 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
367 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
368 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
369 ; GFX10-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
370 %0:vgpr(<2 x s16>) = COPY $vgpr0
371 %1:vgpr(<2 x s16>) = G_FNEG %0
378 regBankSelected: true
379 tracksRegLiveness: true
384 ; SI-LABEL: name: fneg_v2s16_vs
385 ; SI: liveins: $sgpr0
387 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
388 ; SI-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FNEG [[COPY]]
389 ; SI-NEXT: $vgpr0 = COPY [[FNEG]](<2 x s16>)
391 ; VI-LABEL: name: fneg_v2s16_vs
392 ; VI: liveins: $sgpr0
394 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
395 ; VI-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FNEG [[COPY]]
396 ; VI-NEXT: $vgpr0 = COPY [[FNEG]](<2 x s16>)
398 ; GFX9-LABEL: name: fneg_v2s16_vs
399 ; GFX9: liveins: $sgpr0
401 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
402 ; GFX9-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FNEG [[COPY]]
403 ; GFX9-NEXT: $vgpr0 = COPY [[FNEG]](<2 x s16>)
405 ; GFX10-LABEL: name: fneg_v2s16_vs
406 ; GFX10: liveins: $sgpr0
408 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
409 ; GFX10-NEXT: [[FNEG:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FNEG [[COPY]]
410 ; GFX10-NEXT: $vgpr0 = COPY [[FNEG]](<2 x s16>)
411 %0:sgpr(<2 x s16>) = COPY $sgpr0
412 %1:vgpr(<2 x s16>) = G_FNEG %0
419 regBankSelected: true
420 tracksRegLiveness: true
424 liveins: $sgpr0_sgpr1
425 ; SI-LABEL: name: fneg_s64_ss
426 ; SI: liveins: $sgpr0_sgpr1
428 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
429 ; SI-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
430 ; SI-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
431 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
432 ; SI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
433 ; SI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_XOR_B32_]], %subreg.sub1
434 ; SI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
436 ; VI-LABEL: name: fneg_s64_ss
437 ; VI: liveins: $sgpr0_sgpr1
439 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
440 ; VI-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
441 ; VI-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
442 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
443 ; VI-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
444 ; VI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_XOR_B32_]], %subreg.sub1
445 ; VI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
447 ; GFX9-LABEL: name: fneg_s64_ss
448 ; GFX9: liveins: $sgpr0_sgpr1
450 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
451 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
452 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
453 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
454 ; GFX9-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
455 ; GFX9-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_XOR_B32_]], %subreg.sub1
456 ; GFX9-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
458 ; GFX10-LABEL: name: fneg_s64_ss
459 ; GFX10: liveins: $sgpr0_sgpr1
461 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
462 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
463 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
464 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
465 ; GFX10-NEXT: [[S_XOR_B32_:%[0-9]+]]:sreg_32 = S_XOR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
466 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_XOR_B32_]], %subreg.sub1
467 ; GFX10-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
468 %0:sgpr(s64) = COPY $sgpr0_sgpr1
469 %1:sgpr(s64) = G_FNEG %0
470 S_ENDPGM 0, implicit %1
476 regBankSelected: true
477 tracksRegLiveness: true
481 liveins: $vgpr0_vgpr1
482 ; SI-LABEL: name: fneg_s64_vv
483 ; SI: liveins: $vgpr0_vgpr1
485 ; SI-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
486 ; SI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
487 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
488 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
489 ; SI-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
490 ; SI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_XOR_B32_e64_]], %subreg.sub1
491 ; SI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
493 ; VI-LABEL: name: fneg_s64_vv
494 ; VI: liveins: $vgpr0_vgpr1
496 ; VI-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
497 ; VI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
498 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
499 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
500 ; VI-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
501 ; VI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_XOR_B32_e64_]], %subreg.sub1
502 ; VI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
504 ; GFX9-LABEL: name: fneg_s64_vv
505 ; GFX9: liveins: $vgpr0_vgpr1
507 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
508 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
509 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
510 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
511 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
512 ; GFX9-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_XOR_B32_e64_]], %subreg.sub1
513 ; GFX9-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
515 ; GFX10-LABEL: name: fneg_s64_vv
516 ; GFX10: liveins: $vgpr0_vgpr1
518 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
519 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
520 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
521 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
522 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
523 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_XOR_B32_e64_]], %subreg.sub1
524 ; GFX10-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
525 %0:vgpr(s64) = COPY $vgpr0_vgpr1
526 %1:vgpr(s64) = G_FNEG %0
527 S_ENDPGM 0, implicit %1
533 regBankSelected: true
534 tracksRegLiveness: true
538 liveins: $sgpr0_sgpr1
539 ; SI-LABEL: name: fneg_s64_vs
540 ; SI: liveins: $sgpr0_sgpr1
542 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
543 ; SI-NEXT: [[FNEG:%[0-9]+]]:vgpr(s64) = G_FNEG [[COPY]]
544 ; SI-NEXT: S_ENDPGM 0, implicit [[FNEG]](s64)
546 ; VI-LABEL: name: fneg_s64_vs
547 ; VI: liveins: $sgpr0_sgpr1
549 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
550 ; VI-NEXT: [[FNEG:%[0-9]+]]:vgpr(s64) = G_FNEG [[COPY]]
551 ; VI-NEXT: S_ENDPGM 0, implicit [[FNEG]](s64)
553 ; GFX9-LABEL: name: fneg_s64_vs
554 ; GFX9: liveins: $sgpr0_sgpr1
556 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
557 ; GFX9-NEXT: [[FNEG:%[0-9]+]]:vgpr(s64) = G_FNEG [[COPY]]
558 ; GFX9-NEXT: S_ENDPGM 0, implicit [[FNEG]](s64)
560 ; GFX10-LABEL: name: fneg_s64_vs
561 ; GFX10: liveins: $sgpr0_sgpr1
563 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
564 ; GFX10-NEXT: [[FNEG:%[0-9]+]]:vgpr(s64) = G_FNEG [[COPY]]
565 ; GFX10-NEXT: S_ENDPGM 0, implicit [[FNEG]](s64)
566 %0:sgpr(s64) = COPY $sgpr0_sgpr1
567 %1:vgpr(s64) = G_FNEG %0
568 S_ENDPGM 0, implicit %1
573 name: fneg_fabs_s32_ss
575 regBankSelected: true
576 tracksRegLiveness: true
580 liveins: $sgpr0_sgpr1
581 ; SI-LABEL: name: fneg_fabs_s32_ss
582 ; SI: liveins: $sgpr0_sgpr1
584 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
585 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
586 ; SI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
587 ; SI-NEXT: S_ENDPGM 0, implicit [[S_OR_B32_]]
589 ; VI-LABEL: name: fneg_fabs_s32_ss
590 ; VI: liveins: $sgpr0_sgpr1
592 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
593 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
594 ; VI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
595 ; VI-NEXT: S_ENDPGM 0, implicit [[S_OR_B32_]]
597 ; GFX9-LABEL: name: fneg_fabs_s32_ss
598 ; GFX9: liveins: $sgpr0_sgpr1
600 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
601 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
602 ; GFX9-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
603 ; GFX9-NEXT: S_ENDPGM 0, implicit [[S_OR_B32_]]
605 ; GFX10-LABEL: name: fneg_fabs_s32_ss
606 ; GFX10: liveins: $sgpr0_sgpr1
608 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
609 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
610 ; GFX10-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
611 ; GFX10-NEXT: S_ENDPGM 0, implicit [[S_OR_B32_]]
612 %0:sgpr(s32) = COPY $sgpr0
613 %1:sgpr(s32) = G_FABS %0
614 %2:sgpr(s32) = G_FNEG %1
615 S_ENDPGM 0, implicit %2
619 name: fneg_fabs_s32_vv
621 regBankSelected: true
622 tracksRegLiveness: true
627 ; SI-LABEL: name: fneg_fabs_s32_vv
628 ; SI: liveins: $vgpr0
630 ; SI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
631 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
632 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
633 ; SI-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]]
635 ; VI-LABEL: name: fneg_fabs_s32_vv
636 ; VI: liveins: $vgpr0
638 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
639 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
640 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
641 ; VI-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]]
643 ; GFX9-LABEL: name: fneg_fabs_s32_vv
644 ; GFX9: liveins: $vgpr0
646 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
647 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
648 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
649 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]]
651 ; GFX10-LABEL: name: fneg_fabs_s32_vv
652 ; GFX10: liveins: $vgpr0
654 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
655 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
656 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
657 ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]]
658 %0:vgpr(s32) = COPY $vgpr0
659 %1:vgpr(s32) = G_FABS %0
660 %2:vgpr(s32) = G_FNEG %0
661 S_ENDPGM 0, implicit %2
665 name: fneg_fabs_s32_vs
667 regBankSelected: true
668 tracksRegLiveness: true
673 ; SI-LABEL: name: fneg_fabs_s32_vs
674 ; SI: liveins: $sgpr0
676 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
677 ; SI-NEXT: [[FABS:%[0-9]+]]:vgpr_32(s32) = G_FABS [[COPY]]
678 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147483648
679 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s32) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](s32), implicit $exec
680 ; SI-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]](s32)
682 ; VI-LABEL: name: fneg_fabs_s32_vs
683 ; VI: liveins: $sgpr0
685 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
686 ; VI-NEXT: [[FABS:%[0-9]+]]:vgpr_32(s32) = G_FABS [[COPY]]
687 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147483648
688 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s32) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](s32), implicit $exec
689 ; VI-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]](s32)
691 ; GFX9-LABEL: name: fneg_fabs_s32_vs
692 ; GFX9: liveins: $sgpr0
694 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
695 ; GFX9-NEXT: [[FABS:%[0-9]+]]:vgpr_32(s32) = G_FABS [[COPY]]
696 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147483648
697 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s32) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](s32), implicit $exec
698 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]](s32)
700 ; GFX10-LABEL: name: fneg_fabs_s32_vs
701 ; GFX10: liveins: $sgpr0
703 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
704 ; GFX10-NEXT: [[FABS:%[0-9]+]]:vgpr_32(s32) = G_FABS [[COPY]]
705 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147483648
706 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s32) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](s32), implicit $exec
707 ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_XOR_B32_e64_]](s32)
708 %0:sgpr(s32) = COPY $sgpr0
709 %1:vgpr(s32) = G_FABS %0
710 %2:vgpr(s32) = G_FNEG %1
711 S_ENDPGM 0, implicit %2
715 name: fneg_fabs_s16_ss
717 regBankSelected: true
718 tracksRegLiveness: true
723 ; SI-LABEL: name: fneg_fabs_s16_ss
724 ; SI: liveins: $sgpr0
726 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
727 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
728 ; SI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
729 ; SI-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
731 ; VI-LABEL: name: fneg_fabs_s16_ss
732 ; VI: liveins: $sgpr0
734 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
735 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
736 ; VI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
737 ; VI-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
739 ; GFX9-LABEL: name: fneg_fabs_s16_ss
740 ; GFX9: liveins: $sgpr0
742 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
743 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
744 ; GFX9-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
745 ; GFX9-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
747 ; GFX10-LABEL: name: fneg_fabs_s16_ss
748 ; GFX10: liveins: $sgpr0
750 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
751 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
752 ; GFX10-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
753 ; GFX10-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
754 %0:sgpr(s32) = COPY $sgpr0
755 %1:sgpr(s16) = G_TRUNC %0
756 %2:sgpr(s16) = G_FABS %1
757 %3:sgpr(s16) = G_FNEG %2
758 %4:sgpr(s32) = G_ANYEXT %3
763 name: fneg_fabs_s16_vv
765 regBankSelected: true
766 tracksRegLiveness: true
771 ; SI-LABEL: name: fneg_fabs_s16_vv
772 ; SI: liveins: $vgpr0
774 ; SI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
775 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
776 ; SI-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
777 ; SI-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[V_OR_B32_e64_]]
778 ; SI-NEXT: $vgpr0 = COPY [[COPY1]]
780 ; VI-LABEL: name: fneg_fabs_s16_vv
781 ; VI: liveins: $vgpr0
783 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
784 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
785 ; VI-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
786 ; VI-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[V_OR_B32_e64_]]
787 ; VI-NEXT: $vgpr0 = COPY [[COPY1]]
789 ; GFX9-LABEL: name: fneg_fabs_s16_vv
790 ; GFX9: liveins: $vgpr0
792 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
793 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
794 ; GFX9-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
795 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[V_OR_B32_e64_]]
796 ; GFX9-NEXT: $vgpr0 = COPY [[COPY1]]
798 ; GFX10-LABEL: name: fneg_fabs_s16_vv
799 ; GFX10: liveins: $vgpr0
801 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
802 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32768
803 ; GFX10-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
804 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[V_OR_B32_e64_]]
805 ; GFX10-NEXT: $vgpr0 = COPY [[COPY1]]
806 %0:vgpr(s32) = COPY $vgpr0
807 %1:vgpr(s16) = G_TRUNC %0
808 %2:vgpr(s16) = G_FABS %1
809 %3:vgpr(s16) = G_FNEG %2
810 %4:sgpr(s32) = G_ANYEXT %3
815 name: fneg_fabs_s16_vs
817 regBankSelected: true
818 tracksRegLiveness: true
824 ; SI-LABEL: name: fneg_fabs_s16_vs
825 ; SI: liveins: $sgpr0
827 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
828 ; SI-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
829 ; SI-NEXT: [[FNEG:%[0-9]+]]:sgpr(s16) = G_FNEG [[TRUNC]]
830 ; SI-NEXT: [[FNEG1:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[FNEG]]
831 ; SI-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FNEG1]](s16)
832 ; SI-NEXT: $vgpr0 = COPY [[COPY1]](s32)
834 ; VI-LABEL: name: fneg_fabs_s16_vs
835 ; VI: liveins: $sgpr0
837 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
838 ; VI-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
839 ; VI-NEXT: [[FNEG:%[0-9]+]]:sgpr(s16) = G_FNEG [[TRUNC]]
840 ; VI-NEXT: [[FNEG1:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[FNEG]]
841 ; VI-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FNEG1]](s16)
842 ; VI-NEXT: $vgpr0 = COPY [[COPY1]](s32)
844 ; GFX9-LABEL: name: fneg_fabs_s16_vs
845 ; GFX9: liveins: $sgpr0
847 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
848 ; GFX9-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
849 ; GFX9-NEXT: [[FNEG:%[0-9]+]]:sgpr(s16) = G_FNEG [[TRUNC]]
850 ; GFX9-NEXT: [[FNEG1:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[FNEG]]
851 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FNEG1]](s16)
852 ; GFX9-NEXT: $vgpr0 = COPY [[COPY1]](s32)
854 ; GFX10-LABEL: name: fneg_fabs_s16_vs
855 ; GFX10: liveins: $sgpr0
857 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
858 ; GFX10-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
859 ; GFX10-NEXT: [[FNEG:%[0-9]+]]:sgpr(s16) = G_FNEG [[TRUNC]]
860 ; GFX10-NEXT: [[FNEG1:%[0-9]+]]:vgpr_32(s16) = G_FNEG [[FNEG]]
861 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32(s32) = COPY [[FNEG1]](s16)
862 ; GFX10-NEXT: $vgpr0 = COPY [[COPY1]](s32)
863 %0:sgpr(s32) = COPY $sgpr0
864 %1:sgpr(s16) = G_TRUNC %0
865 %2:sgpr(s16) = G_FNEG %1
866 %3:vgpr(s16) = G_FNEG %2
867 %4:sgpr(s32) = G_ANYEXT %3
872 name: fneg_fabs_v2s16_ss
874 regBankSelected: true
875 tracksRegLiveness: true
879 liveins: $sgpr0_sgpr1
880 ; SI-LABEL: name: fneg_fabs_v2s16_ss
881 ; SI: liveins: $sgpr0_sgpr1
883 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
884 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
885 ; SI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
886 ; SI-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
888 ; VI-LABEL: name: fneg_fabs_v2s16_ss
889 ; VI: liveins: $sgpr0_sgpr1
891 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
892 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
893 ; VI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
894 ; VI-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
896 ; GFX9-LABEL: name: fneg_fabs_v2s16_ss
897 ; GFX9: liveins: $sgpr0_sgpr1
899 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
900 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
901 ; GFX9-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
902 ; GFX9-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
904 ; GFX10-LABEL: name: fneg_fabs_v2s16_ss
905 ; GFX10: liveins: $sgpr0_sgpr1
907 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
908 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
909 ; GFX10-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY]], [[S_MOV_B32_]], implicit-def dead $scc
910 ; GFX10-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
911 %0:sgpr(<2 x s16>) = COPY $sgpr0
912 %1:sgpr(<2 x s16>) = G_FABS %0
913 %2:sgpr(<2 x s16>) = G_FNEG %1
918 name: fneg_fabs_v2s16_vv
920 regBankSelected: true
921 tracksRegLiveness: true
926 ; SI-LABEL: name: fneg_fabs_v2s16_vv
927 ; SI: liveins: $vgpr0
929 ; SI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
930 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
931 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
932 ; SI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
934 ; VI-LABEL: name: fneg_fabs_v2s16_vv
935 ; VI: liveins: $vgpr0
937 ; VI-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
938 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
939 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
940 ; VI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
942 ; GFX9-LABEL: name: fneg_fabs_v2s16_vv
943 ; GFX9: liveins: $vgpr0
945 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
946 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
947 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
948 ; GFX9-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
950 ; GFX10-LABEL: name: fneg_fabs_v2s16_vv
951 ; GFX10: liveins: $vgpr0
953 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
954 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147516416
955 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec
956 ; GFX10-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]]
957 %0:vgpr(<2 x s16>) = COPY $vgpr0
958 %1:vgpr(<2 x s16>) = G_FABS %0
959 %2:vgpr(<2 x s16>) = G_FNEG %0
964 name: fneg_fabs_v2s16_vs
966 regBankSelected: true
967 tracksRegLiveness: true
972 ; SI-LABEL: name: fneg_fabs_v2s16_vs
973 ; SI: liveins: $sgpr0
975 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
976 ; SI-NEXT: [[FABS:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FABS [[COPY]]
977 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147516416
978 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(<2 x s16>) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](<2 x s16>), implicit $exec
979 ; SI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]](<2 x s16>)
981 ; VI-LABEL: name: fneg_fabs_v2s16_vs
982 ; VI: liveins: $sgpr0
984 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
985 ; VI-NEXT: [[FABS:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FABS [[COPY]]
986 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147516416
987 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(<2 x s16>) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](<2 x s16>), implicit $exec
988 ; VI-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]](<2 x s16>)
990 ; GFX9-LABEL: name: fneg_fabs_v2s16_vs
991 ; GFX9: liveins: $sgpr0
993 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
994 ; GFX9-NEXT: [[FABS:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FABS [[COPY]]
995 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147516416
996 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(<2 x s16>) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](<2 x s16>), implicit $exec
997 ; GFX9-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]](<2 x s16>)
999 ; GFX10-LABEL: name: fneg_fabs_v2s16_vs
1000 ; GFX10: liveins: $sgpr0
1001 ; GFX10-NEXT: {{ $}}
1002 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
1003 ; GFX10-NEXT: [[FABS:%[0-9]+]]:vgpr_32(<2 x s16>) = G_FABS [[COPY]]
1004 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s16) = S_MOV_B32 2147516416
1005 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(<2 x s16>) = V_XOR_B32_e64 [[S_MOV_B32_]](s16), [[FABS]](<2 x s16>), implicit $exec
1006 ; GFX10-NEXT: $vgpr0 = COPY [[V_XOR_B32_e64_]](<2 x s16>)
1007 %0:sgpr(<2 x s16>) = COPY $sgpr0
1008 %1:vgpr(<2 x s16>) = G_FABS %0
1009 %2:vgpr(<2 x s16>) = G_FNEG %1
1014 name: fneg_fabs_s64_ss
1016 regBankSelected: true
1017 tracksRegLiveness: true
1021 liveins: $sgpr0_sgpr1
1022 ; SI-LABEL: name: fneg_fabs_s64_ss
1023 ; SI: liveins: $sgpr0_sgpr1
1025 ; SI-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1026 ; SI-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1027 ; SI-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1028 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1029 ; SI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
1030 ; SI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_OR_B32_]], %subreg.sub1
1031 ; SI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1033 ; VI-LABEL: name: fneg_fabs_s64_ss
1034 ; VI: liveins: $sgpr0_sgpr1
1036 ; VI-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1037 ; VI-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1038 ; VI-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1039 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1040 ; VI-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
1041 ; VI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_OR_B32_]], %subreg.sub1
1042 ; VI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1044 ; GFX9-LABEL: name: fneg_fabs_s64_ss
1045 ; GFX9: liveins: $sgpr0_sgpr1
1047 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1048 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1049 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1050 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1051 ; GFX9-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
1052 ; GFX9-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_OR_B32_]], %subreg.sub1
1053 ; GFX9-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1055 ; GFX10-LABEL: name: fneg_fabs_s64_ss
1056 ; GFX10: liveins: $sgpr0_sgpr1
1057 ; GFX10-NEXT: {{ $}}
1058 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1059 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1060 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1061 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1062 ; GFX10-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = S_OR_B32 [[COPY2]], [[S_MOV_B32_]], implicit-def dead $scc
1063 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_OR_B32_]], %subreg.sub1
1064 ; GFX10-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1065 %0:sgpr(s64) = COPY $sgpr0_sgpr1
1066 %1:sgpr(s64) = G_FABS %0
1067 %2:sgpr(s64) = G_FNEG %1
1068 S_ENDPGM 0, implicit %2
1072 name: fneg_fabs_s64_vv
1074 regBankSelected: true
1075 tracksRegLiveness: true
1079 liveins: $vgpr0_vgpr1
1080 ; SI-LABEL: name: fneg_fabs_s64_vv
1081 ; SI: liveins: $vgpr0_vgpr1
1083 ; SI-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
1084 ; SI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
1085 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1086 ; SI-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
1087 ; SI-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
1088 ; SI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_OR_B32_e64_]], %subreg.sub1
1089 ; SI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1091 ; VI-LABEL: name: fneg_fabs_s64_vv
1092 ; VI: liveins: $vgpr0_vgpr1
1094 ; VI-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
1095 ; VI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
1096 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1097 ; VI-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
1098 ; VI-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
1099 ; VI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_OR_B32_e64_]], %subreg.sub1
1100 ; VI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1102 ; GFX9-LABEL: name: fneg_fabs_s64_vv
1103 ; GFX9: liveins: $vgpr0_vgpr1
1105 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
1106 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
1107 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1108 ; GFX9-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
1109 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
1110 ; GFX9-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_OR_B32_e64_]], %subreg.sub1
1111 ; GFX9-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1113 ; GFX10-LABEL: name: fneg_fabs_s64_vv
1114 ; GFX10: liveins: $vgpr0_vgpr1
1115 ; GFX10-NEXT: {{ $}}
1116 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
1117 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
1118 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 2147483648
1119 ; GFX10-NEXT: [[V_OR_B32_e64_:%[0-9]+]]:vgpr_32 = V_OR_B32_e64 [[S_MOV_B32_]], [[COPY1]], implicit $exec
1120 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
1121 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[V_OR_B32_e64_]], %subreg.sub1
1122 ; GFX10-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
1123 %0:vgpr(s64) = COPY $vgpr0_vgpr1
1124 %1:vgpr(s64) = G_FABS %0
1125 %2:vgpr(s64) = G_FNEG %1
1126 S_ENDPGM 0, implicit %2
1130 name: fneg_fabs_s64_vs
1132 regBankSelected: true
1133 tracksRegLiveness: true
1137 liveins: $sgpr0_sgpr1
1138 ; SI-LABEL: name: fneg_fabs_s64_vs
1139 ; SI: liveins: $sgpr0_sgpr1
1141 ; SI-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
1142 ; SI-NEXT: [[FABS:%[0-9]+]]:vreg_64(s64) = G_FABS [[COPY]]
1143 ; SI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub1(s64)
1144 ; SI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s32) = S_MOV_B32 2147483648
1145 ; SI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s16) = V_XOR_B32_e64 [[S_MOV_B32_]](s32), [[COPY1]](s32), implicit $exec
1146 ; SI-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub0(s64)
1147 ; SI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64(s64) = REG_SEQUENCE [[COPY2]](s32), %subreg.sub0, [[V_XOR_B32_e64_]](s16), %subreg.sub1
1148 ; SI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]](s64)
1150 ; VI-LABEL: name: fneg_fabs_s64_vs
1151 ; VI: liveins: $sgpr0_sgpr1
1153 ; VI-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
1154 ; VI-NEXT: [[FABS:%[0-9]+]]:vreg_64(s64) = G_FABS [[COPY]]
1155 ; VI-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub1(s64)
1156 ; VI-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s32) = S_MOV_B32 2147483648
1157 ; VI-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s16) = V_XOR_B32_e64 [[S_MOV_B32_]](s32), [[COPY1]](s32), implicit $exec
1158 ; VI-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub0(s64)
1159 ; VI-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64(s64) = REG_SEQUENCE [[COPY2]](s32), %subreg.sub0, [[V_XOR_B32_e64_]](s16), %subreg.sub1
1160 ; VI-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]](s64)
1162 ; GFX9-LABEL: name: fneg_fabs_s64_vs
1163 ; GFX9: liveins: $sgpr0_sgpr1
1165 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
1166 ; GFX9-NEXT: [[FABS:%[0-9]+]]:vreg_64(s64) = G_FABS [[COPY]]
1167 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub1(s64)
1168 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s32) = S_MOV_B32 2147483648
1169 ; GFX9-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s16) = V_XOR_B32_e64 [[S_MOV_B32_]](s32), [[COPY1]](s32), implicit $exec
1170 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub0(s64)
1171 ; GFX9-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64(s64) = REG_SEQUENCE [[COPY2]](s32), %subreg.sub0, [[V_XOR_B32_e64_]](s16), %subreg.sub1
1172 ; GFX9-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]](s64)
1174 ; GFX10-LABEL: name: fneg_fabs_s64_vs
1175 ; GFX10: liveins: $sgpr0_sgpr1
1176 ; GFX10-NEXT: {{ $}}
1177 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
1178 ; GFX10-NEXT: [[FABS:%[0-9]+]]:vreg_64(s64) = G_FABS [[COPY]]
1179 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub1(s64)
1180 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32(s32) = S_MOV_B32 2147483648
1181 ; GFX10-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32(s16) = V_XOR_B32_e64 [[S_MOV_B32_]](s32), [[COPY1]](s32), implicit $exec
1182 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY [[FABS]].sub0(s64)
1183 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64(s64) = REG_SEQUENCE [[COPY2]](s32), %subreg.sub0, [[V_XOR_B32_e64_]](s16), %subreg.sub1
1184 ; GFX10-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]](s64)
1185 %0:sgpr(s64) = COPY $sgpr0_sgpr1
1186 %1:vgpr(s64) = G_FABS %0
1187 %2:vgpr(s64) = G_FNEG %1
1188 S_ENDPGM 0, implicit %2