1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx908 %s -o - -run-pass machine-cp -verify-machineinstrs | FileCheck -check-prefix=GFX908 %s
3 # RUN: llc -march=amdgcn -mcpu=gfx90a %s -o - -run-pass machine-cp -verify-machineinstrs | FileCheck -check-prefix=GFX90A %s
12 ; GFX908-LABEL: name: propagate_agpr
13 ; GFX908: renamable $agpr1 = COPY renamable $agpr0, implicit $exec
14 ; GFX908-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
15 ; GFX908-NEXT: renamable $agpr3 = COPY $agpr0, implicit $exec
16 ; GFX908-NEXT: S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
17 ; GFX90A-LABEL: name: propagate_agpr
18 ; GFX90A: renamable $agpr1 = COPY renamable $agpr0, implicit $exec
19 ; GFX90A-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
20 ; GFX90A-NEXT: renamable $agpr3 = COPY $agpr0, implicit $exec
21 ; GFX90A-NEXT: S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
22 renamable $agpr1 = COPY renamable $agpr0, implicit $exec
23 renamable $agpr2 = COPY renamable $agpr1, implicit $exec
24 renamable $agpr3 = COPY renamable $agpr2, implicit $exec
25 S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
28 name: do_not_propagate_agpr_to_agpr
34 ; GFX908-LABEL: name: do_not_propagate_agpr_to_agpr
35 ; GFX908: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
36 ; GFX908-NEXT: renamable $agpr1 = COPY renamable $vgpr0, implicit $exec
37 ; GFX908-NEXT: renamable $agpr2 = COPY renamable $vgpr0, implicit $exec
38 ; GFX908-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
39 ; GFX90A-LABEL: name: do_not_propagate_agpr_to_agpr
40 ; GFX90A: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
41 ; GFX90A-NEXT: renamable $agpr1 = COPY $agpr0, implicit $exec
42 ; GFX90A-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
43 ; GFX90A-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
44 renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
45 renamable $agpr1 = COPY renamable $vgpr0, implicit $exec
46 renamable $agpr2 = COPY renamable $vgpr0, implicit $exec
47 S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
50 name: propagate_vgpr_to_agpr
56 ; GFX908-LABEL: name: propagate_vgpr_to_agpr
57 ; GFX908: renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
58 ; GFX908-NEXT: renamable $agpr1 = COPY $vgpr0, implicit $exec
59 ; GFX908-NEXT: renamable $agpr2 = COPY $vgpr0, implicit $exec
60 ; GFX908-NEXT: S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
61 ; GFX90A-LABEL: name: propagate_vgpr_to_agpr
62 ; GFX90A: renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
63 ; GFX90A-NEXT: renamable $agpr1 = COPY $vgpr0, implicit $exec
64 ; GFX90A-NEXT: renamable $agpr2 = COPY $vgpr0, implicit $exec
65 ; GFX90A-NEXT: S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
66 renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
67 renamable $agpr1 = COPY renamable $agpr0, implicit $exec
68 renamable $agpr2 = COPY renamable $agpr0, implicit $exec
69 S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
72 name: propagate_agpr_to_vgpr
78 ; GFX908-LABEL: name: propagate_agpr_to_vgpr
79 ; GFX908: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
80 ; GFX908-NEXT: renamable $vgpr1 = COPY $agpr0, implicit $exec
81 ; GFX908-NEXT: renamable $vgpr2 = COPY $agpr0, implicit $exec
82 ; GFX908-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2
83 ; GFX90A-LABEL: name: propagate_agpr_to_vgpr
84 ; GFX90A: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
85 ; GFX90A-NEXT: renamable $vgpr1 = COPY $agpr0, implicit $exec
86 ; GFX90A-NEXT: renamable $vgpr2 = COPY $agpr0, implicit $exec
87 ; GFX90A-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2
88 renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
89 renamable $vgpr1 = COPY renamable $vgpr0, implicit $exec
90 renamable $vgpr2 = COPY renamable $vgpr0, implicit $exec
91 S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2