1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -o - %s | FileCheck -check-prefix=GFX6 %s
3 ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -o - %s | FileCheck -check-prefix=GFX8 %s
4 ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -o - %s | FileCheck -check-prefix=GFX10 %s
5 ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -o - %s | FileCheck -check-prefix=GFX11 %s
7 define amdgpu_ps void @image_store_f32(<8 x i32> inreg %rsrc, i32 %s, i32 %t, float %data) {
8 ; GFX6-LABEL: image_store_f32:
10 ; GFX6-NEXT: s_mov_b32 s0, s2
11 ; GFX6-NEXT: s_mov_b32 s1, s3
12 ; GFX6-NEXT: s_mov_b32 s2, s4
13 ; GFX6-NEXT: s_mov_b32 s3, s5
14 ; GFX6-NEXT: s_mov_b32 s4, s6
15 ; GFX6-NEXT: s_mov_b32 s5, s7
16 ; GFX6-NEXT: s_mov_b32 s6, s8
17 ; GFX6-NEXT: s_mov_b32 s7, s9
18 ; GFX6-NEXT: image_store v2, v[0:1], s[0:7] dmask:0x1 unorm
21 ; GFX8-LABEL: image_store_f32:
23 ; GFX8-NEXT: s_mov_b32 s0, s2
24 ; GFX8-NEXT: s_mov_b32 s1, s3
25 ; GFX8-NEXT: s_mov_b32 s2, s4
26 ; GFX8-NEXT: s_mov_b32 s3, s5
27 ; GFX8-NEXT: s_mov_b32 s4, s6
28 ; GFX8-NEXT: s_mov_b32 s5, s7
29 ; GFX8-NEXT: s_mov_b32 s6, s8
30 ; GFX8-NEXT: s_mov_b32 s7, s9
31 ; GFX8-NEXT: image_store v2, v[0:1], s[0:7] dmask:0x1 unorm
34 ; GFX10-LABEL: image_store_f32:
36 ; GFX10-NEXT: s_mov_b32 s0, s2
37 ; GFX10-NEXT: s_mov_b32 s1, s3
38 ; GFX10-NEXT: s_mov_b32 s2, s4
39 ; GFX10-NEXT: s_mov_b32 s3, s5
40 ; GFX10-NEXT: s_mov_b32 s4, s6
41 ; GFX10-NEXT: s_mov_b32 s5, s7
42 ; GFX10-NEXT: s_mov_b32 s6, s8
43 ; GFX10-NEXT: s_mov_b32 s7, s9
44 ; GFX10-NEXT: image_store v2, v[0:1], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
45 ; GFX10-NEXT: s_endpgm
47 ; GFX11-LABEL: image_store_f32:
49 ; GFX11-NEXT: s_mov_b32 s0, s2
50 ; GFX11-NEXT: s_mov_b32 s1, s3
51 ; GFX11-NEXT: s_mov_b32 s2, s4
52 ; GFX11-NEXT: s_mov_b32 s3, s5
53 ; GFX11-NEXT: s_mov_b32 s4, s6
54 ; GFX11-NEXT: s_mov_b32 s5, s7
55 ; GFX11-NEXT: s_mov_b32 s6, s8
56 ; GFX11-NEXT: s_mov_b32 s7, s9
57 ; GFX11-NEXT: image_store v2, v[0:1], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
59 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
60 ; GFX11-NEXT: s_endpgm
61 call void @llvm.amdgcn.image.store.2d.f32.i32(float %data, i32 1, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
65 define amdgpu_ps void @image_store_v2f32(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <2 x float> %in) {
66 ; GFX6-LABEL: image_store_v2f32:
68 ; GFX6-NEXT: s_mov_b32 s0, s2
69 ; GFX6-NEXT: s_mov_b32 s1, s3
70 ; GFX6-NEXT: s_mov_b32 s2, s4
71 ; GFX6-NEXT: s_mov_b32 s3, s5
72 ; GFX6-NEXT: s_mov_b32 s4, s6
73 ; GFX6-NEXT: s_mov_b32 s5, s7
74 ; GFX6-NEXT: s_mov_b32 s6, s8
75 ; GFX6-NEXT: s_mov_b32 s7, s9
76 ; GFX6-NEXT: image_store v[2:3], v[0:1], s[0:7] dmask:0x3 unorm
79 ; GFX8-LABEL: image_store_v2f32:
81 ; GFX8-NEXT: s_mov_b32 s0, s2
82 ; GFX8-NEXT: s_mov_b32 s1, s3
83 ; GFX8-NEXT: s_mov_b32 s2, s4
84 ; GFX8-NEXT: s_mov_b32 s3, s5
85 ; GFX8-NEXT: s_mov_b32 s4, s6
86 ; GFX8-NEXT: s_mov_b32 s5, s7
87 ; GFX8-NEXT: s_mov_b32 s6, s8
88 ; GFX8-NEXT: s_mov_b32 s7, s9
89 ; GFX8-NEXT: image_store v[2:3], v[0:1], s[0:7] dmask:0x3 unorm
92 ; GFX10-LABEL: image_store_v2f32:
94 ; GFX10-NEXT: s_mov_b32 s0, s2
95 ; GFX10-NEXT: s_mov_b32 s1, s3
96 ; GFX10-NEXT: s_mov_b32 s2, s4
97 ; GFX10-NEXT: s_mov_b32 s3, s5
98 ; GFX10-NEXT: s_mov_b32 s4, s6
99 ; GFX10-NEXT: s_mov_b32 s5, s7
100 ; GFX10-NEXT: s_mov_b32 s6, s8
101 ; GFX10-NEXT: s_mov_b32 s7, s9
102 ; GFX10-NEXT: image_store v[2:3], v[0:1], s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_2D unorm
103 ; GFX10-NEXT: s_endpgm
105 ; GFX11-LABEL: image_store_v2f32:
107 ; GFX11-NEXT: s_mov_b32 s0, s2
108 ; GFX11-NEXT: s_mov_b32 s1, s3
109 ; GFX11-NEXT: s_mov_b32 s2, s4
110 ; GFX11-NEXT: s_mov_b32 s3, s5
111 ; GFX11-NEXT: s_mov_b32 s4, s6
112 ; GFX11-NEXT: s_mov_b32 s5, s7
113 ; GFX11-NEXT: s_mov_b32 s6, s8
114 ; GFX11-NEXT: s_mov_b32 s7, s9
115 ; GFX11-NEXT: image_store v[2:3], v[0:1], s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_2D unorm
116 ; GFX11-NEXT: s_nop 0
117 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
118 ; GFX11-NEXT: s_endpgm
119 call void @llvm.amdgcn.image.store.2d.v2f32.i32(<2 x float> %in, i32 3, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
123 define amdgpu_ps void @image_store_v3f32(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <3 x float> %in) {
124 ; GFX6-LABEL: image_store_v3f32:
126 ; GFX6-NEXT: s_mov_b32 s0, s2
127 ; GFX6-NEXT: s_mov_b32 s1, s3
128 ; GFX6-NEXT: s_mov_b32 s2, s4
129 ; GFX6-NEXT: s_mov_b32 s3, s5
130 ; GFX6-NEXT: s_mov_b32 s4, s6
131 ; GFX6-NEXT: s_mov_b32 s5, s7
132 ; GFX6-NEXT: s_mov_b32 s6, s8
133 ; GFX6-NEXT: s_mov_b32 s7, s9
134 ; GFX6-NEXT: image_store v[2:4], v[0:1], s[0:7] dmask:0x7 unorm
135 ; GFX6-NEXT: s_endpgm
137 ; GFX8-LABEL: image_store_v3f32:
139 ; GFX8-NEXT: s_mov_b32 s0, s2
140 ; GFX8-NEXT: s_mov_b32 s1, s3
141 ; GFX8-NEXT: s_mov_b32 s2, s4
142 ; GFX8-NEXT: s_mov_b32 s3, s5
143 ; GFX8-NEXT: s_mov_b32 s4, s6
144 ; GFX8-NEXT: s_mov_b32 s5, s7
145 ; GFX8-NEXT: s_mov_b32 s6, s8
146 ; GFX8-NEXT: s_mov_b32 s7, s9
147 ; GFX8-NEXT: image_store v[2:4], v[0:1], s[0:7] dmask:0x7 unorm
148 ; GFX8-NEXT: s_endpgm
150 ; GFX10-LABEL: image_store_v3f32:
152 ; GFX10-NEXT: s_mov_b32 s0, s2
153 ; GFX10-NEXT: s_mov_b32 s1, s3
154 ; GFX10-NEXT: s_mov_b32 s2, s4
155 ; GFX10-NEXT: s_mov_b32 s3, s5
156 ; GFX10-NEXT: s_mov_b32 s4, s6
157 ; GFX10-NEXT: s_mov_b32 s5, s7
158 ; GFX10-NEXT: s_mov_b32 s6, s8
159 ; GFX10-NEXT: s_mov_b32 s7, s9
160 ; GFX10-NEXT: image_store v[2:4], v[0:1], s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_2D unorm
161 ; GFX10-NEXT: s_endpgm
163 ; GFX11-LABEL: image_store_v3f32:
165 ; GFX11-NEXT: s_mov_b32 s0, s2
166 ; GFX11-NEXT: s_mov_b32 s1, s3
167 ; GFX11-NEXT: s_mov_b32 s2, s4
168 ; GFX11-NEXT: s_mov_b32 s3, s5
169 ; GFX11-NEXT: s_mov_b32 s4, s6
170 ; GFX11-NEXT: s_mov_b32 s5, s7
171 ; GFX11-NEXT: s_mov_b32 s6, s8
172 ; GFX11-NEXT: s_mov_b32 s7, s9
173 ; GFX11-NEXT: image_store v[2:4], v[0:1], s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_2D unorm
174 ; GFX11-NEXT: s_nop 0
175 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
176 ; GFX11-NEXT: s_endpgm
177 call void @llvm.amdgcn.image.store.2d.v3f32.i32(<3 x float> %in, i32 7, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
181 define amdgpu_ps void @image_store_v4f32(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
182 ; GFX6-LABEL: image_store_v4f32:
184 ; GFX6-NEXT: s_mov_b32 s0, s2
185 ; GFX6-NEXT: s_mov_b32 s1, s3
186 ; GFX6-NEXT: s_mov_b32 s2, s4
187 ; GFX6-NEXT: s_mov_b32 s3, s5
188 ; GFX6-NEXT: s_mov_b32 s4, s6
189 ; GFX6-NEXT: s_mov_b32 s5, s7
190 ; GFX6-NEXT: s_mov_b32 s6, s8
191 ; GFX6-NEXT: s_mov_b32 s7, s9
192 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0xf unorm
193 ; GFX6-NEXT: s_endpgm
195 ; GFX8-LABEL: image_store_v4f32:
197 ; GFX8-NEXT: s_mov_b32 s0, s2
198 ; GFX8-NEXT: s_mov_b32 s1, s3
199 ; GFX8-NEXT: s_mov_b32 s2, s4
200 ; GFX8-NEXT: s_mov_b32 s3, s5
201 ; GFX8-NEXT: s_mov_b32 s4, s6
202 ; GFX8-NEXT: s_mov_b32 s5, s7
203 ; GFX8-NEXT: s_mov_b32 s6, s8
204 ; GFX8-NEXT: s_mov_b32 s7, s9
205 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0xf unorm
206 ; GFX8-NEXT: s_endpgm
208 ; GFX10-LABEL: image_store_v4f32:
210 ; GFX10-NEXT: s_mov_b32 s0, s2
211 ; GFX10-NEXT: s_mov_b32 s1, s3
212 ; GFX10-NEXT: s_mov_b32 s2, s4
213 ; GFX10-NEXT: s_mov_b32 s3, s5
214 ; GFX10-NEXT: s_mov_b32 s4, s6
215 ; GFX10-NEXT: s_mov_b32 s5, s7
216 ; GFX10-NEXT: s_mov_b32 s6, s8
217 ; GFX10-NEXT: s_mov_b32 s7, s9
218 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
219 ; GFX10-NEXT: s_endpgm
221 ; GFX11-LABEL: image_store_v4f32:
223 ; GFX11-NEXT: s_mov_b32 s0, s2
224 ; GFX11-NEXT: s_mov_b32 s1, s3
225 ; GFX11-NEXT: s_mov_b32 s2, s4
226 ; GFX11-NEXT: s_mov_b32 s3, s5
227 ; GFX11-NEXT: s_mov_b32 s4, s6
228 ; GFX11-NEXT: s_mov_b32 s5, s7
229 ; GFX11-NEXT: s_mov_b32 s6, s8
230 ; GFX11-NEXT: s_mov_b32 s7, s9
231 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
232 ; GFX11-NEXT: s_nop 0
233 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
234 ; GFX11-NEXT: s_endpgm
235 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
239 define amdgpu_ps void @image_store_v4f32_dmask_0001(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
240 ; GFX6-LABEL: image_store_v4f32_dmask_0001:
242 ; GFX6-NEXT: s_mov_b32 s0, s2
243 ; GFX6-NEXT: s_mov_b32 s1, s3
244 ; GFX6-NEXT: s_mov_b32 s2, s4
245 ; GFX6-NEXT: s_mov_b32 s3, s5
246 ; GFX6-NEXT: s_mov_b32 s4, s6
247 ; GFX6-NEXT: s_mov_b32 s5, s7
248 ; GFX6-NEXT: s_mov_b32 s6, s8
249 ; GFX6-NEXT: s_mov_b32 s7, s9
250 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x1 unorm
251 ; GFX6-NEXT: s_endpgm
253 ; GFX8-LABEL: image_store_v4f32_dmask_0001:
255 ; GFX8-NEXT: s_mov_b32 s0, s2
256 ; GFX8-NEXT: s_mov_b32 s1, s3
257 ; GFX8-NEXT: s_mov_b32 s2, s4
258 ; GFX8-NEXT: s_mov_b32 s3, s5
259 ; GFX8-NEXT: s_mov_b32 s4, s6
260 ; GFX8-NEXT: s_mov_b32 s5, s7
261 ; GFX8-NEXT: s_mov_b32 s6, s8
262 ; GFX8-NEXT: s_mov_b32 s7, s9
263 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x1 unorm
264 ; GFX8-NEXT: s_endpgm
266 ; GFX10-LABEL: image_store_v4f32_dmask_0001:
268 ; GFX10-NEXT: s_mov_b32 s0, s2
269 ; GFX10-NEXT: s_mov_b32 s1, s3
270 ; GFX10-NEXT: s_mov_b32 s2, s4
271 ; GFX10-NEXT: s_mov_b32 s3, s5
272 ; GFX10-NEXT: s_mov_b32 s4, s6
273 ; GFX10-NEXT: s_mov_b32 s5, s7
274 ; GFX10-NEXT: s_mov_b32 s6, s8
275 ; GFX10-NEXT: s_mov_b32 s7, s9
276 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
277 ; GFX10-NEXT: s_endpgm
279 ; GFX11-LABEL: image_store_v4f32_dmask_0001:
281 ; GFX11-NEXT: s_mov_b32 s0, s2
282 ; GFX11-NEXT: s_mov_b32 s1, s3
283 ; GFX11-NEXT: s_mov_b32 s2, s4
284 ; GFX11-NEXT: s_mov_b32 s3, s5
285 ; GFX11-NEXT: s_mov_b32 s4, s6
286 ; GFX11-NEXT: s_mov_b32 s5, s7
287 ; GFX11-NEXT: s_mov_b32 s6, s8
288 ; GFX11-NEXT: s_mov_b32 s7, s9
289 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
290 ; GFX11-NEXT: s_nop 0
291 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
292 ; GFX11-NEXT: s_endpgm
293 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 1, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
297 define amdgpu_ps void @image_store_v4f32_dmask_0010(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
298 ; GFX6-LABEL: image_store_v4f32_dmask_0010:
300 ; GFX6-NEXT: s_mov_b32 s0, s2
301 ; GFX6-NEXT: s_mov_b32 s1, s3
302 ; GFX6-NEXT: s_mov_b32 s2, s4
303 ; GFX6-NEXT: s_mov_b32 s3, s5
304 ; GFX6-NEXT: s_mov_b32 s4, s6
305 ; GFX6-NEXT: s_mov_b32 s5, s7
306 ; GFX6-NEXT: s_mov_b32 s6, s8
307 ; GFX6-NEXT: s_mov_b32 s7, s9
308 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x2 unorm
309 ; GFX6-NEXT: s_endpgm
311 ; GFX8-LABEL: image_store_v4f32_dmask_0010:
313 ; GFX8-NEXT: s_mov_b32 s0, s2
314 ; GFX8-NEXT: s_mov_b32 s1, s3
315 ; GFX8-NEXT: s_mov_b32 s2, s4
316 ; GFX8-NEXT: s_mov_b32 s3, s5
317 ; GFX8-NEXT: s_mov_b32 s4, s6
318 ; GFX8-NEXT: s_mov_b32 s5, s7
319 ; GFX8-NEXT: s_mov_b32 s6, s8
320 ; GFX8-NEXT: s_mov_b32 s7, s9
321 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x2 unorm
322 ; GFX8-NEXT: s_endpgm
324 ; GFX10-LABEL: image_store_v4f32_dmask_0010:
326 ; GFX10-NEXT: s_mov_b32 s0, s2
327 ; GFX10-NEXT: s_mov_b32 s1, s3
328 ; GFX10-NEXT: s_mov_b32 s2, s4
329 ; GFX10-NEXT: s_mov_b32 s3, s5
330 ; GFX10-NEXT: s_mov_b32 s4, s6
331 ; GFX10-NEXT: s_mov_b32 s5, s7
332 ; GFX10-NEXT: s_mov_b32 s6, s8
333 ; GFX10-NEXT: s_mov_b32 s7, s9
334 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_2D unorm
335 ; GFX10-NEXT: s_endpgm
337 ; GFX11-LABEL: image_store_v4f32_dmask_0010:
339 ; GFX11-NEXT: s_mov_b32 s0, s2
340 ; GFX11-NEXT: s_mov_b32 s1, s3
341 ; GFX11-NEXT: s_mov_b32 s2, s4
342 ; GFX11-NEXT: s_mov_b32 s3, s5
343 ; GFX11-NEXT: s_mov_b32 s4, s6
344 ; GFX11-NEXT: s_mov_b32 s5, s7
345 ; GFX11-NEXT: s_mov_b32 s6, s8
346 ; GFX11-NEXT: s_mov_b32 s7, s9
347 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_2D unorm
348 ; GFX11-NEXT: s_nop 0
349 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
350 ; GFX11-NEXT: s_endpgm
351 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 2, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
355 define amdgpu_ps void @image_store_v4f32_dmask_0100(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
356 ; GFX6-LABEL: image_store_v4f32_dmask_0100:
358 ; GFX6-NEXT: s_mov_b32 s0, s2
359 ; GFX6-NEXT: s_mov_b32 s1, s3
360 ; GFX6-NEXT: s_mov_b32 s2, s4
361 ; GFX6-NEXT: s_mov_b32 s3, s5
362 ; GFX6-NEXT: s_mov_b32 s4, s6
363 ; GFX6-NEXT: s_mov_b32 s5, s7
364 ; GFX6-NEXT: s_mov_b32 s6, s8
365 ; GFX6-NEXT: s_mov_b32 s7, s9
366 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x4 unorm
367 ; GFX6-NEXT: s_endpgm
369 ; GFX8-LABEL: image_store_v4f32_dmask_0100:
371 ; GFX8-NEXT: s_mov_b32 s0, s2
372 ; GFX8-NEXT: s_mov_b32 s1, s3
373 ; GFX8-NEXT: s_mov_b32 s2, s4
374 ; GFX8-NEXT: s_mov_b32 s3, s5
375 ; GFX8-NEXT: s_mov_b32 s4, s6
376 ; GFX8-NEXT: s_mov_b32 s5, s7
377 ; GFX8-NEXT: s_mov_b32 s6, s8
378 ; GFX8-NEXT: s_mov_b32 s7, s9
379 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x4 unorm
380 ; GFX8-NEXT: s_endpgm
382 ; GFX10-LABEL: image_store_v4f32_dmask_0100:
384 ; GFX10-NEXT: s_mov_b32 s0, s2
385 ; GFX10-NEXT: s_mov_b32 s1, s3
386 ; GFX10-NEXT: s_mov_b32 s2, s4
387 ; GFX10-NEXT: s_mov_b32 s3, s5
388 ; GFX10-NEXT: s_mov_b32 s4, s6
389 ; GFX10-NEXT: s_mov_b32 s5, s7
390 ; GFX10-NEXT: s_mov_b32 s6, s8
391 ; GFX10-NEXT: s_mov_b32 s7, s9
392 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x4 dim:SQ_RSRC_IMG_2D unorm
393 ; GFX10-NEXT: s_endpgm
395 ; GFX11-LABEL: image_store_v4f32_dmask_0100:
397 ; GFX11-NEXT: s_mov_b32 s0, s2
398 ; GFX11-NEXT: s_mov_b32 s1, s3
399 ; GFX11-NEXT: s_mov_b32 s2, s4
400 ; GFX11-NEXT: s_mov_b32 s3, s5
401 ; GFX11-NEXT: s_mov_b32 s4, s6
402 ; GFX11-NEXT: s_mov_b32 s5, s7
403 ; GFX11-NEXT: s_mov_b32 s6, s8
404 ; GFX11-NEXT: s_mov_b32 s7, s9
405 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x4 dim:SQ_RSRC_IMG_2D unorm
406 ; GFX11-NEXT: s_nop 0
407 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
408 ; GFX11-NEXT: s_endpgm
409 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 4, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
413 define amdgpu_ps void @image_store_v4f32_dmask_1000(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
414 ; GFX6-LABEL: image_store_v4f32_dmask_1000:
416 ; GFX6-NEXT: s_mov_b32 s0, s2
417 ; GFX6-NEXT: s_mov_b32 s1, s3
418 ; GFX6-NEXT: s_mov_b32 s2, s4
419 ; GFX6-NEXT: s_mov_b32 s3, s5
420 ; GFX6-NEXT: s_mov_b32 s4, s6
421 ; GFX6-NEXT: s_mov_b32 s5, s7
422 ; GFX6-NEXT: s_mov_b32 s6, s8
423 ; GFX6-NEXT: s_mov_b32 s7, s9
424 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x8 unorm
425 ; GFX6-NEXT: s_endpgm
427 ; GFX8-LABEL: image_store_v4f32_dmask_1000:
429 ; GFX8-NEXT: s_mov_b32 s0, s2
430 ; GFX8-NEXT: s_mov_b32 s1, s3
431 ; GFX8-NEXT: s_mov_b32 s2, s4
432 ; GFX8-NEXT: s_mov_b32 s3, s5
433 ; GFX8-NEXT: s_mov_b32 s4, s6
434 ; GFX8-NEXT: s_mov_b32 s5, s7
435 ; GFX8-NEXT: s_mov_b32 s6, s8
436 ; GFX8-NEXT: s_mov_b32 s7, s9
437 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x8 unorm
438 ; GFX8-NEXT: s_endpgm
440 ; GFX10-LABEL: image_store_v4f32_dmask_1000:
442 ; GFX10-NEXT: s_mov_b32 s0, s2
443 ; GFX10-NEXT: s_mov_b32 s1, s3
444 ; GFX10-NEXT: s_mov_b32 s2, s4
445 ; GFX10-NEXT: s_mov_b32 s3, s5
446 ; GFX10-NEXT: s_mov_b32 s4, s6
447 ; GFX10-NEXT: s_mov_b32 s5, s7
448 ; GFX10-NEXT: s_mov_b32 s6, s8
449 ; GFX10-NEXT: s_mov_b32 s7, s9
450 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_2D unorm
451 ; GFX10-NEXT: s_endpgm
453 ; GFX11-LABEL: image_store_v4f32_dmask_1000:
455 ; GFX11-NEXT: s_mov_b32 s0, s2
456 ; GFX11-NEXT: s_mov_b32 s1, s3
457 ; GFX11-NEXT: s_mov_b32 s2, s4
458 ; GFX11-NEXT: s_mov_b32 s3, s5
459 ; GFX11-NEXT: s_mov_b32 s4, s6
460 ; GFX11-NEXT: s_mov_b32 s5, s7
461 ; GFX11-NEXT: s_mov_b32 s6, s8
462 ; GFX11-NEXT: s_mov_b32 s7, s9
463 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_2D unorm
464 ; GFX11-NEXT: s_nop 0
465 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
466 ; GFX11-NEXT: s_endpgm
467 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 8, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
471 define amdgpu_ps void @image_store_v4f32_dmask_0011(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
472 ; GFX6-LABEL: image_store_v4f32_dmask_0011:
474 ; GFX6-NEXT: s_mov_b32 s0, s2
475 ; GFX6-NEXT: s_mov_b32 s1, s3
476 ; GFX6-NEXT: s_mov_b32 s2, s4
477 ; GFX6-NEXT: s_mov_b32 s3, s5
478 ; GFX6-NEXT: s_mov_b32 s4, s6
479 ; GFX6-NEXT: s_mov_b32 s5, s7
480 ; GFX6-NEXT: s_mov_b32 s6, s8
481 ; GFX6-NEXT: s_mov_b32 s7, s9
482 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x3 unorm
483 ; GFX6-NEXT: s_endpgm
485 ; GFX8-LABEL: image_store_v4f32_dmask_0011:
487 ; GFX8-NEXT: s_mov_b32 s0, s2
488 ; GFX8-NEXT: s_mov_b32 s1, s3
489 ; GFX8-NEXT: s_mov_b32 s2, s4
490 ; GFX8-NEXT: s_mov_b32 s3, s5
491 ; GFX8-NEXT: s_mov_b32 s4, s6
492 ; GFX8-NEXT: s_mov_b32 s5, s7
493 ; GFX8-NEXT: s_mov_b32 s6, s8
494 ; GFX8-NEXT: s_mov_b32 s7, s9
495 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x3 unorm
496 ; GFX8-NEXT: s_endpgm
498 ; GFX10-LABEL: image_store_v4f32_dmask_0011:
500 ; GFX10-NEXT: s_mov_b32 s0, s2
501 ; GFX10-NEXT: s_mov_b32 s1, s3
502 ; GFX10-NEXT: s_mov_b32 s2, s4
503 ; GFX10-NEXT: s_mov_b32 s3, s5
504 ; GFX10-NEXT: s_mov_b32 s4, s6
505 ; GFX10-NEXT: s_mov_b32 s5, s7
506 ; GFX10-NEXT: s_mov_b32 s6, s8
507 ; GFX10-NEXT: s_mov_b32 s7, s9
508 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_2D unorm
509 ; GFX10-NEXT: s_endpgm
511 ; GFX11-LABEL: image_store_v4f32_dmask_0011:
513 ; GFX11-NEXT: s_mov_b32 s0, s2
514 ; GFX11-NEXT: s_mov_b32 s1, s3
515 ; GFX11-NEXT: s_mov_b32 s2, s4
516 ; GFX11-NEXT: s_mov_b32 s3, s5
517 ; GFX11-NEXT: s_mov_b32 s4, s6
518 ; GFX11-NEXT: s_mov_b32 s5, s7
519 ; GFX11-NEXT: s_mov_b32 s6, s8
520 ; GFX11-NEXT: s_mov_b32 s7, s9
521 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_2D unorm
522 ; GFX11-NEXT: s_nop 0
523 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
524 ; GFX11-NEXT: s_endpgm
525 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 3, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
529 define amdgpu_ps void @image_store_v4f32_dmask_0110(<8 x i32> inreg %rsrc, i32 %s, i32 %t, <4 x float> %in) {
530 ; GFX6-LABEL: image_store_v4f32_dmask_0110:
532 ; GFX6-NEXT: s_mov_b32 s0, s2
533 ; GFX6-NEXT: s_mov_b32 s1, s3
534 ; GFX6-NEXT: s_mov_b32 s2, s4
535 ; GFX6-NEXT: s_mov_b32 s3, s5
536 ; GFX6-NEXT: s_mov_b32 s4, s6
537 ; GFX6-NEXT: s_mov_b32 s5, s7
538 ; GFX6-NEXT: s_mov_b32 s6, s8
539 ; GFX6-NEXT: s_mov_b32 s7, s9
540 ; GFX6-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x6 unorm
541 ; GFX6-NEXT: s_endpgm
543 ; GFX8-LABEL: image_store_v4f32_dmask_0110:
545 ; GFX8-NEXT: s_mov_b32 s0, s2
546 ; GFX8-NEXT: s_mov_b32 s1, s3
547 ; GFX8-NEXT: s_mov_b32 s2, s4
548 ; GFX8-NEXT: s_mov_b32 s3, s5
549 ; GFX8-NEXT: s_mov_b32 s4, s6
550 ; GFX8-NEXT: s_mov_b32 s5, s7
551 ; GFX8-NEXT: s_mov_b32 s6, s8
552 ; GFX8-NEXT: s_mov_b32 s7, s9
553 ; GFX8-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x6 unorm
554 ; GFX8-NEXT: s_endpgm
556 ; GFX10-LABEL: image_store_v4f32_dmask_0110:
558 ; GFX10-NEXT: s_mov_b32 s0, s2
559 ; GFX10-NEXT: s_mov_b32 s1, s3
560 ; GFX10-NEXT: s_mov_b32 s2, s4
561 ; GFX10-NEXT: s_mov_b32 s3, s5
562 ; GFX10-NEXT: s_mov_b32 s4, s6
563 ; GFX10-NEXT: s_mov_b32 s5, s7
564 ; GFX10-NEXT: s_mov_b32 s6, s8
565 ; GFX10-NEXT: s_mov_b32 s7, s9
566 ; GFX10-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_2D unorm
567 ; GFX10-NEXT: s_endpgm
569 ; GFX11-LABEL: image_store_v4f32_dmask_0110:
571 ; GFX11-NEXT: s_mov_b32 s0, s2
572 ; GFX11-NEXT: s_mov_b32 s1, s3
573 ; GFX11-NEXT: s_mov_b32 s2, s4
574 ; GFX11-NEXT: s_mov_b32 s3, s5
575 ; GFX11-NEXT: s_mov_b32 s4, s6
576 ; GFX11-NEXT: s_mov_b32 s5, s7
577 ; GFX11-NEXT: s_mov_b32 s6, s8
578 ; GFX11-NEXT: s_mov_b32 s7, s9
579 ; GFX11-NEXT: image_store v[2:5], v[0:1], s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_2D unorm
580 ; GFX11-NEXT: s_nop 0
581 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
582 ; GFX11-NEXT: s_endpgm
583 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %in, i32 6, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
587 define amdgpu_ps void @image_store_f32_dmask_1111(<8 x i32> inreg %rsrc, i32 inreg %s, i32 inreg %t, float %in) #0 {
588 ; GFX6-LABEL: image_store_f32_dmask_1111:
590 ; GFX6-NEXT: v_mov_b32_e32 v1, s10
591 ; GFX6-NEXT: s_mov_b32 s0, s2
592 ; GFX6-NEXT: s_mov_b32 s1, s3
593 ; GFX6-NEXT: s_mov_b32 s2, s4
594 ; GFX6-NEXT: s_mov_b32 s3, s5
595 ; GFX6-NEXT: s_mov_b32 s4, s6
596 ; GFX6-NEXT: s_mov_b32 s5, s7
597 ; GFX6-NEXT: s_mov_b32 s6, s8
598 ; GFX6-NEXT: s_mov_b32 s7, s9
599 ; GFX6-NEXT: v_mov_b32_e32 v2, s11
600 ; GFX6-NEXT: image_store v0, v[1:2], s[0:7] dmask:0xf unorm
601 ; GFX6-NEXT: s_endpgm
603 ; GFX8-LABEL: image_store_f32_dmask_1111:
605 ; GFX8-NEXT: v_mov_b32_e32 v1, s10
606 ; GFX8-NEXT: s_mov_b32 s0, s2
607 ; GFX8-NEXT: s_mov_b32 s1, s3
608 ; GFX8-NEXT: s_mov_b32 s2, s4
609 ; GFX8-NEXT: s_mov_b32 s3, s5
610 ; GFX8-NEXT: s_mov_b32 s4, s6
611 ; GFX8-NEXT: s_mov_b32 s5, s7
612 ; GFX8-NEXT: s_mov_b32 s6, s8
613 ; GFX8-NEXT: s_mov_b32 s7, s9
614 ; GFX8-NEXT: v_mov_b32_e32 v2, s11
615 ; GFX8-NEXT: image_store v0, v[1:2], s[0:7] dmask:0xf unorm
616 ; GFX8-NEXT: s_endpgm
618 ; GFX10-LABEL: image_store_f32_dmask_1111:
620 ; GFX10-NEXT: v_mov_b32_e32 v1, s10
621 ; GFX10-NEXT: v_mov_b32_e32 v2, s11
622 ; GFX10-NEXT: s_mov_b32 s0, s2
623 ; GFX10-NEXT: s_mov_b32 s1, s3
624 ; GFX10-NEXT: s_mov_b32 s2, s4
625 ; GFX10-NEXT: s_mov_b32 s3, s5
626 ; GFX10-NEXT: s_mov_b32 s4, s6
627 ; GFX10-NEXT: s_mov_b32 s5, s7
628 ; GFX10-NEXT: s_mov_b32 s6, s8
629 ; GFX10-NEXT: s_mov_b32 s7, s9
630 ; GFX10-NEXT: image_store v0, v[1:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
631 ; GFX10-NEXT: s_endpgm
633 ; GFX11-LABEL: image_store_f32_dmask_1111:
635 ; GFX11-NEXT: v_dual_mov_b32 v1, s10 :: v_dual_mov_b32 v2, s11
636 ; GFX11-NEXT: s_mov_b32 s0, s2
637 ; GFX11-NEXT: s_mov_b32 s1, s3
638 ; GFX11-NEXT: s_mov_b32 s2, s4
639 ; GFX11-NEXT: s_mov_b32 s3, s5
640 ; GFX11-NEXT: s_mov_b32 s4, s6
641 ; GFX11-NEXT: s_mov_b32 s5, s7
642 ; GFX11-NEXT: s_mov_b32 s6, s8
643 ; GFX11-NEXT: s_mov_b32 s7, s9
644 ; GFX11-NEXT: image_store v0, v[1:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
645 ; GFX11-NEXT: s_nop 0
646 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
647 ; GFX11-NEXT: s_endpgm
648 tail call void @llvm.amdgcn.image.store.2d.f32.i32(float %in, i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
652 declare void @llvm.amdgcn.image.store.2d.f32.i32(float, i32 immarg, i32, i32, <8 x i32>, i32 immarg, i32 immarg) #0
653 declare void @llvm.amdgcn.image.store.2d.v2f32.i32(<2 x float>, i32 immarg, i32, i32, <8 x i32>, i32 immarg, i32 immarg) #0
654 declare void @llvm.amdgcn.image.store.2d.v3f32.i32(<3 x float>, i32 immarg, i32, i32, <8 x i32>, i32 immarg, i32 immarg) #0
655 declare void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float>, i32 immarg, i32, i32, <8 x i32>, i32 immarg, i32 immarg) #0
657 attributes #0 = { nounwind writeonly }