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
5 # RUN: llc -march=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
9 name: atomic_store_flat_s32_seq_cst
12 tracksRegLiveness: true
16 liveins: $vgpr0, $vgpr1_vgpr2
18 ; GFX7-LABEL: name: atomic_store_flat_s32_seq_cst
19 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
21 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
22 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr1_vgpr2
23 ; GFX7-NEXT: FLAT_STORE_DWORD [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s32))
24 ; GFX9-LABEL: name: atomic_store_flat_s32_seq_cst
25 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
27 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
28 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr1_vgpr2
29 ; GFX9-NEXT: FLAT_STORE_DWORD [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s32))
30 %0:vgpr(s32) = COPY $vgpr0
31 %1:vgpr(p0) = COPY $vgpr1_vgpr2
32 G_STORE %0, %1 :: (store seq_cst (s32), align 4, addrspace 0)
38 name: atomic_store_flat_v2s16_seq_cst
41 tracksRegLiveness: true
45 liveins: $vgpr0, $vgpr1_vgpr2
47 ; GFX7-LABEL: name: atomic_store_flat_v2s16_seq_cst
48 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
50 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
51 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
52 ; GFX7-NEXT: G_STORE [[COPY]](<2 x s16>), [[COPY1]](p0) :: (store seq_cst (<2 x s16>))
53 ; GFX9-LABEL: name: atomic_store_flat_v2s16_seq_cst
54 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
56 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
57 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
58 ; GFX9-NEXT: G_STORE [[COPY]](<2 x s16>), [[COPY1]](p0) :: (store seq_cst (<2 x s16>))
59 %0:vgpr(<2 x s16>) = COPY $vgpr0
60 %1:vgpr(p0) = COPY $vgpr1_vgpr2
61 G_STORE %0, %1 :: (store seq_cst (<2 x s16>), align 4, addrspace 0)
67 name: atomic_store_flat_p3_seq_cst
70 tracksRegLiveness: true
74 liveins: $vgpr0, $vgpr1_vgpr2
76 ; GFX7-LABEL: name: atomic_store_flat_p3_seq_cst
77 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
79 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
80 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
81 ; GFX7-NEXT: G_STORE [[COPY]](p3), [[COPY1]](p0) :: (store seq_cst (p3))
82 ; GFX9-LABEL: name: atomic_store_flat_p3_seq_cst
83 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
85 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
86 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
87 ; GFX9-NEXT: G_STORE [[COPY]](p3), [[COPY1]](p0) :: (store seq_cst (p3))
88 %0:vgpr(p3) = COPY $vgpr0
89 %1:vgpr(p0) = COPY $vgpr1_vgpr2
90 G_STORE %0, %1 :: (store seq_cst (p3), align 4, addrspace 0)
96 name: atomic_store_flat_p5_seq_cst
99 tracksRegLiveness: true
103 liveins: $vgpr0, $vgpr1_vgpr2
105 ; GFX7-LABEL: name: atomic_store_flat_p5_seq_cst
106 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
108 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p5) = COPY $vgpr0
109 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
110 ; GFX7-NEXT: G_STORE [[COPY]](p5), [[COPY1]](p0) :: (store seq_cst (p5))
111 ; GFX9-LABEL: name: atomic_store_flat_p5_seq_cst
112 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
114 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p5) = COPY $vgpr0
115 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
116 ; GFX9-NEXT: G_STORE [[COPY]](p5), [[COPY1]](p0) :: (store seq_cst (p5))
117 %0:vgpr(p5) = COPY $vgpr0
118 %1:vgpr(p0) = COPY $vgpr1_vgpr2
119 G_STORE %0, %1 :: (store seq_cst (p5), align 4, addrspace 0)
125 name: atomic_store_flat_p6_seq_cst
127 regBankSelected: true
128 tracksRegLiveness: true
132 liveins: $vgpr0, $vgpr1_vgpr2
134 ; GFX7-LABEL: name: atomic_store_flat_p6_seq_cst
135 ; GFX7: liveins: $vgpr0, $vgpr1_vgpr2
137 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p6) = COPY $vgpr0
138 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
139 ; GFX7-NEXT: G_STORE [[COPY]](p6), [[COPY1]](p0) :: (store seq_cst (p6))
140 ; GFX9-LABEL: name: atomic_store_flat_p6_seq_cst
141 ; GFX9: liveins: $vgpr0, $vgpr1_vgpr2
143 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p6) = COPY $vgpr0
144 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr1_vgpr2
145 ; GFX9-NEXT: G_STORE [[COPY]](p6), [[COPY1]](p0) :: (store seq_cst (p6))
146 %0:vgpr(p6) = COPY $vgpr0
147 %1:vgpr(p0) = COPY $vgpr1_vgpr2
148 G_STORE %0, %1 :: (store seq_cst (p6), align 4, addrspace 0)
154 name: atomic_store_flat_s64_seq_cst
156 regBankSelected: true
157 tracksRegLiveness: true
161 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
163 ; GFX7-LABEL: name: atomic_store_flat_s64_seq_cst
164 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
166 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
167 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
168 ; GFX7-NEXT: FLAT_STORE_DWORDX2 [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s64))
169 ; GFX9-LABEL: name: atomic_store_flat_s64_seq_cst
170 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
172 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
173 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
174 ; GFX9-NEXT: FLAT_STORE_DWORDX2 [[COPY1]], [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (store seq_cst (s64))
175 %0:vgpr(s64) = COPY $vgpr0_vgpr1
176 %1:vgpr(p0) = COPY $vgpr2_vgpr3
177 G_STORE %0, %1 :: (store seq_cst (s64), align 8, addrspace 0)
183 name: atomic_store_flat_v2s32_seq_cst
185 regBankSelected: true
186 tracksRegLiveness: true
190 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
192 ; GFX7-LABEL: name: atomic_store_flat_v2s32_seq_cst
193 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
195 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
196 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
197 ; GFX7-NEXT: G_STORE [[COPY]](<2 x s32>), [[COPY1]](p0) :: (store seq_cst (<2 x s32>))
198 ; GFX9-LABEL: name: atomic_store_flat_v2s32_seq_cst
199 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
201 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
202 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
203 ; GFX9-NEXT: G_STORE [[COPY]](<2 x s32>), [[COPY1]](p0) :: (store seq_cst (<2 x s32>))
204 %0:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
205 %1:vgpr(p0) = COPY $vgpr2_vgpr3
206 G_STORE %0, %1 :: (store seq_cst (<2 x s32>), align 8, addrspace 0)
212 name: atomic_store_flat_v4s16_seq_cst
214 regBankSelected: true
215 tracksRegLiveness: true
219 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
221 ; GFX7-LABEL: name: atomic_store_flat_v4s16_seq_cst
222 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
224 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
225 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
226 ; GFX7-NEXT: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p0) :: (store seq_cst (<4 x s16>))
227 ; GFX9-LABEL: name: atomic_store_flat_v4s16_seq_cst
228 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
230 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
231 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
232 ; GFX9-NEXT: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p0) :: (store seq_cst (<4 x s16>))
233 %0:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
234 %1:vgpr(p0) = COPY $vgpr2_vgpr3
235 G_STORE %0, %1 :: (store seq_cst (<4 x s16>), align 8, addrspace 0)
241 name: atomic_store_flat_p0_seq_cst
243 regBankSelected: true
244 tracksRegLiveness: true
248 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
250 ; GFX7-LABEL: name: atomic_store_flat_p0_seq_cst
251 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
253 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
254 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
255 ; GFX7-NEXT: G_STORE [[COPY]](p0), [[COPY1]](p0) :: (store seq_cst (p0))
256 ; GFX9-LABEL: name: atomic_store_flat_p0_seq_cst
257 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
259 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
260 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
261 ; GFX9-NEXT: G_STORE [[COPY]](p0), [[COPY1]](p0) :: (store seq_cst (p0))
262 %0:vgpr(p0) = COPY $vgpr0_vgpr1
263 %1:vgpr(p0) = COPY $vgpr2_vgpr3
264 G_STORE %0, %1 :: (store seq_cst (p0), align 8, addrspace 0)
269 name: atomic_store_flat_p1_seq_cst
271 regBankSelected: true
272 tracksRegLiveness: true
276 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
278 ; GFX7-LABEL: name: atomic_store_flat_p1_seq_cst
279 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
281 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
282 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
283 ; GFX7-NEXT: G_STORE [[COPY]](p1), [[COPY1]](p0) :: (store seq_cst (p1))
284 ; GFX9-LABEL: name: atomic_store_flat_p1_seq_cst
285 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
287 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
288 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr(p0) = COPY $vgpr2_vgpr3
289 ; GFX9-NEXT: G_STORE [[COPY]](p1), [[COPY1]](p0) :: (store seq_cst (p1))
290 %0:vgpr(p1) = COPY $vgpr0_vgpr1
291 %1:vgpr(p0) = COPY $vgpr2_vgpr3
292 G_STORE %0, %1 :: (store seq_cst (p1), align 8, addrspace 0)