1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
3 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
4 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
8 name: atomic_store_flat_s32_seq_cst
11 tracksRegLiveness: true
15 liveins: $vgpr0, $vgpr1_vgpr2
17 ; GFX7-LABEL: name: atomic_store_flat_s32_seq_cst
18 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
20 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
21 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr1_vgpr2
22 ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s32))
23 ; GFX9-LABEL: name: atomic_store_flat_s32_seq_cst
24 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
26 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
27 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr1_vgpr2
28 ; GFX9-NEXT: FLAT_STORE_DWORD [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s32))
29 %0:vgpr(s32) = COPY $vgpr0
30 %1:vgpr(p0) = COPY $vgpr1_vgpr2
31 G_STORE %0, %1 :: (store seq_cst (s32), align 4, addrspace 0)
37 name: atomic_store_flat_v2s16_seq_cst
40 tracksRegLiveness: true
44 liveins: $vgpr0, $vgpr1_vgpr2
46 ; GFX7-LABEL: name: atomic_store_flat_v2s16_seq_cst
47 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
49 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
50 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
51 ; GFX7-NEXT: G_STORE [[COPY]](<2 x s16>), [[COPY1]](p0) :: (store seq_cst (<2 x s16>))
52 ; GFX9-LABEL: name: atomic_store_flat_v2s16_seq_cst
53 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
55 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
56 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
57 ; GFX9-NEXT: G_STORE [[COPY]](<2 x s16>), [[COPY1]](p0) :: (store seq_cst (<2 x s16>))
58 %0:vgpr(<2 x s16>) = COPY $vgpr0
59 %1:vgpr(p0) = COPY $vgpr1_vgpr2
60 G_STORE %0, %1 :: (store seq_cst (<2 x s16>), align 4, addrspace 0)
66 name: atomic_store_flat_p3_seq_cst
69 tracksRegLiveness: true
73 liveins: $vgpr0, $vgpr1_vgpr2
75 ; GFX7-LABEL: name: atomic_store_flat_p3_seq_cst
76 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
78 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
79 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
80 ; GFX7-NEXT: G_STORE [[COPY]](p3), [[COPY1]](p0) :: (store seq_cst (p3))
81 ; GFX9-LABEL: name: atomic_store_flat_p3_seq_cst
82 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
84 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
85 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
86 ; GFX9-NEXT: G_STORE [[COPY]](p3), [[COPY1]](p0) :: (store seq_cst (p3))
87 %0:vgpr(p3) = COPY $vgpr0
88 %1:vgpr(p0) = COPY $vgpr1_vgpr2
89 G_STORE %0, %1 :: (store seq_cst (p3), align 4, addrspace 0)
95 name: atomic_store_flat_p5_seq_cst
98 tracksRegLiveness: true
102 liveins: $vgpr0, $vgpr1_vgpr2
104 ; GFX7-LABEL: name: atomic_store_flat_p5_seq_cst
105 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
107 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p5) = COPY $vgpr0
108 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
109 ; GFX7-NEXT: G_STORE [[COPY]](p5), [[COPY1]](p0) :: (store seq_cst (p5))
110 ; GFX9-LABEL: name: atomic_store_flat_p5_seq_cst
111 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
113 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p5) = COPY $vgpr0
114 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
115 ; GFX9-NEXT: G_STORE [[COPY]](p5), [[COPY1]](p0) :: (store seq_cst (p5))
116 %0:vgpr(p5) = COPY $vgpr0
117 %1:vgpr(p0) = COPY $vgpr1_vgpr2
118 G_STORE %0, %1 :: (store seq_cst (p5), align 4, addrspace 0)
124 name: atomic_store_flat_p6_seq_cst
126 regBankSelected: true
127 tracksRegLiveness: true
131 liveins: $vgpr0, $vgpr1_vgpr2
133 ; GFX7-LABEL: name: atomic_store_flat_p6_seq_cst
134 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
136 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p6) = COPY $vgpr0
137 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
138 ; GFX7-NEXT: G_STORE [[COPY]](p6), [[COPY1]](p0) :: (store seq_cst (p6))
139 ; GFX9-LABEL: name: atomic_store_flat_p6_seq_cst
140 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
142 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p6) = COPY $vgpr0
143 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
144 ; GFX9-NEXT: G_STORE [[COPY]](p6), [[COPY1]](p0) :: (store seq_cst (p6))
145 %0:vgpr(p6) = COPY $vgpr0
146 %1:vgpr(p0) = COPY $vgpr1_vgpr2
147 G_STORE %0, %1 :: (store seq_cst (p6), align 4, addrspace 0)
153 name: atomic_store_flat_s64_seq_cst
155 regBankSelected: true
156 tracksRegLiveness: true
160 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
162 ; GFX7-LABEL: name: atomic_store_flat_s64_seq_cst
163 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
165 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
166 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
167 ; GFX7-NEXT: FLAT_STORE_DWORDX2 [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s64))
168 ; GFX9-LABEL: name: atomic_store_flat_s64_seq_cst
169 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
171 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
172 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
173 ; GFX9-NEXT: FLAT_STORE_DWORDX2 [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s64))
174 %0:vgpr(s64) = COPY $vgpr0_vgpr1
175 %1:vgpr(p0) = COPY $vgpr2_vgpr3
176 G_STORE %0, %1 :: (store seq_cst (s64), align 8, addrspace 0)
182 name: atomic_store_flat_v2s32_seq_cst
184 regBankSelected: true
185 tracksRegLiveness: true
189 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
191 ; GFX7-LABEL: name: atomic_store_flat_v2s32_seq_cst
192 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
194 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
195 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
196 ; GFX7-NEXT: G_STORE [[COPY]](<2 x s32>), [[COPY1]](p0) :: (store seq_cst (<2 x s32>))
197 ; GFX9-LABEL: name: atomic_store_flat_v2s32_seq_cst
198 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
200 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
201 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
202 ; GFX9-NEXT: G_STORE [[COPY]](<2 x s32>), [[COPY1]](p0) :: (store seq_cst (<2 x s32>))
203 %0:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
204 %1:vgpr(p0) = COPY $vgpr2_vgpr3
205 G_STORE %0, %1 :: (store seq_cst (<2 x s32>), align 8, addrspace 0)
211 name: atomic_store_flat_v4s16_seq_cst
213 regBankSelected: true
214 tracksRegLiveness: true
218 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
220 ; GFX7-LABEL: name: atomic_store_flat_v4s16_seq_cst
221 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
223 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
224 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
225 ; GFX7-NEXT: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p0) :: (store seq_cst (<4 x s16>))
226 ; GFX9-LABEL: name: atomic_store_flat_v4s16_seq_cst
227 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
229 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
230 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
231 ; GFX9-NEXT: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p0) :: (store seq_cst (<4 x s16>))
232 %0:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
233 %1:vgpr(p0) = COPY $vgpr2_vgpr3
234 G_STORE %0, %1 :: (store seq_cst (<4 x s16>), align 8, addrspace 0)
240 name: atomic_store_flat_p0_seq_cst
242 regBankSelected: true
243 tracksRegLiveness: true
247 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
249 ; GFX7-LABEL: name: atomic_store_flat_p0_seq_cst
250 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
252 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
253 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
254 ; GFX7-NEXT: G_STORE [[COPY]](p0), [[COPY1]](p0) :: (store seq_cst (p0))
255 ; GFX9-LABEL: name: atomic_store_flat_p0_seq_cst
256 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
258 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
259 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
260 ; GFX9-NEXT: G_STORE [[COPY]](p0), [[COPY1]](p0) :: (store seq_cst (p0))
261 %0:vgpr(p0) = COPY $vgpr0_vgpr1
262 %1:vgpr(p0) = COPY $vgpr2_vgpr3
263 G_STORE %0, %1 :: (store seq_cst (p0), align 8, addrspace 0)
268 name: atomic_store_flat_p1_seq_cst
270 regBankSelected: true
271 tracksRegLiveness: true
275 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
277 ; GFX7-LABEL: name: atomic_store_flat_p1_seq_cst
278 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
280 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
281 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
282 ; GFX7-NEXT: G_STORE [[COPY]](p1), [[COPY1]](p0) :: (store seq_cst (p1))
283 ; GFX9-LABEL: name: atomic_store_flat_p1_seq_cst
284 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
286 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
287 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
288 ; GFX9-NEXT: G_STORE [[COPY]](p1), [[COPY1]](p0) :: (store seq_cst (p1))
289 %0:vgpr(p1) = COPY $vgpr0_vgpr1
290 %1:vgpr(p0) = COPY $vgpr2_vgpr3
291 G_STORE %0, %1 :: (store seq_cst (p1), align 8, addrspace 0)