1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass=liveintervals,amdgpu-pre-ra-optimizations %s -o - | FileCheck -check-prefix=GCN %s
5 name: combine_sreg64_inits
6 tracksRegLiveness: true
9 ; GCN-LABEL: name: combine_sreg64_inits
10 ; GCN: dead [[S_MOV_B:%[0-9]+]]:sgpr_64 = S_MOV_B64_IMM_PSEUDO 8589934593
12 undef %0.sub0:sgpr_64 = S_MOV_B32 1
14 %0.sub1:sgpr_64 = S_MOV_B32 2
17 name: combine_sreg64_inits_swap
18 tracksRegLiveness: true
21 ; GCN-LABEL: name: combine_sreg64_inits_swap
22 ; GCN: dead [[S_MOV_B:%[0-9]+]]:sgpr_64 = S_MOV_B64_IMM_PSEUDO 8589934593
24 undef %0.sub1:sgpr_64 = S_MOV_B32 2
26 %0.sub0:sgpr_64 = S_MOV_B32 1
29 name: sreg64_subreg_copy_0
30 tracksRegLiveness: true
33 ; GCN-LABEL: name: sreg64_subreg_copy_0
34 ; GCN: [[DEF:%[0-9]+]]:sgpr_32 = IMPLICIT_DEF
35 ; GCN-NEXT: undef [[COPY:%[0-9]+]].sub0:sgpr_64 = COPY [[DEF]]
36 ; GCN-NEXT: [[COPY:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
37 ; GCN-NEXT: dead [[COPY:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
38 %0:sgpr_32 = IMPLICIT_DEF
39 undef %1.sub0:sgpr_64 = COPY %0:sgpr_32
40 %1.sub0:sgpr_64 = S_MOV_B32 1
41 %1.sub1:sgpr_64 = S_MOV_B32 2
44 name: sreg64_subreg_copy_1
45 tracksRegLiveness: true
48 ; GCN-LABEL: name: sreg64_subreg_copy_1
49 ; GCN: [[DEF:%[0-9]+]]:sgpr_32 = IMPLICIT_DEF
50 ; GCN-NEXT: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
51 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = COPY [[DEF]]
52 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
53 %0:sgpr_32 = IMPLICIT_DEF
54 undef %1.sub0:sgpr_64 = S_MOV_B32 1
55 %1.sub1:sgpr_64 = COPY %0:sgpr_32
56 %1.sub1:sgpr_64 = S_MOV_B32 2
59 name: sreg64_subreg_copy_2
60 tracksRegLiveness: true
63 ; GCN-LABEL: name: sreg64_subreg_copy_2
64 ; GCN: [[DEF:%[0-9]+]]:sgpr_32 = IMPLICIT_DEF
65 ; GCN-NEXT: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
66 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
67 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = COPY [[DEF]]
68 %0:sgpr_32 = IMPLICIT_DEF
69 undef %1.sub0:sgpr_64 = S_MOV_B32 1
70 %1.sub1:sgpr_64 = S_MOV_B32 2
71 %1.sub0:sgpr_64 = COPY %0:sgpr_32
74 name: sreg64_inits_different_blocks
75 tracksRegLiveness: true
77 ; GCN-LABEL: name: sreg64_inits_different_blocks
79 ; GCN-NEXT: successors: %bb.1(0x80000000)
81 ; GCN-NEXT: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
84 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
86 undef %0.sub0:sgpr_64 = S_MOV_B32 1
89 %0.sub1:sgpr_64 = S_MOV_B32 2
92 name: sreg64_inits_two_defs_sub1
93 tracksRegLiveness: true
96 ; GCN-LABEL: name: sreg64_inits_two_defs_sub1
97 ; GCN: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
98 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
99 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 3
100 undef %0.sub0:sgpr_64 = S_MOV_B32 1
101 %0.sub1:sgpr_64 = S_MOV_B32 2
102 %0.sub1:sgpr_64 = S_MOV_B32 3
105 name: sreg64_inits_two_defs_sub0
106 tracksRegLiveness: true
109 ; GCN-LABEL: name: sreg64_inits_two_defs_sub0
110 ; GCN: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
111 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
112 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 3
113 undef %0.sub0:sgpr_64 = S_MOV_B32 1
114 %0.sub1:sgpr_64 = S_MOV_B32 2
115 %0.sub0:sgpr_64 = S_MOV_B32 3
118 name: sreg64_inits_full_def
119 tracksRegLiveness: true
122 ; GCN-LABEL: name: sreg64_inits_full_def
123 ; GCN: dead undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1
124 ; GCN-NEXT: dead [[S_MOV_B64_:%[0-9]+]]:sgpr_64 = S_MOV_B64 3
125 undef %0.sub0:sgpr_64 = S_MOV_B32 1
126 %0:sgpr_64 = S_MOV_B64 3
129 name: sreg64_inits_imp_use
130 tracksRegLiveness: true
133 ; GCN-LABEL: name: sreg64_inits_imp_use
134 ; GCN: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1, implicit $m0
135 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
136 undef %0.sub0:sgpr_64 = S_MOV_B32 1, implicit $m0
137 %0.sub1:sgpr_64 = S_MOV_B32 2
140 name: sreg64_inits_imp_def
141 tracksRegLiveness: true
144 ; GCN-LABEL: name: sreg64_inits_imp_def
145 ; GCN: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_64 = S_MOV_B32 1, implicit-def $scc
146 ; GCN-NEXT: dead [[S_MOV_B32_:%[0-9]+]].sub1:sgpr_64 = S_MOV_B32 2
147 undef %0.sub0:sgpr_64 = S_MOV_B32 1, implicit-def $scc
148 %0.sub1:sgpr_64 = S_MOV_B32 2