1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=si-fix-sgpr-copies -verify-machineinstrs -o - %s | FileCheck --check-prefix=GCN %s
5 name: global_load_saddr_to_valu
6 tracksRegLiveness: true
8 ; GCN-LABEL: name: global_load_saddr_to_valu
10 ; GCN: successors: %bb.1(0x80000000)
11 ; GCN: liveins: $vgpr0_vgpr1
12 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
14 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
15 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %7, %bb.1
16 ; GCN: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[PHI]], 0, 0, implicit $exec
17 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
18 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
19 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
20 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
21 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
22 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE]], implicit-def $vcc, implicit $exec
23 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]], implicit $exec
24 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
25 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
30 %0:sreg_64 = COPY $vgpr0_vgpr1
33 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
34 %3:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
35 %4:vgpr_32 = GLOBAL_LOAD_DWORD_SADDR %1, %3, 0, 0, implicit $exec
36 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
37 S_CMP_LG_U64 %2, 0, implicit-def $scc
38 S_CBRANCH_SCC1 %bb.1, implicit $scc
45 name: global_load_saddr_to_valu_non_zero_vaddr
46 tracksRegLiveness: true
48 ; GCN-LABEL: name: global_load_saddr_to_valu_non_zero_vaddr
50 ; GCN: successors: %bb.1(0x80000000)
51 ; GCN: liveins: $vgpr0_vgpr1
52 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
54 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
55 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %7, %bb.1
56 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1, implicit $exec
57 ; GCN: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub0, implicit $exec
58 ; GCN: [[V_READFIRSTLANE_B32_1:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub1, implicit $exec
59 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[V_READFIRSTLANE_B32_]], %subreg.sub0, [[V_READFIRSTLANE_B32_1]], %subreg.sub1
60 ; GCN: [[GLOBAL_LOAD_DWORD_SADDR:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD_SADDR [[REG_SEQUENCE]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec
61 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
62 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
63 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
64 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
65 ; GCN: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
66 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE1]], implicit-def $vcc, implicit $exec
67 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]], implicit $exec
68 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
69 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
74 %0:sreg_64 = COPY $vgpr0_vgpr1
77 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
78 %3:vgpr_32 = V_MOV_B32_e32 1, implicit $exec
79 %4:vgpr_32 = GLOBAL_LOAD_DWORD_SADDR %1, %3, 0, 0, implicit $exec
80 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
81 S_CMP_LG_U64 %2, 0, implicit-def $scc
82 S_CBRANCH_SCC1 %bb.1, implicit $scc
90 name: global_load_saddr_to_valu_undef_vaddr
91 tracksRegLiveness: true
93 ; GCN-LABEL: name: global_load_saddr_to_valu_undef_vaddr
95 ; GCN: successors: %bb.1(0x80000000)
96 ; GCN: liveins: $vgpr0_vgpr1
97 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
99 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
100 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %7, %bb.1
101 ; GCN: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub0, implicit $exec
102 ; GCN: [[V_READFIRSTLANE_B32_1:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub1, implicit $exec
103 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[V_READFIRSTLANE_B32_]], %subreg.sub0, [[V_READFIRSTLANE_B32_1]], %subreg.sub1
104 ; GCN: [[GLOBAL_LOAD_DWORD_SADDR:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD_SADDR [[REG_SEQUENCE]], undef %4:vgpr_32, 0, 0, implicit $exec
105 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
106 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
107 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
108 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
109 ; GCN: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
110 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE1]], implicit-def $vcc, implicit $exec
111 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]], implicit $exec
112 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
113 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
117 liveins: $vgpr0_vgpr1
118 %0:sreg_64 = COPY $vgpr0_vgpr1
121 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
122 %4:vgpr_32 = GLOBAL_LOAD_DWORD_SADDR %1, undef %3:vgpr_32, 0, 0, implicit $exec
123 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
124 S_CMP_LG_U64 %2, 0, implicit-def $scc
125 S_CBRANCH_SCC1 %bb.1, implicit $scc
132 name: global_store_saddr_to_valu
133 tracksRegLiveness: true
135 ; GCN-LABEL: name: global_store_saddr_to_valu
137 ; GCN: successors: %bb.1(0x80000000)
138 ; GCN: liveins: $vgpr0_vgpr1
139 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
141 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
142 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %7, %bb.1
143 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
144 ; GCN: GLOBAL_STORE_DWORD [[PHI]], [[DEF]], 0, 0, implicit $exec
145 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
146 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
147 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
148 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
149 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
150 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE]], implicit-def $vcc, implicit $exec
151 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]], implicit $exec
152 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
153 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
157 liveins: $vgpr0_vgpr1
158 %0:sreg_64 = COPY $vgpr0_vgpr1
161 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
162 %3:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
163 %4:vgpr_32 = IMPLICIT_DEF
164 GLOBAL_STORE_DWORD_SADDR %3, %4, %1, 0, 0, implicit $exec
165 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
166 S_CMP_LG_U64 %2, 0, implicit-def $scc
167 S_CBRANCH_SCC1 %bb.1, implicit $scc
174 name: global_addtid_load_saddr_to_valu
175 tracksRegLiveness: true
177 ; GCN-LABEL: name: global_addtid_load_saddr_to_valu
179 ; GCN: successors: %bb.1(0x80000000)
180 ; GCN: liveins: $vgpr0_vgpr1
181 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
183 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
184 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %6, %bb.1
185 ; GCN: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub0, implicit $exec
186 ; GCN: [[V_READFIRSTLANE_B32_1:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub1, implicit $exec
187 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[V_READFIRSTLANE_B32_]], %subreg.sub0, [[V_READFIRSTLANE_B32_1]], %subreg.sub1
188 ; GCN: [[GLOBAL_LOAD_DWORD_ADDTID_SADDR:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD_ADDTID_SADDR [[REG_SEQUENCE]], 0, 0, implicit $exec
189 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
190 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
191 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
192 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
193 ; GCN: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
194 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE1]], implicit-def $vcc, implicit $exec
195 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]], implicit $exec
196 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
197 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
201 liveins: $vgpr0_vgpr1
202 %0:sreg_64 = COPY $vgpr0_vgpr1
205 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
206 %4:vgpr_32 = GLOBAL_LOAD_DWORD_ADDTID_SADDR %1, 0, 0, implicit $exec
207 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
208 S_CMP_LG_U64 %2, 0, implicit-def $scc
209 S_CBRANCH_SCC1 %bb.1, implicit $scc
216 name: global_store_addtid_saddr_to_valu
217 tracksRegLiveness: true
219 ; GCN-LABEL: name: global_store_addtid_saddr_to_valu
221 ; GCN: successors: %bb.1(0x80000000)
222 ; GCN: liveins: $vgpr0_vgpr1
223 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
225 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
226 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %6, %bb.1
227 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
228 ; GCN: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub0, implicit $exec
229 ; GCN: [[V_READFIRSTLANE_B32_1:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[PHI]].sub1, implicit $exec
230 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[V_READFIRSTLANE_B32_]], %subreg.sub0, [[V_READFIRSTLANE_B32_1]], %subreg.sub1
231 ; GCN: GLOBAL_STORE_DWORD_ADDTID_SADDR [[DEF]], [[REG_SEQUENCE]], 0, 0, implicit $exec
232 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
233 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
234 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
235 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
236 ; GCN: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
237 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE1]], implicit-def $vcc, implicit $exec
238 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]], implicit $exec
239 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
240 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
244 liveins: $vgpr0_vgpr1
245 %0:sreg_64 = COPY $vgpr0_vgpr1
248 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
249 %4:vgpr_32 = IMPLICIT_DEF
250 GLOBAL_STORE_DWORD_ADDTID_SADDR %4, %1, 0, 0, implicit $exec
251 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
252 S_CMP_LG_U64 %2, 0, implicit-def $scc
253 S_CBRANCH_SCC1 %bb.1, implicit $scc
260 name: global_atomic_noret_saddr_to_valu
261 tracksRegLiveness: true
263 ; GCN-LABEL: name: global_atomic_noret_saddr_to_valu
265 ; GCN: successors: %bb.1(0x80000000)
266 ; GCN: liveins: $vgpr0_vgpr1
267 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
269 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
270 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %6, %bb.1
271 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
272 ; GCN: GLOBAL_ATOMIC_ADD [[PHI]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec
273 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
274 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
275 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
276 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
277 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
278 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE]], implicit-def $vcc, implicit $exec
279 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]], implicit $exec
280 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
281 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
285 liveins: $vgpr0_vgpr1
286 %0:sreg_64 = COPY $vgpr0_vgpr1
289 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
290 %3:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
291 GLOBAL_ATOMIC_ADD_SADDR %3, %3, %1, 0, 0, implicit $exec
292 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
293 S_CMP_LG_U64 %2, 0, implicit-def $scc
294 S_CBRANCH_SCC1 %bb.1, implicit $scc
301 name: global_atomic_rtn_saddr_to_valu
302 tracksRegLiveness: true
304 ; GCN-LABEL: name: global_atomic_rtn_saddr_to_valu
306 ; GCN: successors: %bb.1(0x80000000)
307 ; GCN: liveins: $vgpr0_vgpr1
308 ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
310 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
311 ; GCN: [[PHI:%[0-9]+]]:vreg_64 = PHI [[COPY]], %bb.0, %7, %bb.1
312 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
313 ; GCN: [[GLOBAL_ATOMIC_ADD_RTN:%[0-9]+]]:vgpr_32 = GLOBAL_ATOMIC_ADD_RTN [[PHI]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec
314 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub0
315 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[PHI]].sub1
316 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY1]], 1, implicit $exec
317 ; GCN: [[V_AND_B32_e64_1:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY2]], 0, implicit $exec
318 ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_AND_B32_e64_]], %subreg.sub0, [[V_AND_B32_e64_1]], %subreg.sub1
319 ; GCN: V_CMP_NE_U64_e32 0, [[REG_SEQUENCE]], implicit-def $vcc, implicit $exec
320 ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]], implicit $exec
321 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
322 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
326 liveins: $vgpr0_vgpr1
327 %0:sreg_64 = COPY $vgpr0_vgpr1
330 %1:sreg_64 = PHI %0, %bb.0, %2, %bb.1
331 %3:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
332 %4:vgpr_32 = GLOBAL_ATOMIC_ADD_SADDR_RTN %3, %3, %1, 0, 0, implicit $exec
333 %2:sreg_64 = S_AND_B64 %1, 1, implicit-def $scc
334 S_CMP_LG_U64 %2, 0, implicit-def $scc
335 S_CBRANCH_SCC1 %bb.1, implicit $scc
342 name: scratch_load_saddr_to_valu
343 tracksRegLiveness: true
345 ; GCN-LABEL: name: scratch_load_saddr_to_valu
347 ; GCN: successors: %bb.1(0x80000000)
348 ; GCN: liveins: $vgpr0
349 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
351 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
352 ; GCN: [[PHI:%[0-9]+]]:vgpr_32 = PHI [[COPY]], %bb.0, %6, %bb.1
353 ; GCN: [[SCRATCH_LOAD_DWORD:%[0-9]+]]:vgpr_32 = SCRATCH_LOAD_DWORD [[PHI]], 0, 0, implicit $exec, implicit $flat_scr
354 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[PHI]], 1, implicit $exec
355 ; GCN: V_CMP_NE_U32_e32 0, [[V_AND_B32_e64_]], implicit-def $vcc, implicit $exec
356 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[V_AND_B32_e64_]], implicit $exec
357 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
358 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
363 %0:sgpr_32 = COPY $vgpr0
366 %1:sgpr_32 = PHI %0, %bb.0, %2, %bb.1
367 %4:vgpr_32 = SCRATCH_LOAD_DWORD_SADDR %1, 0, 0, implicit $exec, implicit $flat_scr
368 %2:sgpr_32 = S_AND_B32 %1, 1, implicit-def $scc
369 S_CMP_LG_U32 %2, 0, implicit-def $scc
370 S_CBRANCH_SCC1 %bb.1, implicit $scc
377 name: scratch_store_saddr_to_valu
378 tracksRegLiveness: true
380 ; GCN-LABEL: name: scratch_store_saddr_to_valu
382 ; GCN: successors: %bb.1(0x80000000)
383 ; GCN: liveins: $vgpr0
384 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
386 ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
387 ; GCN: [[PHI:%[0-9]+]]:vgpr_32 = PHI [[COPY]], %bb.0, %6, %bb.1
388 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
389 ; GCN: SCRATCH_STORE_DWORD [[DEF]], [[PHI]], 0, 0, implicit $exec, implicit $flat_scr
390 ; GCN: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[PHI]], 1, implicit $exec
391 ; GCN: V_CMP_NE_U32_e32 0, [[V_AND_B32_e64_]], implicit-def $vcc, implicit $exec
392 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[V_AND_B32_e64_]], implicit $exec
393 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
394 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
399 %0:sgpr_32 = COPY $vgpr0
402 %1:sgpr_32 = PHI %0, %bb.0, %2, %bb.1
403 %4:vgpr_32 = IMPLICIT_DEF
404 SCRATCH_STORE_DWORD_SADDR %4, %1, 0, 0, implicit $exec, implicit $flat_scr
405 %2:sgpr_32 = S_AND_B32 %1, 1, implicit-def $scc
406 S_CMP_LG_U32 %2, 0, implicit-def $scc
407 S_CBRANCH_SCC1 %bb.1, implicit $scc