1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx908 %s -o - -run-pass machine-cp -verify-machineinstrs | FileCheck -check-prefix=GFX908 %s
3 # RUN: llc -mtriple=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
20 ; GFX90A-LABEL: name: propagate_agpr
21 ; GFX90A: liveins: $agpr0
23 ; GFX90A-NEXT: renamable $agpr1 = COPY renamable $agpr0, implicit $exec
24 ; GFX90A-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
25 ; GFX90A-NEXT: renamable $agpr3 = COPY $agpr0, implicit $exec
26 ; GFX90A-NEXT: S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
27 renamable $agpr1 = COPY renamable $agpr0, implicit $exec
28 renamable $agpr2 = COPY renamable $agpr1, implicit $exec
29 renamable $agpr3 = COPY renamable $agpr2, implicit $exec
30 S_ENDPGM 0, implicit $agpr1, implicit $agpr2, implicit $agpr3
33 name: do_not_propagate_agpr_to_agpr
39 ; GFX908-LABEL: name: do_not_propagate_agpr_to_agpr
40 ; GFX908: liveins: $agpr0
42 ; GFX908-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
43 ; GFX908-NEXT: renamable $agpr1 = COPY renamable $vgpr0, implicit $exec
44 ; GFX908-NEXT: renamable $agpr2 = COPY renamable $vgpr0, implicit $exec
45 ; GFX908-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
47 ; GFX90A-LABEL: name: do_not_propagate_agpr_to_agpr
48 ; GFX90A: liveins: $agpr0
50 ; GFX90A-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
51 ; GFX90A-NEXT: renamable $agpr1 = COPY $agpr0, implicit $exec
52 ; GFX90A-NEXT: renamable $agpr2 = COPY $agpr0, implicit $exec
53 ; GFX90A-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
54 renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
55 renamable $agpr1 = COPY renamable $vgpr0, implicit $exec
56 renamable $agpr2 = COPY renamable $vgpr0, implicit $exec
57 S_ENDPGM 0, implicit $vgpr0, implicit $agpr1, implicit $agpr2
60 name: propagate_vgpr_to_agpr
66 ; GFX908-LABEL: name: propagate_vgpr_to_agpr
67 ; GFX908: liveins: $vgpr0
69 ; GFX908-NEXT: renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
70 ; GFX908-NEXT: renamable $agpr1 = COPY $vgpr0, implicit $exec
71 ; GFX908-NEXT: renamable $agpr2 = COPY $vgpr0, implicit $exec
72 ; GFX908-NEXT: S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
74 ; GFX90A-LABEL: name: propagate_vgpr_to_agpr
75 ; GFX90A: liveins: $vgpr0
77 ; GFX90A-NEXT: renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
78 ; GFX90A-NEXT: renamable $agpr1 = COPY $vgpr0, implicit $exec
79 ; GFX90A-NEXT: renamable $agpr2 = COPY $vgpr0, implicit $exec
80 ; GFX90A-NEXT: S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
81 renamable $agpr0 = COPY renamable $vgpr0, implicit $exec
82 renamable $agpr1 = COPY renamable $agpr0, implicit $exec
83 renamable $agpr2 = COPY renamable $agpr0, implicit $exec
84 S_ENDPGM 0, implicit $agpr0, implicit $agpr1, implicit $agpr2
87 name: propagate_agpr_to_vgpr
93 ; GFX908-LABEL: name: propagate_agpr_to_vgpr
94 ; GFX908: liveins: $agpr0
96 ; GFX908-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
97 ; GFX908-NEXT: renamable $vgpr1 = COPY $agpr0, implicit $exec
98 ; GFX908-NEXT: renamable $vgpr2 = COPY $agpr0, implicit $exec
99 ; GFX908-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2
101 ; GFX90A-LABEL: name: propagate_agpr_to_vgpr
102 ; GFX90A: liveins: $agpr0
103 ; GFX90A-NEXT: {{ $}}
104 ; GFX90A-NEXT: renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
105 ; GFX90A-NEXT: renamable $vgpr1 = COPY $agpr0, implicit $exec
106 ; GFX90A-NEXT: renamable $vgpr2 = COPY $agpr0, implicit $exec
107 ; GFX90A-NEXT: S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2
108 renamable $vgpr0 = COPY renamable $agpr0, implicit $exec
109 renamable $vgpr1 = COPY renamable $vgpr0, implicit $exec
110 renamable $vgpr2 = COPY renamable $vgpr0, implicit $exec
111 S_ENDPGM 0, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2