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: liveins: $agpr0
15 ; GFX908-NEXT: renamable $agpr1 = COPY renamable $agpr0, implicit $exec
16 ; GFX908-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
17 ; GFX908-NEXT: renamable $agpr3 = COPY $agpr0, implicit $exec
18 ; GFX908-NEXT: S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
19 ; GFX90A-LABEL: name: propagate_agpr
20 ; GFX90A: liveins: $agpr0
22 ; GFX90A-NEXT: renamable $agpr1 = COPY renamable $agpr0, implicit $exec
23 ; GFX90A-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
24 ; GFX90A-NEXT: renamable $agpr3 = COPY $agpr0, implicit $exec
25 ; GFX90A-NEXT: S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
26 renamable $agpr1 = COPY renamable $agpr0, implicit $exec
27 renamable $agpr2 = COPY renamable $agpr1, implicit $exec
28 renamable $agpr3 = COPY renamable $agpr2, implicit $exec
29 S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
32 name: do_not_propagate_agpr_to_agpr
38 ; GFX908-LABEL: name: do_not_propagate_agpr_to_agpr
39 ; GFX908: liveins: $agpr0
41 ; GFX908-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
42 ; GFX908-NEXT: renamable $agpr1 = COPY renamable $vgpr0, implicit $exec
43 ; GFX908-NEXT: renamable $agpr2 = COPY renamable $vgpr0, implicit $exec
44 ; GFX908-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
45 ; GFX90A-LABEL: name: do_not_propagate_agpr_to_agpr
46 ; GFX90A: liveins: $agpr0
48 ; GFX90A-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
49 ; GFX90A-NEXT: renamable $agpr1 = COPY $agpr0, implicit $exec
50 ; GFX90A-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
51 ; GFX90A-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
52 renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
53 renamable $agpr1 = COPY renamable $vgpr0, implicit $exec
54 renamable $agpr2 = COPY renamable $vgpr0, implicit $exec
55 S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
58 name: propagate_vgpr_to_agpr
64 ; GFX908-LABEL: name: propagate_vgpr_to_agpr
65 ; GFX908: liveins: $vgpr0
67 ; GFX908-NEXT: renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
68 ; GFX908-NEXT: renamable $agpr1 = COPY $vgpr0, implicit $exec
69 ; GFX908-NEXT: renamable $agpr2 = COPY $vgpr0, implicit $exec
70 ; GFX908-NEXT: S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
71 ; GFX90A-LABEL: name: propagate_vgpr_to_agpr
72 ; GFX90A: liveins: $vgpr0
74 ; GFX90A-NEXT: renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
75 ; GFX90A-NEXT: renamable $agpr1 = COPY $vgpr0, implicit $exec
76 ; GFX90A-NEXT: renamable $agpr2 = COPY $vgpr0, implicit $exec
77 ; GFX90A-NEXT: S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
78 renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
79 renamable $agpr1 = COPY renamable $agpr0, implicit $exec
80 renamable $agpr2 = COPY renamable $agpr0, implicit $exec
81 S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
84 name: propagate_agpr_to_vgpr
90 ; GFX908-LABEL: name: propagate_agpr_to_vgpr
91 ; GFX908: liveins: $agpr0
93 ; GFX908-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
94 ; GFX908-NEXT: renamable $vgpr1 = COPY $agpr0, implicit $exec
95 ; GFX908-NEXT: renamable $vgpr2 = COPY $agpr0, implicit $exec
96 ; GFX908-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2
97 ; GFX90A-LABEL: name: propagate_agpr_to_vgpr
98 ; GFX90A: liveins: $agpr0
100 ; GFX90A-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
101 ; GFX90A-NEXT: renamable $vgpr1 = COPY $agpr0, implicit $exec
102 ; GFX90A-NEXT: renamable $vgpr2 = COPY $agpr0, implicit $exec
103 ; GFX90A-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2
104 renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
105 renamable $vgpr1 = COPY renamable $vgpr0, implicit $exec
106 renamable $vgpr2 = COPY renamable $vgpr0, implicit $exec
107 S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2