1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=VERDE %s
3 ; RUN: llc -mtriple=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=FIJI %s
4 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX6789 %s
5 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=-enable-prt-strict-null -verify-machineinstrs < %s | FileCheck -check-prefixes=NOPRT %s
6 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX10PLUS,GFX10 %s
7 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX10PLUS,GFX11 %s
8 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -amdgpu-enable-delay-alu=0 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX12 %s
10 define amdgpu_ps <4 x float> @load_1d(<8 x i32> inreg %rsrc, i32 %s) {
11 ; VERDE-LABEL: load_1d:
12 ; VERDE: ; %bb.0: ; %main_body
13 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
14 ; VERDE-NEXT: s_waitcnt vmcnt(0)
15 ; VERDE-NEXT: ; return to shader part epilog
17 ; FIJI-LABEL: load_1d:
18 ; FIJI: ; %bb.0: ; %main_body
19 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
20 ; FIJI-NEXT: s_waitcnt vmcnt(0)
21 ; FIJI-NEXT: ; return to shader part epilog
23 ; GFX6789-LABEL: load_1d:
24 ; GFX6789: ; %bb.0: ; %main_body
25 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
26 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
27 ; GFX6789-NEXT: ; return to shader part epilog
29 ; NOPRT-LABEL: load_1d:
30 ; NOPRT: ; %bb.0: ; %main_body
31 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
32 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
33 ; NOPRT-NEXT: ; return to shader part epilog
35 ; GFX10PLUS-LABEL: load_1d:
36 ; GFX10PLUS: ; %bb.0: ; %main_body
37 ; GFX10PLUS-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
38 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
39 ; GFX10PLUS-NEXT: ; return to shader part epilog
41 ; GFX12-LABEL: load_1d:
42 ; GFX12: ; %bb.0: ; %main_body
43 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
44 ; GFX12-NEXT: s_wait_loadcnt 0x0
45 ; GFX12-NEXT: ; return to shader part epilog
47 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
51 define amdgpu_ps <4 x float> @load_1d_tfe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s) {
52 ; VERDE-LABEL: load_1d_tfe:
53 ; VERDE: ; %bb.0: ; %main_body
54 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
55 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
56 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
57 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
58 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
59 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
60 ; VERDE-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe
61 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
62 ; VERDE-NEXT: s_mov_b32 s10, -1
63 ; VERDE-NEXT: s_waitcnt vmcnt(0)
64 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
65 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
66 ; VERDE-NEXT: ; return to shader part epilog
68 ; FIJI-LABEL: load_1d_tfe:
69 ; FIJI: ; %bb.0: ; %main_body
70 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
71 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
72 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
73 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
74 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
75 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
76 ; FIJI-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe
77 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
78 ; FIJI-NEXT: s_mov_b32 s10, -1
79 ; FIJI-NEXT: s_waitcnt vmcnt(0)
80 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
81 ; FIJI-NEXT: s_waitcnt vmcnt(0)
82 ; FIJI-NEXT: ; return to shader part epilog
84 ; GFX6789-LABEL: load_1d_tfe:
85 ; GFX6789: ; %bb.0: ; %main_body
86 ; GFX6789-NEXT: v_mov_b32_e32 v6, 0
87 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
88 ; GFX6789-NEXT: v_mov_b32_e32 v7, v6
89 ; GFX6789-NEXT: v_mov_b32_e32 v8, v6
90 ; GFX6789-NEXT: v_mov_b32_e32 v9, v6
91 ; GFX6789-NEXT: v_mov_b32_e32 v10, v6
92 ; GFX6789-NEXT: v_mov_b32_e32 v0, v6
93 ; GFX6789-NEXT: v_mov_b32_e32 v1, v7
94 ; GFX6789-NEXT: v_mov_b32_e32 v2, v8
95 ; GFX6789-NEXT: v_mov_b32_e32 v3, v9
96 ; GFX6789-NEXT: v_mov_b32_e32 v4, v10
97 ; GFX6789-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe
98 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
99 ; GFX6789-NEXT: global_store_dword v6, v4, s[8:9]
100 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
101 ; GFX6789-NEXT: ; return to shader part epilog
103 ; NOPRT-LABEL: load_1d_tfe:
104 ; NOPRT: ; %bb.0: ; %main_body
105 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
106 ; NOPRT-NEXT: image_load v[0:4], v0, s[0:7] dmask:0xf unorm tfe
107 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
108 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
109 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
110 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
111 ; NOPRT-NEXT: ; return to shader part epilog
113 ; GFX10-LABEL: load_1d_tfe:
114 ; GFX10: ; %bb.0: ; %main_body
115 ; GFX10-NEXT: v_mov_b32_e32 v6, 0
116 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
117 ; GFX10-NEXT: v_mov_b32_e32 v7, v6
118 ; GFX10-NEXT: v_mov_b32_e32 v8, v6
119 ; GFX10-NEXT: v_mov_b32_e32 v9, v6
120 ; GFX10-NEXT: v_mov_b32_e32 v10, v6
121 ; GFX10-NEXT: v_mov_b32_e32 v0, v6
122 ; GFX10-NEXT: v_mov_b32_e32 v1, v7
123 ; GFX10-NEXT: v_mov_b32_e32 v2, v8
124 ; GFX10-NEXT: v_mov_b32_e32 v3, v9
125 ; GFX10-NEXT: v_mov_b32_e32 v4, v10
126 ; GFX10-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm tfe
127 ; GFX10-NEXT: s_waitcnt vmcnt(0)
128 ; GFX10-NEXT: global_store_dword v6, v4, s[8:9]
129 ; GFX10-NEXT: ; return to shader part epilog
131 ; GFX11-LABEL: load_1d_tfe:
132 ; GFX11: ; %bb.0: ; %main_body
133 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v6, 0
134 ; GFX11-NEXT: v_mov_b32_e32 v7, v6
135 ; GFX11-NEXT: v_mov_b32_e32 v8, v6
136 ; GFX11-NEXT: v_mov_b32_e32 v9, v6
137 ; GFX11-NEXT: v_mov_b32_e32 v10, v6
138 ; GFX11-NEXT: v_dual_mov_b32 v0, v6 :: v_dual_mov_b32 v1, v7
139 ; GFX11-NEXT: v_dual_mov_b32 v2, v8 :: v_dual_mov_b32 v3, v9
140 ; GFX11-NEXT: v_mov_b32_e32 v4, v10
141 ; GFX11-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm tfe
142 ; GFX11-NEXT: s_waitcnt vmcnt(0)
143 ; GFX11-NEXT: global_store_b32 v6, v4, s[8:9]
144 ; GFX11-NEXT: ; return to shader part epilog
146 ; GFX12-LABEL: load_1d_tfe:
147 ; GFX12: ; %bb.0: ; %main_body
148 ; GFX12-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v6, 0
149 ; GFX12-NEXT: v_dual_mov_b32 v7, v6 :: v_dual_mov_b32 v8, v6
150 ; GFX12-NEXT: v_dual_mov_b32 v9, v6 :: v_dual_mov_b32 v10, v6
151 ; GFX12-NEXT: v_dual_mov_b32 v0, v6 :: v_dual_mov_b32 v1, v7
152 ; GFX12-NEXT: v_dual_mov_b32 v2, v8 :: v_dual_mov_b32 v3, v9
153 ; GFX12-NEXT: v_mov_b32_e32 v4, v10
154 ; GFX12-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D tfe
155 ; GFX12-NEXT: s_wait_loadcnt 0x0
156 ; GFX12-NEXT: global_store_b32 v6, v4, s[8:9]
157 ; GFX12-NEXT: ; return to shader part epilog
159 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
160 %v.vec = extractvalue {<4 x float>, i32} %v, 0
161 %v.err = extractvalue {<4 x float>, i32} %v, 1
162 store i32 %v.err, ptr addrspace(1) %out, align 4
163 ret <4 x float> %v.vec
166 define amdgpu_ps <4 x float> @load_1d_lwe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s) {
167 ; VERDE-LABEL: load_1d_lwe:
168 ; VERDE: ; %bb.0: ; %main_body
169 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
170 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
171 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
172 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
173 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
174 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
175 ; VERDE-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm lwe
176 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
177 ; VERDE-NEXT: s_mov_b32 s10, -1
178 ; VERDE-NEXT: s_waitcnt vmcnt(0)
179 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
180 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
181 ; VERDE-NEXT: ; return to shader part epilog
183 ; FIJI-LABEL: load_1d_lwe:
184 ; FIJI: ; %bb.0: ; %main_body
185 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
186 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
187 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
188 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
189 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
190 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
191 ; FIJI-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm lwe
192 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
193 ; FIJI-NEXT: s_mov_b32 s10, -1
194 ; FIJI-NEXT: s_waitcnt vmcnt(0)
195 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
196 ; FIJI-NEXT: s_waitcnt vmcnt(0)
197 ; FIJI-NEXT: ; return to shader part epilog
199 ; GFX6789-LABEL: load_1d_lwe:
200 ; GFX6789: ; %bb.0: ; %main_body
201 ; GFX6789-NEXT: v_mov_b32_e32 v6, 0
202 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
203 ; GFX6789-NEXT: v_mov_b32_e32 v7, v6
204 ; GFX6789-NEXT: v_mov_b32_e32 v8, v6
205 ; GFX6789-NEXT: v_mov_b32_e32 v9, v6
206 ; GFX6789-NEXT: v_mov_b32_e32 v10, v6
207 ; GFX6789-NEXT: v_mov_b32_e32 v0, v6
208 ; GFX6789-NEXT: v_mov_b32_e32 v1, v7
209 ; GFX6789-NEXT: v_mov_b32_e32 v2, v8
210 ; GFX6789-NEXT: v_mov_b32_e32 v3, v9
211 ; GFX6789-NEXT: v_mov_b32_e32 v4, v10
212 ; GFX6789-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm lwe
213 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
214 ; GFX6789-NEXT: global_store_dword v6, v4, s[8:9]
215 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
216 ; GFX6789-NEXT: ; return to shader part epilog
218 ; NOPRT-LABEL: load_1d_lwe:
219 ; NOPRT: ; %bb.0: ; %main_body
220 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
221 ; NOPRT-NEXT: image_load v[0:4], v0, s[0:7] dmask:0xf unorm lwe
222 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
223 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
224 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
225 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
226 ; NOPRT-NEXT: ; return to shader part epilog
228 ; GFX10-LABEL: load_1d_lwe:
229 ; GFX10: ; %bb.0: ; %main_body
230 ; GFX10-NEXT: v_mov_b32_e32 v6, 0
231 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
232 ; GFX10-NEXT: v_mov_b32_e32 v7, v6
233 ; GFX10-NEXT: v_mov_b32_e32 v8, v6
234 ; GFX10-NEXT: v_mov_b32_e32 v9, v6
235 ; GFX10-NEXT: v_mov_b32_e32 v10, v6
236 ; GFX10-NEXT: v_mov_b32_e32 v0, v6
237 ; GFX10-NEXT: v_mov_b32_e32 v1, v7
238 ; GFX10-NEXT: v_mov_b32_e32 v2, v8
239 ; GFX10-NEXT: v_mov_b32_e32 v3, v9
240 ; GFX10-NEXT: v_mov_b32_e32 v4, v10
241 ; GFX10-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe
242 ; GFX10-NEXT: s_waitcnt vmcnt(0)
243 ; GFX10-NEXT: global_store_dword v6, v4, s[8:9]
244 ; GFX10-NEXT: ; return to shader part epilog
246 ; GFX11-LABEL: load_1d_lwe:
247 ; GFX11: ; %bb.0: ; %main_body
248 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v6, 0
249 ; GFX11-NEXT: v_mov_b32_e32 v7, v6
250 ; GFX11-NEXT: v_mov_b32_e32 v8, v6
251 ; GFX11-NEXT: v_mov_b32_e32 v9, v6
252 ; GFX11-NEXT: v_mov_b32_e32 v10, v6
253 ; GFX11-NEXT: v_dual_mov_b32 v0, v6 :: v_dual_mov_b32 v1, v7
254 ; GFX11-NEXT: v_dual_mov_b32 v2, v8 :: v_dual_mov_b32 v3, v9
255 ; GFX11-NEXT: v_mov_b32_e32 v4, v10
256 ; GFX11-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe
257 ; GFX11-NEXT: s_waitcnt vmcnt(0)
258 ; GFX11-NEXT: global_store_b32 v6, v4, s[8:9]
259 ; GFX11-NEXT: ; return to shader part epilog
261 ; GFX12-LABEL: load_1d_lwe:
262 ; GFX12: ; %bb.0: ; %main_body
263 ; GFX12-NEXT: image_load v[0:4], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
264 ; GFX12-NEXT: v_mov_b32_e32 v5, 0
265 ; GFX12-NEXT: s_wait_loadcnt 0x0
266 ; GFX12-NEXT: global_store_b32 v5, v4, s[8:9]
267 ; GFX12-NEXT: ; return to shader part epilog
269 %v = call {<4 x float>, i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 2, i32 0)
270 %v.vec = extractvalue {<4 x float>, i32} %v, 0
271 %v.err = extractvalue {<4 x float>, i32} %v, 1
272 store i32 %v.err, ptr addrspace(1) %out, align 4
273 ret <4 x float> %v.vec
276 define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t) {
277 ; VERDE-LABEL: load_2d:
278 ; VERDE: ; %bb.0: ; %main_body
279 ; VERDE-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
280 ; VERDE-NEXT: s_waitcnt vmcnt(0)
281 ; VERDE-NEXT: ; return to shader part epilog
283 ; FIJI-LABEL: load_2d:
284 ; FIJI: ; %bb.0: ; %main_body
285 ; FIJI-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
286 ; FIJI-NEXT: s_waitcnt vmcnt(0)
287 ; FIJI-NEXT: ; return to shader part epilog
289 ; GFX6789-LABEL: load_2d:
290 ; GFX6789: ; %bb.0: ; %main_body
291 ; GFX6789-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
292 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
293 ; GFX6789-NEXT: ; return to shader part epilog
295 ; NOPRT-LABEL: load_2d:
296 ; NOPRT: ; %bb.0: ; %main_body
297 ; NOPRT-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
298 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
299 ; NOPRT-NEXT: ; return to shader part epilog
301 ; GFX10PLUS-LABEL: load_2d:
302 ; GFX10PLUS: ; %bb.0: ; %main_body
303 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
304 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
305 ; GFX10PLUS-NEXT: ; return to shader part epilog
307 ; GFX12-LABEL: load_2d:
308 ; GFX12: ; %bb.0: ; %main_body
309 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D
310 ; GFX12-NEXT: s_wait_loadcnt 0x0
311 ; GFX12-NEXT: ; return to shader part epilog
313 %v = call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
317 define amdgpu_ps <4 x float> @load_2d_tfe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t) {
318 ; VERDE-LABEL: load_2d_tfe:
319 ; VERDE: ; %bb.0: ; %main_body
320 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
321 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
322 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
323 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
324 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
325 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
326 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
327 ; VERDE-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe
328 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
329 ; VERDE-NEXT: s_mov_b32 s10, -1
330 ; VERDE-NEXT: s_waitcnt vmcnt(0)
331 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
332 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
333 ; VERDE-NEXT: ; return to shader part epilog
335 ; FIJI-LABEL: load_2d_tfe:
336 ; FIJI: ; %bb.0: ; %main_body
337 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
338 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
339 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
340 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
341 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
342 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
343 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
344 ; FIJI-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe
345 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
346 ; FIJI-NEXT: s_mov_b32 s10, -1
347 ; FIJI-NEXT: s_waitcnt vmcnt(0)
348 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
349 ; FIJI-NEXT: s_waitcnt vmcnt(0)
350 ; FIJI-NEXT: ; return to shader part epilog
352 ; GFX6789-LABEL: load_2d_tfe:
353 ; GFX6789: ; %bb.0: ; %main_body
354 ; GFX6789-NEXT: v_mov_b32_e32 v7, 0
355 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
356 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
357 ; GFX6789-NEXT: v_mov_b32_e32 v8, v7
358 ; GFX6789-NEXT: v_mov_b32_e32 v9, v7
359 ; GFX6789-NEXT: v_mov_b32_e32 v10, v7
360 ; GFX6789-NEXT: v_mov_b32_e32 v11, v7
361 ; GFX6789-NEXT: v_mov_b32_e32 v0, v7
362 ; GFX6789-NEXT: v_mov_b32_e32 v1, v8
363 ; GFX6789-NEXT: v_mov_b32_e32 v2, v9
364 ; GFX6789-NEXT: v_mov_b32_e32 v3, v10
365 ; GFX6789-NEXT: v_mov_b32_e32 v4, v11
366 ; GFX6789-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe
367 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
368 ; GFX6789-NEXT: global_store_dword v7, v4, s[8:9]
369 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
370 ; GFX6789-NEXT: ; return to shader part epilog
372 ; NOPRT-LABEL: load_2d_tfe:
373 ; NOPRT: ; %bb.0: ; %main_body
374 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
375 ; NOPRT-NEXT: image_load v[0:4], v[0:1], s[0:7] dmask:0xf unorm tfe
376 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
377 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
378 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
379 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
380 ; NOPRT-NEXT: ; return to shader part epilog
382 ; GFX10-LABEL: load_2d_tfe:
383 ; GFX10: ; %bb.0: ; %main_body
384 ; GFX10-NEXT: v_mov_b32_e32 v7, 0
385 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
386 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
387 ; GFX10-NEXT: v_mov_b32_e32 v8, v7
388 ; GFX10-NEXT: v_mov_b32_e32 v9, v7
389 ; GFX10-NEXT: v_mov_b32_e32 v10, v7
390 ; GFX10-NEXT: v_mov_b32_e32 v11, v7
391 ; GFX10-NEXT: v_mov_b32_e32 v0, v7
392 ; GFX10-NEXT: v_mov_b32_e32 v1, v8
393 ; GFX10-NEXT: v_mov_b32_e32 v2, v9
394 ; GFX10-NEXT: v_mov_b32_e32 v3, v10
395 ; GFX10-NEXT: v_mov_b32_e32 v4, v11
396 ; GFX10-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe
397 ; GFX10-NEXT: s_waitcnt vmcnt(0)
398 ; GFX10-NEXT: global_store_dword v7, v4, s[8:9]
399 ; GFX10-NEXT: ; return to shader part epilog
401 ; GFX11-LABEL: load_2d_tfe:
402 ; GFX11: ; %bb.0: ; %main_body
403 ; GFX11-NEXT: v_dual_mov_b32 v7, 0 :: v_dual_mov_b32 v6, v1
404 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, v7
405 ; GFX11-NEXT: v_mov_b32_e32 v9, v7
406 ; GFX11-NEXT: v_mov_b32_e32 v10, v7
407 ; GFX11-NEXT: v_mov_b32_e32 v11, v7
408 ; GFX11-NEXT: v_dual_mov_b32 v0, v7 :: v_dual_mov_b32 v1, v8
409 ; GFX11-NEXT: v_dual_mov_b32 v2, v9 :: v_dual_mov_b32 v3, v10
410 ; GFX11-NEXT: v_mov_b32_e32 v4, v11
411 ; GFX11-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe
412 ; GFX11-NEXT: s_waitcnt vmcnt(0)
413 ; GFX11-NEXT: global_store_b32 v7, v4, s[8:9]
414 ; GFX11-NEXT: ; return to shader part epilog
416 ; GFX12-LABEL: load_2d_tfe:
417 ; GFX12: ; %bb.0: ; %main_body
418 ; GFX12-NEXT: v_mov_b32_e32 v7, 0
419 ; GFX12-NEXT: v_dual_mov_b32 v5, v1 :: v_dual_mov_b32 v6, v0
420 ; GFX12-NEXT: v_dual_mov_b32 v8, v7 :: v_dual_mov_b32 v9, v7
421 ; GFX12-NEXT: v_dual_mov_b32 v10, v7 :: v_dual_mov_b32 v11, v7
422 ; GFX12-NEXT: v_dual_mov_b32 v0, v7 :: v_dual_mov_b32 v1, v8
423 ; GFX12-NEXT: v_dual_mov_b32 v2, v9 :: v_dual_mov_b32 v3, v10
424 ; GFX12-NEXT: v_mov_b32_e32 v4, v11
425 ; GFX12-NEXT: image_load v[0:4], [v6, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D tfe
426 ; GFX12-NEXT: s_wait_loadcnt 0x0
427 ; GFX12-NEXT: global_store_b32 v7, v4, s[8:9]
428 ; GFX12-NEXT: ; return to shader part epilog
430 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.2d.v4f32i32.i32(i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 1, i32 0)
431 %v.vec = extractvalue {<4 x float>, i32} %v, 0
432 %v.err = extractvalue {<4 x float>, i32} %v, 1
433 store i32 %v.err, ptr addrspace(1) %out, align 4
434 ret <4 x float> %v.vec
437 define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r) {
438 ; VERDE-LABEL: load_3d:
439 ; VERDE: ; %bb.0: ; %main_body
440 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
441 ; VERDE-NEXT: s_waitcnt vmcnt(0)
442 ; VERDE-NEXT: ; return to shader part epilog
444 ; FIJI-LABEL: load_3d:
445 ; FIJI: ; %bb.0: ; %main_body
446 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
447 ; FIJI-NEXT: s_waitcnt vmcnt(0)
448 ; FIJI-NEXT: ; return to shader part epilog
450 ; GFX6789-LABEL: load_3d:
451 ; GFX6789: ; %bb.0: ; %main_body
452 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
453 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
454 ; GFX6789-NEXT: ; return to shader part epilog
456 ; NOPRT-LABEL: load_3d:
457 ; NOPRT: ; %bb.0: ; %main_body
458 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
459 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
460 ; NOPRT-NEXT: ; return to shader part epilog
462 ; GFX10PLUS-LABEL: load_3d:
463 ; GFX10PLUS: ; %bb.0: ; %main_body
464 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm
465 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
466 ; GFX10PLUS-NEXT: ; return to shader part epilog
468 ; GFX12-LABEL: load_3d:
469 ; GFX12: ; %bb.0: ; %main_body
470 ; GFX12-NEXT: image_load v[0:3], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D
471 ; GFX12-NEXT: s_wait_loadcnt 0x0
472 ; GFX12-NEXT: ; return to shader part epilog
474 %v = call <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 0, i32 0)
478 define amdgpu_ps <4 x float> @load_3d_tfe_lwe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t, i32 %r) {
479 ; VERDE-LABEL: load_3d_tfe_lwe:
480 ; VERDE: ; %bb.0: ; %main_body
481 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
482 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
483 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
484 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
485 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
486 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
487 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
488 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
489 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
490 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
491 ; VERDE-NEXT: s_mov_b32 s10, -1
492 ; VERDE-NEXT: s_waitcnt vmcnt(0)
493 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
494 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
495 ; VERDE-NEXT: ; return to shader part epilog
497 ; FIJI-LABEL: load_3d_tfe_lwe:
498 ; FIJI: ; %bb.0: ; %main_body
499 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
500 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
501 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
502 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
503 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
504 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
505 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
506 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
507 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
508 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
509 ; FIJI-NEXT: s_mov_b32 s10, -1
510 ; FIJI-NEXT: s_waitcnt vmcnt(0)
511 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
512 ; FIJI-NEXT: s_waitcnt vmcnt(0)
513 ; FIJI-NEXT: ; return to shader part epilog
515 ; GFX6789-LABEL: load_3d_tfe_lwe:
516 ; GFX6789: ; %bb.0: ; %main_body
517 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
518 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
519 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
520 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
521 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
522 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
523 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
524 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
525 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
526 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
527 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
528 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
529 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
530 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
531 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
532 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
533 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
534 ; GFX6789-NEXT: ; return to shader part epilog
536 ; NOPRT-LABEL: load_3d_tfe_lwe:
537 ; NOPRT: ; %bb.0: ; %main_body
538 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
539 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm tfe lwe
540 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
541 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
542 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
543 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
544 ; NOPRT-NEXT: ; return to shader part epilog
546 ; GFX10-LABEL: load_3d_tfe_lwe:
547 ; GFX10: ; %bb.0: ; %main_body
548 ; GFX10-NEXT: v_mov_b32_e32 v8, 0
549 ; GFX10-NEXT: v_mov_b32_e32 v7, v2
550 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
551 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
552 ; GFX10-NEXT: v_mov_b32_e32 v9, v8
553 ; GFX10-NEXT: v_mov_b32_e32 v10, v8
554 ; GFX10-NEXT: v_mov_b32_e32 v11, v8
555 ; GFX10-NEXT: v_mov_b32_e32 v12, v8
556 ; GFX10-NEXT: v_mov_b32_e32 v0, v8
557 ; GFX10-NEXT: v_mov_b32_e32 v1, v9
558 ; GFX10-NEXT: v_mov_b32_e32 v2, v10
559 ; GFX10-NEXT: v_mov_b32_e32 v3, v11
560 ; GFX10-NEXT: v_mov_b32_e32 v4, v12
561 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm tfe lwe
562 ; GFX10-NEXT: s_waitcnt vmcnt(0)
563 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9]
564 ; GFX10-NEXT: ; return to shader part epilog
566 ; GFX11-LABEL: load_3d_tfe_lwe:
567 ; GFX11: ; %bb.0: ; %main_body
568 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, 0
569 ; GFX11-NEXT: v_dual_mov_b32 v7, v2 :: v_dual_mov_b32 v6, v1
570 ; GFX11-NEXT: v_mov_b32_e32 v9, v8
571 ; GFX11-NEXT: v_mov_b32_e32 v10, v8
572 ; GFX11-NEXT: v_mov_b32_e32 v11, v8
573 ; GFX11-NEXT: v_mov_b32_e32 v12, v8
574 ; GFX11-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
575 ; GFX11-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
576 ; GFX11-NEXT: v_mov_b32_e32 v4, v12
577 ; GFX11-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm tfe lwe
578 ; GFX11-NEXT: s_waitcnt vmcnt(0)
579 ; GFX11-NEXT: global_store_b32 v8, v4, s[8:9]
580 ; GFX11-NEXT: ; return to shader part epilog
582 ; GFX12-LABEL: load_3d_tfe_lwe:
583 ; GFX12: ; %bb.0: ; %main_body
584 ; GFX12-NEXT: v_dual_mov_b32 v7, v0 :: v_dual_mov_b32 v8, 0
585 ; GFX12-NEXT: v_dual_mov_b32 v5, v2 :: v_dual_mov_b32 v6, v1
586 ; GFX12-NEXT: v_dual_mov_b32 v9, v8 :: v_dual_mov_b32 v10, v8
587 ; GFX12-NEXT: v_dual_mov_b32 v11, v8 :: v_dual_mov_b32 v12, v8
588 ; GFX12-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
589 ; GFX12-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
590 ; GFX12-NEXT: v_mov_b32_e32 v4, v12
591 ; GFX12-NEXT: image_load v[0:4], [v7, v6, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D tfe
592 ; GFX12-NEXT: s_wait_loadcnt 0x0
593 ; GFX12-NEXT: global_store_b32 v8, v4, s[8:9]
594 ; GFX12-NEXT: ; return to shader part epilog
596 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.3d.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 3, i32 0)
597 %v.vec = extractvalue {<4 x float>, i32} %v, 0
598 %v.err = extractvalue {<4 x float>, i32} %v, 1
599 store i32 %v.err, ptr addrspace(1) %out, align 4
600 ret <4 x float> %v.vec
603 define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
604 ; VERDE-LABEL: load_cube:
605 ; VERDE: ; %bb.0: ; %main_body
606 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
607 ; VERDE-NEXT: s_waitcnt vmcnt(0)
608 ; VERDE-NEXT: ; return to shader part epilog
610 ; FIJI-LABEL: load_cube:
611 ; FIJI: ; %bb.0: ; %main_body
612 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
613 ; FIJI-NEXT: s_waitcnt vmcnt(0)
614 ; FIJI-NEXT: ; return to shader part epilog
616 ; GFX6789-LABEL: load_cube:
617 ; GFX6789: ; %bb.0: ; %main_body
618 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
619 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
620 ; GFX6789-NEXT: ; return to shader part epilog
622 ; NOPRT-LABEL: load_cube:
623 ; NOPRT: ; %bb.0: ; %main_body
624 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
625 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
626 ; NOPRT-NEXT: ; return to shader part epilog
628 ; GFX10PLUS-LABEL: load_cube:
629 ; GFX10PLUS: ; %bb.0: ; %main_body
630 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm
631 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
632 ; GFX10PLUS-NEXT: ; return to shader part epilog
634 ; GFX12-LABEL: load_cube:
635 ; GFX12: ; %bb.0: ; %main_body
636 ; GFX12-NEXT: image_load v[0:3], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE
637 ; GFX12-NEXT: s_wait_loadcnt 0x0
638 ; GFX12-NEXT: ; return to shader part epilog
640 %v = call <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
644 define amdgpu_ps <4 x float> @load_cube_lwe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t, i32 %slice) {
645 ; VERDE-LABEL: load_cube_lwe:
646 ; VERDE: ; %bb.0: ; %main_body
647 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
648 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
649 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
650 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
651 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
652 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
653 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
654 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
655 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
656 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
657 ; VERDE-NEXT: s_mov_b32 s10, -1
658 ; VERDE-NEXT: s_waitcnt vmcnt(0)
659 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
660 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
661 ; VERDE-NEXT: ; return to shader part epilog
663 ; FIJI-LABEL: load_cube_lwe:
664 ; FIJI: ; %bb.0: ; %main_body
665 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
666 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
667 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
668 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
669 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
670 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
671 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
672 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
673 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
674 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
675 ; FIJI-NEXT: s_mov_b32 s10, -1
676 ; FIJI-NEXT: s_waitcnt vmcnt(0)
677 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
678 ; FIJI-NEXT: s_waitcnt vmcnt(0)
679 ; FIJI-NEXT: ; return to shader part epilog
681 ; GFX6789-LABEL: load_cube_lwe:
682 ; GFX6789: ; %bb.0: ; %main_body
683 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
684 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
685 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
686 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
687 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
688 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
689 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
690 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
691 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
692 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
693 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
694 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
695 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
696 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
697 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
698 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
699 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
700 ; GFX6789-NEXT: ; return to shader part epilog
702 ; NOPRT-LABEL: load_cube_lwe:
703 ; NOPRT: ; %bb.0: ; %main_body
704 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
705 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm lwe da
706 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
707 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
708 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
709 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
710 ; NOPRT-NEXT: ; return to shader part epilog
712 ; GFX10-LABEL: load_cube_lwe:
713 ; GFX10: ; %bb.0: ; %main_body
714 ; GFX10-NEXT: v_mov_b32_e32 v8, 0
715 ; GFX10-NEXT: v_mov_b32_e32 v7, v2
716 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
717 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
718 ; GFX10-NEXT: v_mov_b32_e32 v9, v8
719 ; GFX10-NEXT: v_mov_b32_e32 v10, v8
720 ; GFX10-NEXT: v_mov_b32_e32 v11, v8
721 ; GFX10-NEXT: v_mov_b32_e32 v12, v8
722 ; GFX10-NEXT: v_mov_b32_e32 v0, v8
723 ; GFX10-NEXT: v_mov_b32_e32 v1, v9
724 ; GFX10-NEXT: v_mov_b32_e32 v2, v10
725 ; GFX10-NEXT: v_mov_b32_e32 v3, v11
726 ; GFX10-NEXT: v_mov_b32_e32 v4, v12
727 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm lwe
728 ; GFX10-NEXT: s_waitcnt vmcnt(0)
729 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9]
730 ; GFX10-NEXT: ; return to shader part epilog
732 ; GFX11-LABEL: load_cube_lwe:
733 ; GFX11: ; %bb.0: ; %main_body
734 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, 0
735 ; GFX11-NEXT: v_dual_mov_b32 v7, v2 :: v_dual_mov_b32 v6, v1
736 ; GFX11-NEXT: v_mov_b32_e32 v9, v8
737 ; GFX11-NEXT: v_mov_b32_e32 v10, v8
738 ; GFX11-NEXT: v_mov_b32_e32 v11, v8
739 ; GFX11-NEXT: v_mov_b32_e32 v12, v8
740 ; GFX11-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
741 ; GFX11-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
742 ; GFX11-NEXT: v_mov_b32_e32 v4, v12
743 ; GFX11-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm lwe
744 ; GFX11-NEXT: s_waitcnt vmcnt(0)
745 ; GFX11-NEXT: global_store_b32 v8, v4, s[8:9]
746 ; GFX11-NEXT: ; return to shader part epilog
748 ; GFX12-LABEL: load_cube_lwe:
749 ; GFX12: ; %bb.0: ; %main_body
750 ; GFX12-NEXT: image_load v[0:4], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE
751 ; GFX12-NEXT: v_mov_b32_e32 v5, 0
752 ; GFX12-NEXT: s_wait_loadcnt 0x0
753 ; GFX12-NEXT: global_store_b32 v5, v4, s[8:9]
754 ; GFX12-NEXT: ; return to shader part epilog
756 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.cube.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 2, i32 0)
757 %v.vec = extractvalue {<4 x float>, i32} %v, 0
758 %v.err = extractvalue {<4 x float>, i32} %v, 1
759 store i32 %v.err, ptr addrspace(1) %out, align 4
760 ret <4 x float> %v.vec
763 define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice) {
764 ; VERDE-LABEL: load_1darray:
765 ; VERDE: ; %bb.0: ; %main_body
766 ; VERDE-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
767 ; VERDE-NEXT: s_waitcnt vmcnt(0)
768 ; VERDE-NEXT: ; return to shader part epilog
770 ; FIJI-LABEL: load_1darray:
771 ; FIJI: ; %bb.0: ; %main_body
772 ; FIJI-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
773 ; FIJI-NEXT: s_waitcnt vmcnt(0)
774 ; FIJI-NEXT: ; return to shader part epilog
776 ; GFX6789-LABEL: load_1darray:
777 ; GFX6789: ; %bb.0: ; %main_body
778 ; GFX6789-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
779 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
780 ; GFX6789-NEXT: ; return to shader part epilog
782 ; NOPRT-LABEL: load_1darray:
783 ; NOPRT: ; %bb.0: ; %main_body
784 ; NOPRT-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
785 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
786 ; NOPRT-NEXT: ; return to shader part epilog
788 ; GFX10PLUS-LABEL: load_1darray:
789 ; GFX10PLUS: ; %bb.0: ; %main_body
790 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm
791 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
792 ; GFX10PLUS-NEXT: ; return to shader part epilog
794 ; GFX12-LABEL: load_1darray:
795 ; GFX12: ; %bb.0: ; %main_body
796 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY
797 ; GFX12-NEXT: s_wait_loadcnt 0x0
798 ; GFX12-NEXT: ; return to shader part epilog
800 %v = call <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i32(i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
804 define amdgpu_ps <4 x float> @load_1darray_tfe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %slice) {
805 ; VERDE-LABEL: load_1darray_tfe:
806 ; VERDE: ; %bb.0: ; %main_body
807 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
808 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
809 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
810 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
811 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
812 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
813 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
814 ; VERDE-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe da
815 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
816 ; VERDE-NEXT: s_mov_b32 s10, -1
817 ; VERDE-NEXT: s_waitcnt vmcnt(0)
818 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
819 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
820 ; VERDE-NEXT: ; return to shader part epilog
822 ; FIJI-LABEL: load_1darray_tfe:
823 ; FIJI: ; %bb.0: ; %main_body
824 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
825 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
826 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
827 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
828 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
829 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
830 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
831 ; FIJI-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe da
832 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
833 ; FIJI-NEXT: s_mov_b32 s10, -1
834 ; FIJI-NEXT: s_waitcnt vmcnt(0)
835 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
836 ; FIJI-NEXT: s_waitcnt vmcnt(0)
837 ; FIJI-NEXT: ; return to shader part epilog
839 ; GFX6789-LABEL: load_1darray_tfe:
840 ; GFX6789: ; %bb.0: ; %main_body
841 ; GFX6789-NEXT: v_mov_b32_e32 v7, 0
842 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
843 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
844 ; GFX6789-NEXT: v_mov_b32_e32 v8, v7
845 ; GFX6789-NEXT: v_mov_b32_e32 v9, v7
846 ; GFX6789-NEXT: v_mov_b32_e32 v10, v7
847 ; GFX6789-NEXT: v_mov_b32_e32 v11, v7
848 ; GFX6789-NEXT: v_mov_b32_e32 v0, v7
849 ; GFX6789-NEXT: v_mov_b32_e32 v1, v8
850 ; GFX6789-NEXT: v_mov_b32_e32 v2, v9
851 ; GFX6789-NEXT: v_mov_b32_e32 v3, v10
852 ; GFX6789-NEXT: v_mov_b32_e32 v4, v11
853 ; GFX6789-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe da
854 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
855 ; GFX6789-NEXT: global_store_dword v7, v4, s[8:9]
856 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
857 ; GFX6789-NEXT: ; return to shader part epilog
859 ; NOPRT-LABEL: load_1darray_tfe:
860 ; NOPRT: ; %bb.0: ; %main_body
861 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
862 ; NOPRT-NEXT: image_load v[0:4], v[0:1], s[0:7] dmask:0xf unorm tfe da
863 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
864 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
865 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
866 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
867 ; NOPRT-NEXT: ; return to shader part epilog
869 ; GFX10-LABEL: load_1darray_tfe:
870 ; GFX10: ; %bb.0: ; %main_body
871 ; GFX10-NEXT: v_mov_b32_e32 v7, 0
872 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
873 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
874 ; GFX10-NEXT: v_mov_b32_e32 v8, v7
875 ; GFX10-NEXT: v_mov_b32_e32 v9, v7
876 ; GFX10-NEXT: v_mov_b32_e32 v10, v7
877 ; GFX10-NEXT: v_mov_b32_e32 v11, v7
878 ; GFX10-NEXT: v_mov_b32_e32 v0, v7
879 ; GFX10-NEXT: v_mov_b32_e32 v1, v8
880 ; GFX10-NEXT: v_mov_b32_e32 v2, v9
881 ; GFX10-NEXT: v_mov_b32_e32 v3, v10
882 ; GFX10-NEXT: v_mov_b32_e32 v4, v11
883 ; GFX10-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm tfe
884 ; GFX10-NEXT: s_waitcnt vmcnt(0)
885 ; GFX10-NEXT: global_store_dword v7, v4, s[8:9]
886 ; GFX10-NEXT: ; return to shader part epilog
888 ; GFX11-LABEL: load_1darray_tfe:
889 ; GFX11: ; %bb.0: ; %main_body
890 ; GFX11-NEXT: v_dual_mov_b32 v7, 0 :: v_dual_mov_b32 v6, v1
891 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, v7
892 ; GFX11-NEXT: v_mov_b32_e32 v9, v7
893 ; GFX11-NEXT: v_mov_b32_e32 v10, v7
894 ; GFX11-NEXT: v_mov_b32_e32 v11, v7
895 ; GFX11-NEXT: v_dual_mov_b32 v0, v7 :: v_dual_mov_b32 v1, v8
896 ; GFX11-NEXT: v_dual_mov_b32 v2, v9 :: v_dual_mov_b32 v3, v10
897 ; GFX11-NEXT: v_mov_b32_e32 v4, v11
898 ; GFX11-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm tfe
899 ; GFX11-NEXT: s_waitcnt vmcnt(0)
900 ; GFX11-NEXT: global_store_b32 v7, v4, s[8:9]
901 ; GFX11-NEXT: ; return to shader part epilog
903 ; GFX12-LABEL: load_1darray_tfe:
904 ; GFX12: ; %bb.0: ; %main_body
905 ; GFX12-NEXT: v_mov_b32_e32 v7, 0
906 ; GFX12-NEXT: v_dual_mov_b32 v5, v1 :: v_dual_mov_b32 v6, v0
907 ; GFX12-NEXT: v_dual_mov_b32 v8, v7 :: v_dual_mov_b32 v9, v7
908 ; GFX12-NEXT: v_dual_mov_b32 v10, v7 :: v_dual_mov_b32 v11, v7
909 ; GFX12-NEXT: v_dual_mov_b32 v0, v7 :: v_dual_mov_b32 v1, v8
910 ; GFX12-NEXT: v_dual_mov_b32 v2, v9 :: v_dual_mov_b32 v3, v10
911 ; GFX12-NEXT: v_mov_b32_e32 v4, v11
912 ; GFX12-NEXT: image_load v[0:4], [v6, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY tfe
913 ; GFX12-NEXT: s_wait_loadcnt 0x0
914 ; GFX12-NEXT: global_store_b32 v7, v4, s[8:9]
915 ; GFX12-NEXT: ; return to shader part epilog
917 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.1darray.v4f32i32.i32(i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 1, i32 0)
918 %v.vec = extractvalue {<4 x float>, i32} %v, 0
919 %v.err = extractvalue {<4 x float>, i32} %v, 1
920 store i32 %v.err, ptr addrspace(1) %out, align 4
921 ret <4 x float> %v.vec
924 define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
925 ; VERDE-LABEL: load_2darray:
926 ; VERDE: ; %bb.0: ; %main_body
927 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
928 ; VERDE-NEXT: s_waitcnt vmcnt(0)
929 ; VERDE-NEXT: ; return to shader part epilog
931 ; FIJI-LABEL: load_2darray:
932 ; FIJI: ; %bb.0: ; %main_body
933 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
934 ; FIJI-NEXT: s_waitcnt vmcnt(0)
935 ; FIJI-NEXT: ; return to shader part epilog
937 ; GFX6789-LABEL: load_2darray:
938 ; GFX6789: ; %bb.0: ; %main_body
939 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
940 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
941 ; GFX6789-NEXT: ; return to shader part epilog
943 ; NOPRT-LABEL: load_2darray:
944 ; NOPRT: ; %bb.0: ; %main_body
945 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
946 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
947 ; NOPRT-NEXT: ; return to shader part epilog
949 ; GFX10PLUS-LABEL: load_2darray:
950 ; GFX10PLUS: ; %bb.0: ; %main_body
951 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm
952 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
953 ; GFX10PLUS-NEXT: ; return to shader part epilog
955 ; GFX12-LABEL: load_2darray:
956 ; GFX12: ; %bb.0: ; %main_body
957 ; GFX12-NEXT: image_load v[0:3], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY
958 ; GFX12-NEXT: s_wait_loadcnt 0x0
959 ; GFX12-NEXT: ; return to shader part epilog
961 %v = call <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
965 define amdgpu_ps <4 x float> @load_2darray_lwe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t, i32 %slice) {
966 ; VERDE-LABEL: load_2darray_lwe:
967 ; VERDE: ; %bb.0: ; %main_body
968 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
969 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
970 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
971 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
972 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
973 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
974 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
975 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
976 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
977 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
978 ; VERDE-NEXT: s_mov_b32 s10, -1
979 ; VERDE-NEXT: s_waitcnt vmcnt(0)
980 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
981 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
982 ; VERDE-NEXT: ; return to shader part epilog
984 ; FIJI-LABEL: load_2darray_lwe:
985 ; FIJI: ; %bb.0: ; %main_body
986 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
987 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
988 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
989 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
990 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
991 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
992 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
993 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
994 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
995 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
996 ; FIJI-NEXT: s_mov_b32 s10, -1
997 ; FIJI-NEXT: s_waitcnt vmcnt(0)
998 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
999 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1000 ; FIJI-NEXT: ; return to shader part epilog
1002 ; GFX6789-LABEL: load_2darray_lwe:
1003 ; GFX6789: ; %bb.0: ; %main_body
1004 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
1005 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
1006 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1007 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1008 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
1009 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
1010 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
1011 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
1012 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
1013 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
1014 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
1015 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
1016 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
1017 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
1018 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1019 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
1020 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1021 ; GFX6789-NEXT: ; return to shader part epilog
1023 ; NOPRT-LABEL: load_2darray_lwe:
1024 ; NOPRT: ; %bb.0: ; %main_body
1025 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1026 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm lwe da
1027 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1028 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1029 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1030 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1031 ; NOPRT-NEXT: ; return to shader part epilog
1033 ; GFX10-LABEL: load_2darray_lwe:
1034 ; GFX10: ; %bb.0: ; %main_body
1035 ; GFX10-NEXT: v_mov_b32_e32 v8, 0
1036 ; GFX10-NEXT: v_mov_b32_e32 v7, v2
1037 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
1038 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
1039 ; GFX10-NEXT: v_mov_b32_e32 v9, v8
1040 ; GFX10-NEXT: v_mov_b32_e32 v10, v8
1041 ; GFX10-NEXT: v_mov_b32_e32 v11, v8
1042 ; GFX10-NEXT: v_mov_b32_e32 v12, v8
1043 ; GFX10-NEXT: v_mov_b32_e32 v0, v8
1044 ; GFX10-NEXT: v_mov_b32_e32 v1, v9
1045 ; GFX10-NEXT: v_mov_b32_e32 v2, v10
1046 ; GFX10-NEXT: v_mov_b32_e32 v3, v11
1047 ; GFX10-NEXT: v_mov_b32_e32 v4, v12
1048 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm lwe
1049 ; GFX10-NEXT: s_waitcnt vmcnt(0)
1050 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9]
1051 ; GFX10-NEXT: ; return to shader part epilog
1053 ; GFX11-LABEL: load_2darray_lwe:
1054 ; GFX11: ; %bb.0: ; %main_body
1055 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, 0
1056 ; GFX11-NEXT: v_dual_mov_b32 v7, v2 :: v_dual_mov_b32 v6, v1
1057 ; GFX11-NEXT: v_mov_b32_e32 v9, v8
1058 ; GFX11-NEXT: v_mov_b32_e32 v10, v8
1059 ; GFX11-NEXT: v_mov_b32_e32 v11, v8
1060 ; GFX11-NEXT: v_mov_b32_e32 v12, v8
1061 ; GFX11-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
1062 ; GFX11-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
1063 ; GFX11-NEXT: v_mov_b32_e32 v4, v12
1064 ; GFX11-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm lwe
1065 ; GFX11-NEXT: s_waitcnt vmcnt(0)
1066 ; GFX11-NEXT: global_store_b32 v8, v4, s[8:9]
1067 ; GFX11-NEXT: ; return to shader part epilog
1069 ; GFX12-LABEL: load_2darray_lwe:
1070 ; GFX12: ; %bb.0: ; %main_body
1071 ; GFX12-NEXT: image_load v[0:4], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY
1072 ; GFX12-NEXT: v_mov_b32_e32 v5, 0
1073 ; GFX12-NEXT: s_wait_loadcnt 0x0
1074 ; GFX12-NEXT: global_store_b32 v5, v4, s[8:9]
1075 ; GFX12-NEXT: ; return to shader part epilog
1077 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.2darray.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 2, i32 0)
1078 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1079 %v.err = extractvalue {<4 x float>, i32} %v, 1
1080 store i32 %v.err, ptr addrspace(1) %out, align 4
1081 ret <4 x float> %v.vec
1084 define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %fragid) {
1085 ; VERDE-LABEL: load_2dmsaa:
1086 ; VERDE: ; %bb.0: ; %main_body
1087 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1088 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1089 ; VERDE-NEXT: ; return to shader part epilog
1091 ; FIJI-LABEL: load_2dmsaa:
1092 ; FIJI: ; %bb.0: ; %main_body
1093 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1094 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1095 ; FIJI-NEXT: ; return to shader part epilog
1097 ; GFX6789-LABEL: load_2dmsaa:
1098 ; GFX6789: ; %bb.0: ; %main_body
1099 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1100 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1101 ; GFX6789-NEXT: ; return to shader part epilog
1103 ; NOPRT-LABEL: load_2dmsaa:
1104 ; NOPRT: ; %bb.0: ; %main_body
1105 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1106 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1107 ; NOPRT-NEXT: ; return to shader part epilog
1109 ; GFX10PLUS-LABEL: load_2dmsaa:
1110 ; GFX10PLUS: ; %bb.0: ; %main_body
1111 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm
1112 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1113 ; GFX10PLUS-NEXT: ; return to shader part epilog
1115 ; GFX12-LABEL: load_2dmsaa:
1116 ; GFX12: ; %bb.0: ; %main_body
1117 ; GFX12-NEXT: image_load v[0:3], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA
1118 ; GFX12-NEXT: s_wait_loadcnt 0x0
1119 ; GFX12-NEXT: ; return to shader part epilog
1121 %v = call <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
1125 define amdgpu_ps <4 x float> @load_2dmsaa_both(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t, i32 %fragid) {
1126 ; VERDE-LABEL: load_2dmsaa_both:
1127 ; VERDE: ; %bb.0: ; %main_body
1128 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1129 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1130 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
1131 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1132 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1133 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1134 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1135 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1136 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
1137 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1138 ; VERDE-NEXT: s_mov_b32 s10, -1
1139 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1140 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1141 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1142 ; VERDE-NEXT: ; return to shader part epilog
1144 ; FIJI-LABEL: load_2dmsaa_both:
1145 ; FIJI: ; %bb.0: ; %main_body
1146 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1147 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1148 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
1149 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1150 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1151 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1152 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1153 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1154 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
1155 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1156 ; FIJI-NEXT: s_mov_b32 s10, -1
1157 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1158 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1159 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1160 ; FIJI-NEXT: ; return to shader part epilog
1162 ; GFX6789-LABEL: load_2dmsaa_both:
1163 ; GFX6789: ; %bb.0: ; %main_body
1164 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
1165 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
1166 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1167 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1168 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
1169 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
1170 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
1171 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
1172 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
1173 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
1174 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
1175 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
1176 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
1177 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
1178 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1179 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
1180 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1181 ; GFX6789-NEXT: ; return to shader part epilog
1183 ; NOPRT-LABEL: load_2dmsaa_both:
1184 ; NOPRT: ; %bb.0: ; %main_body
1185 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1186 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm tfe lwe
1187 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1188 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1189 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1190 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1191 ; NOPRT-NEXT: ; return to shader part epilog
1193 ; GFX10-LABEL: load_2dmsaa_both:
1194 ; GFX10: ; %bb.0: ; %main_body
1195 ; GFX10-NEXT: v_mov_b32_e32 v8, 0
1196 ; GFX10-NEXT: v_mov_b32_e32 v7, v2
1197 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
1198 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
1199 ; GFX10-NEXT: v_mov_b32_e32 v9, v8
1200 ; GFX10-NEXT: v_mov_b32_e32 v10, v8
1201 ; GFX10-NEXT: v_mov_b32_e32 v11, v8
1202 ; GFX10-NEXT: v_mov_b32_e32 v12, v8
1203 ; GFX10-NEXT: v_mov_b32_e32 v0, v8
1204 ; GFX10-NEXT: v_mov_b32_e32 v1, v9
1205 ; GFX10-NEXT: v_mov_b32_e32 v2, v10
1206 ; GFX10-NEXT: v_mov_b32_e32 v3, v11
1207 ; GFX10-NEXT: v_mov_b32_e32 v4, v12
1208 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm tfe lwe
1209 ; GFX10-NEXT: s_waitcnt vmcnt(0)
1210 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9]
1211 ; GFX10-NEXT: ; return to shader part epilog
1213 ; GFX11-LABEL: load_2dmsaa_both:
1214 ; GFX11: ; %bb.0: ; %main_body
1215 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, 0
1216 ; GFX11-NEXT: v_dual_mov_b32 v7, v2 :: v_dual_mov_b32 v6, v1
1217 ; GFX11-NEXT: v_mov_b32_e32 v9, v8
1218 ; GFX11-NEXT: v_mov_b32_e32 v10, v8
1219 ; GFX11-NEXT: v_mov_b32_e32 v11, v8
1220 ; GFX11-NEXT: v_mov_b32_e32 v12, v8
1221 ; GFX11-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
1222 ; GFX11-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
1223 ; GFX11-NEXT: v_mov_b32_e32 v4, v12
1224 ; GFX11-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm tfe lwe
1225 ; GFX11-NEXT: s_waitcnt vmcnt(0)
1226 ; GFX11-NEXT: global_store_b32 v8, v4, s[8:9]
1227 ; GFX11-NEXT: ; return to shader part epilog
1229 ; GFX12-LABEL: load_2dmsaa_both:
1230 ; GFX12: ; %bb.0: ; %main_body
1231 ; GFX12-NEXT: v_dual_mov_b32 v7, v0 :: v_dual_mov_b32 v8, 0
1232 ; GFX12-NEXT: v_dual_mov_b32 v5, v2 :: v_dual_mov_b32 v6, v1
1233 ; GFX12-NEXT: v_dual_mov_b32 v9, v8 :: v_dual_mov_b32 v10, v8
1234 ; GFX12-NEXT: v_dual_mov_b32 v11, v8 :: v_dual_mov_b32 v12, v8
1235 ; GFX12-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
1236 ; GFX12-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
1237 ; GFX12-NEXT: v_mov_b32_e32 v4, v12
1238 ; GFX12-NEXT: image_load v[0:4], [v7, v6, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA tfe
1239 ; GFX12-NEXT: s_wait_loadcnt 0x0
1240 ; GFX12-NEXT: global_store_b32 v8, v4, s[8:9]
1241 ; GFX12-NEXT: ; return to shader part epilog
1243 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.2dmsaa.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 3, i32 0)
1244 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1245 %v.err = extractvalue {<4 x float>, i32} %v, 1
1246 store i32 %v.err, ptr addrspace(1) %out, align 4
1247 ret <4 x float> %v.vec
1250 define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
1251 ; VERDE-LABEL: load_2darraymsaa:
1252 ; VERDE: ; %bb.0: ; %main_body
1253 ; VERDE-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1254 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1255 ; VERDE-NEXT: ; return to shader part epilog
1257 ; FIJI-LABEL: load_2darraymsaa:
1258 ; FIJI: ; %bb.0: ; %main_body
1259 ; FIJI-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1260 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1261 ; FIJI-NEXT: ; return to shader part epilog
1263 ; GFX6789-LABEL: load_2darraymsaa:
1264 ; GFX6789: ; %bb.0: ; %main_body
1265 ; GFX6789-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1266 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1267 ; GFX6789-NEXT: ; return to shader part epilog
1269 ; NOPRT-LABEL: load_2darraymsaa:
1270 ; NOPRT: ; %bb.0: ; %main_body
1271 ; NOPRT-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1272 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1273 ; NOPRT-NEXT: ; return to shader part epilog
1275 ; GFX10PLUS-LABEL: load_2darraymsaa:
1276 ; GFX10PLUS: ; %bb.0: ; %main_body
1277 ; GFX10PLUS-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm
1278 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1279 ; GFX10PLUS-NEXT: ; return to shader part epilog
1281 ; GFX12-LABEL: load_2darraymsaa:
1282 ; GFX12: ; %bb.0: ; %main_body
1283 ; GFX12-NEXT: image_load v[0:3], [v0, v1, v2, v3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY
1284 ; GFX12-NEXT: s_wait_loadcnt 0x0
1285 ; GFX12-NEXT: ; return to shader part epilog
1287 %v = call <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
1291 define amdgpu_ps <4 x float> @load_2darraymsaa_tfe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
1292 ; VERDE-LABEL: load_2darraymsaa_tfe:
1293 ; VERDE: ; %bb.0: ; %main_body
1294 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1295 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1296 ; VERDE-NEXT: v_mov_b32_e32 v8, v3
1297 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
1298 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1299 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1300 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1301 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1302 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1303 ; VERDE-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf unorm tfe da
1304 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1305 ; VERDE-NEXT: s_mov_b32 s10, -1
1306 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1307 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1308 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1309 ; VERDE-NEXT: ; return to shader part epilog
1311 ; FIJI-LABEL: load_2darraymsaa_tfe:
1312 ; FIJI: ; %bb.0: ; %main_body
1313 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1314 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1315 ; FIJI-NEXT: v_mov_b32_e32 v8, v3
1316 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
1317 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1318 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1319 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1320 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1321 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1322 ; FIJI-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf unorm tfe da
1323 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1324 ; FIJI-NEXT: s_mov_b32 s10, -1
1325 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1326 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1327 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1328 ; FIJI-NEXT: ; return to shader part epilog
1330 ; GFX6789-LABEL: load_2darraymsaa_tfe:
1331 ; GFX6789: ; %bb.0: ; %main_body
1332 ; GFX6789-NEXT: v_mov_b32_e32 v9, 0
1333 ; GFX6789-NEXT: v_mov_b32_e32 v8, v3
1334 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
1335 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1336 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1337 ; GFX6789-NEXT: v_mov_b32_e32 v10, v9
1338 ; GFX6789-NEXT: v_mov_b32_e32 v11, v9
1339 ; GFX6789-NEXT: v_mov_b32_e32 v12, v9
1340 ; GFX6789-NEXT: v_mov_b32_e32 v13, v9
1341 ; GFX6789-NEXT: v_mov_b32_e32 v0, v9
1342 ; GFX6789-NEXT: v_mov_b32_e32 v1, v10
1343 ; GFX6789-NEXT: v_mov_b32_e32 v2, v11
1344 ; GFX6789-NEXT: v_mov_b32_e32 v3, v12
1345 ; GFX6789-NEXT: v_mov_b32_e32 v4, v13
1346 ; GFX6789-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf unorm tfe da
1347 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1348 ; GFX6789-NEXT: global_store_dword v9, v4, s[8:9]
1349 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1350 ; GFX6789-NEXT: ; return to shader part epilog
1352 ; NOPRT-LABEL: load_2darraymsaa_tfe:
1353 ; NOPRT: ; %bb.0: ; %main_body
1354 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1355 ; NOPRT-NEXT: image_load v[0:4], v[0:3], s[0:7] dmask:0xf unorm tfe da
1356 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1357 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1358 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1359 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1360 ; NOPRT-NEXT: ; return to shader part epilog
1362 ; GFX10-LABEL: load_2darraymsaa_tfe:
1363 ; GFX10: ; %bb.0: ; %main_body
1364 ; GFX10-NEXT: v_mov_b32_e32 v9, 0
1365 ; GFX10-NEXT: v_mov_b32_e32 v8, v3
1366 ; GFX10-NEXT: v_mov_b32_e32 v7, v2
1367 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
1368 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
1369 ; GFX10-NEXT: v_mov_b32_e32 v10, v9
1370 ; GFX10-NEXT: v_mov_b32_e32 v11, v9
1371 ; GFX10-NEXT: v_mov_b32_e32 v12, v9
1372 ; GFX10-NEXT: v_mov_b32_e32 v13, v9
1373 ; GFX10-NEXT: v_mov_b32_e32 v0, v9
1374 ; GFX10-NEXT: v_mov_b32_e32 v1, v10
1375 ; GFX10-NEXT: v_mov_b32_e32 v2, v11
1376 ; GFX10-NEXT: v_mov_b32_e32 v3, v12
1377 ; GFX10-NEXT: v_mov_b32_e32 v4, v13
1378 ; GFX10-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm tfe
1379 ; GFX10-NEXT: s_waitcnt vmcnt(0)
1380 ; GFX10-NEXT: global_store_dword v9, v4, s[8:9]
1381 ; GFX10-NEXT: ; return to shader part epilog
1383 ; GFX11-LABEL: load_2darraymsaa_tfe:
1384 ; GFX11: ; %bb.0: ; %main_body
1385 ; GFX11-NEXT: v_dual_mov_b32 v9, 0 :: v_dual_mov_b32 v8, v3
1386 ; GFX11-NEXT: v_dual_mov_b32 v7, v2 :: v_dual_mov_b32 v6, v1
1387 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v10, v9
1388 ; GFX11-NEXT: v_mov_b32_e32 v11, v9
1389 ; GFX11-NEXT: v_mov_b32_e32 v12, v9
1390 ; GFX11-NEXT: v_mov_b32_e32 v13, v9
1391 ; GFX11-NEXT: v_dual_mov_b32 v0, v9 :: v_dual_mov_b32 v1, v10
1392 ; GFX11-NEXT: v_dual_mov_b32 v2, v11 :: v_dual_mov_b32 v3, v12
1393 ; GFX11-NEXT: v_mov_b32_e32 v4, v13
1394 ; GFX11-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm tfe
1395 ; GFX11-NEXT: s_waitcnt vmcnt(0)
1396 ; GFX11-NEXT: global_store_b32 v9, v4, s[8:9]
1397 ; GFX11-NEXT: ; return to shader part epilog
1399 ; GFX12-LABEL: load_2darraymsaa_tfe:
1400 ; GFX12: ; %bb.0: ; %main_body
1401 ; GFX12-NEXT: v_mov_b32_e32 v9, 0
1402 ; GFX12-NEXT: v_dual_mov_b32 v5, v3 :: v_dual_mov_b32 v6, v2
1403 ; GFX12-NEXT: v_dual_mov_b32 v7, v1 :: v_dual_mov_b32 v8, v0
1404 ; GFX12-NEXT: v_dual_mov_b32 v10, v9 :: v_dual_mov_b32 v11, v9
1405 ; GFX12-NEXT: v_dual_mov_b32 v12, v9 :: v_dual_mov_b32 v13, v9
1406 ; GFX12-NEXT: v_dual_mov_b32 v0, v9 :: v_dual_mov_b32 v1, v10
1407 ; GFX12-NEXT: v_dual_mov_b32 v2, v11 :: v_dual_mov_b32 v3, v12
1408 ; GFX12-NEXT: v_mov_b32_e32 v4, v13
1409 ; GFX12-NEXT: image_load v[0:4], [v8, v7, v6, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY tfe
1410 ; GFX12-NEXT: s_wait_loadcnt 0x0
1411 ; GFX12-NEXT: global_store_b32 v9, v4, s[8:9]
1412 ; GFX12-NEXT: ; return to shader part epilog
1414 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.2darraymsaa.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 1, i32 0)
1415 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1416 %v.err = extractvalue {<4 x float>, i32} %v, 1
1417 store i32 %v.err, ptr addrspace(1) %out, align 4
1418 ret <4 x float> %v.vec
1421 define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, i32 %s, i32 %mip) {
1422 ; VERDE-LABEL: load_mip_1d:
1423 ; VERDE: ; %bb.0: ; %main_body
1424 ; VERDE-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1425 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1426 ; VERDE-NEXT: ; return to shader part epilog
1428 ; FIJI-LABEL: load_mip_1d:
1429 ; FIJI: ; %bb.0: ; %main_body
1430 ; FIJI-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1431 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1432 ; FIJI-NEXT: ; return to shader part epilog
1434 ; GFX6789-LABEL: load_mip_1d:
1435 ; GFX6789: ; %bb.0: ; %main_body
1436 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1437 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1438 ; GFX6789-NEXT: ; return to shader part epilog
1440 ; NOPRT-LABEL: load_mip_1d:
1441 ; NOPRT: ; %bb.0: ; %main_body
1442 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1443 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1444 ; NOPRT-NEXT: ; return to shader part epilog
1446 ; GFX10PLUS-LABEL: load_mip_1d:
1447 ; GFX10PLUS: ; %bb.0: ; %main_body
1448 ; GFX10PLUS-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
1449 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1450 ; GFX10PLUS-NEXT: ; return to shader part epilog
1452 ; GFX12-LABEL: load_mip_1d:
1453 ; GFX12: ; %bb.0: ; %main_body
1454 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
1455 ; GFX12-NEXT: s_wait_loadcnt 0x0
1456 ; GFX12-NEXT: ; return to shader part epilog
1458 %v = call <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i32(i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1462 define amdgpu_ps <4 x float> @load_mip_1d_lwe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %mip) {
1463 ; VERDE-LABEL: load_mip_1d_lwe:
1464 ; VERDE: ; %bb.0: ; %main_body
1465 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1466 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1467 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1468 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1469 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1470 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1471 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1472 ; VERDE-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf unorm lwe
1473 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1474 ; VERDE-NEXT: s_mov_b32 s10, -1
1475 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1476 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1477 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1478 ; VERDE-NEXT: ; return to shader part epilog
1480 ; FIJI-LABEL: load_mip_1d_lwe:
1481 ; FIJI: ; %bb.0: ; %main_body
1482 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1483 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1484 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1485 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1486 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1487 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1488 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1489 ; FIJI-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf unorm lwe
1490 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1491 ; FIJI-NEXT: s_mov_b32 s10, -1
1492 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1493 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1494 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1495 ; FIJI-NEXT: ; return to shader part epilog
1497 ; GFX6789-LABEL: load_mip_1d_lwe:
1498 ; GFX6789: ; %bb.0: ; %main_body
1499 ; GFX6789-NEXT: v_mov_b32_e32 v7, 0
1500 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1501 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1502 ; GFX6789-NEXT: v_mov_b32_e32 v8, v7
1503 ; GFX6789-NEXT: v_mov_b32_e32 v9, v7
1504 ; GFX6789-NEXT: v_mov_b32_e32 v10, v7
1505 ; GFX6789-NEXT: v_mov_b32_e32 v11, v7
1506 ; GFX6789-NEXT: v_mov_b32_e32 v0, v7
1507 ; GFX6789-NEXT: v_mov_b32_e32 v1, v8
1508 ; GFX6789-NEXT: v_mov_b32_e32 v2, v9
1509 ; GFX6789-NEXT: v_mov_b32_e32 v3, v10
1510 ; GFX6789-NEXT: v_mov_b32_e32 v4, v11
1511 ; GFX6789-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf unorm lwe
1512 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1513 ; GFX6789-NEXT: global_store_dword v7, v4, s[8:9]
1514 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1515 ; GFX6789-NEXT: ; return to shader part epilog
1517 ; NOPRT-LABEL: load_mip_1d_lwe:
1518 ; NOPRT: ; %bb.0: ; %main_body
1519 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1520 ; NOPRT-NEXT: image_load_mip v[0:4], v[0:1], s[0:7] dmask:0xf unorm lwe
1521 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1522 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1523 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1524 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1525 ; NOPRT-NEXT: ; return to shader part epilog
1527 ; GFX10-LABEL: load_mip_1d_lwe:
1528 ; GFX10: ; %bb.0: ; %main_body
1529 ; GFX10-NEXT: v_mov_b32_e32 v7, 0
1530 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
1531 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
1532 ; GFX10-NEXT: v_mov_b32_e32 v8, v7
1533 ; GFX10-NEXT: v_mov_b32_e32 v9, v7
1534 ; GFX10-NEXT: v_mov_b32_e32 v10, v7
1535 ; GFX10-NEXT: v_mov_b32_e32 v11, v7
1536 ; GFX10-NEXT: v_mov_b32_e32 v0, v7
1537 ; GFX10-NEXT: v_mov_b32_e32 v1, v8
1538 ; GFX10-NEXT: v_mov_b32_e32 v2, v9
1539 ; GFX10-NEXT: v_mov_b32_e32 v3, v10
1540 ; GFX10-NEXT: v_mov_b32_e32 v4, v11
1541 ; GFX10-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe
1542 ; GFX10-NEXT: s_waitcnt vmcnt(0)
1543 ; GFX10-NEXT: global_store_dword v7, v4, s[8:9]
1544 ; GFX10-NEXT: ; return to shader part epilog
1546 ; GFX11-LABEL: load_mip_1d_lwe:
1547 ; GFX11: ; %bb.0: ; %main_body
1548 ; GFX11-NEXT: v_dual_mov_b32 v7, 0 :: v_dual_mov_b32 v6, v1
1549 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, v7
1550 ; GFX11-NEXT: v_mov_b32_e32 v9, v7
1551 ; GFX11-NEXT: v_mov_b32_e32 v10, v7
1552 ; GFX11-NEXT: v_mov_b32_e32 v11, v7
1553 ; GFX11-NEXT: v_dual_mov_b32 v0, v7 :: v_dual_mov_b32 v1, v8
1554 ; GFX11-NEXT: v_dual_mov_b32 v2, v9 :: v_dual_mov_b32 v3, v10
1555 ; GFX11-NEXT: v_mov_b32_e32 v4, v11
1556 ; GFX11-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe
1557 ; GFX11-NEXT: s_waitcnt vmcnt(0)
1558 ; GFX11-NEXT: global_store_b32 v7, v4, s[8:9]
1559 ; GFX11-NEXT: ; return to shader part epilog
1561 ; GFX12-LABEL: load_mip_1d_lwe:
1562 ; GFX12: ; %bb.0: ; %main_body
1563 ; GFX12-NEXT: image_load_mip v[0:4], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
1564 ; GFX12-NEXT: v_mov_b32_e32 v5, 0
1565 ; GFX12-NEXT: s_wait_loadcnt 0x0
1566 ; GFX12-NEXT: global_store_b32 v5, v4, s[8:9]
1567 ; GFX12-NEXT: ; return to shader part epilog
1569 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.mip.1d.v4f32i32.i32(i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 2, i32 0)
1570 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1571 %v.err = extractvalue {<4 x float>, i32} %v, 1
1572 store i32 %v.err, ptr addrspace(1) %out, align 4
1573 ret <4 x float> %v.vec
1576 define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1577 ; VERDE-LABEL: load_mip_2d:
1578 ; VERDE: ; %bb.0: ; %main_body
1579 ; VERDE-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1580 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1581 ; VERDE-NEXT: ; return to shader part epilog
1583 ; FIJI-LABEL: load_mip_2d:
1584 ; FIJI: ; %bb.0: ; %main_body
1585 ; FIJI-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1586 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1587 ; FIJI-NEXT: ; return to shader part epilog
1589 ; GFX6789-LABEL: load_mip_2d:
1590 ; GFX6789: ; %bb.0: ; %main_body
1591 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1592 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1593 ; GFX6789-NEXT: ; return to shader part epilog
1595 ; NOPRT-LABEL: load_mip_2d:
1596 ; NOPRT: ; %bb.0: ; %main_body
1597 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1598 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1599 ; NOPRT-NEXT: ; return to shader part epilog
1601 ; GFX10PLUS-LABEL: load_mip_2d:
1602 ; GFX10PLUS: ; %bb.0: ; %main_body
1603 ; GFX10PLUS-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
1604 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1605 ; GFX10PLUS-NEXT: ; return to shader part epilog
1607 ; GFX12-LABEL: load_mip_2d:
1608 ; GFX12: ; %bb.0: ; %main_body
1609 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D
1610 ; GFX12-NEXT: s_wait_loadcnt 0x0
1611 ; GFX12-NEXT: ; return to shader part epilog
1613 %v = call <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1617 define amdgpu_ps <4 x float> @load_mip_2d_tfe(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s, i32 %t, i32 %mip) {
1618 ; VERDE-LABEL: load_mip_2d_tfe:
1619 ; VERDE: ; %bb.0: ; %main_body
1620 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1621 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1622 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
1623 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1624 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1625 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1626 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1627 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1628 ; VERDE-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe
1629 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1630 ; VERDE-NEXT: s_mov_b32 s10, -1
1631 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1632 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1633 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1634 ; VERDE-NEXT: ; return to shader part epilog
1636 ; FIJI-LABEL: load_mip_2d_tfe:
1637 ; FIJI: ; %bb.0: ; %main_body
1638 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1639 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1640 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
1641 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1642 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1643 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1644 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1645 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1646 ; FIJI-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe
1647 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1648 ; FIJI-NEXT: s_mov_b32 s10, -1
1649 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1650 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1651 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1652 ; FIJI-NEXT: ; return to shader part epilog
1654 ; GFX6789-LABEL: load_mip_2d_tfe:
1655 ; GFX6789: ; %bb.0: ; %main_body
1656 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
1657 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
1658 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1659 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1660 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
1661 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
1662 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
1663 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
1664 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
1665 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
1666 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
1667 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
1668 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
1669 ; GFX6789-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe
1670 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1671 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
1672 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1673 ; GFX6789-NEXT: ; return to shader part epilog
1675 ; NOPRT-LABEL: load_mip_2d_tfe:
1676 ; NOPRT: ; %bb.0: ; %main_body
1677 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1678 ; NOPRT-NEXT: image_load_mip v[0:4], v[0:2], s[0:7] dmask:0xf unorm tfe
1679 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1680 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1681 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1682 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1683 ; NOPRT-NEXT: ; return to shader part epilog
1685 ; GFX10-LABEL: load_mip_2d_tfe:
1686 ; GFX10: ; %bb.0: ; %main_body
1687 ; GFX10-NEXT: v_mov_b32_e32 v8, 0
1688 ; GFX10-NEXT: v_mov_b32_e32 v7, v2
1689 ; GFX10-NEXT: v_mov_b32_e32 v6, v1
1690 ; GFX10-NEXT: v_mov_b32_e32 v5, v0
1691 ; GFX10-NEXT: v_mov_b32_e32 v9, v8
1692 ; GFX10-NEXT: v_mov_b32_e32 v10, v8
1693 ; GFX10-NEXT: v_mov_b32_e32 v11, v8
1694 ; GFX10-NEXT: v_mov_b32_e32 v12, v8
1695 ; GFX10-NEXT: v_mov_b32_e32 v0, v8
1696 ; GFX10-NEXT: v_mov_b32_e32 v1, v9
1697 ; GFX10-NEXT: v_mov_b32_e32 v2, v10
1698 ; GFX10-NEXT: v_mov_b32_e32 v3, v11
1699 ; GFX10-NEXT: v_mov_b32_e32 v4, v12
1700 ; GFX10-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe
1701 ; GFX10-NEXT: s_waitcnt vmcnt(0)
1702 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9]
1703 ; GFX10-NEXT: ; return to shader part epilog
1705 ; GFX11-LABEL: load_mip_2d_tfe:
1706 ; GFX11: ; %bb.0: ; %main_body
1707 ; GFX11-NEXT: v_dual_mov_b32 v5, v0 :: v_dual_mov_b32 v8, 0
1708 ; GFX11-NEXT: v_dual_mov_b32 v7, v2 :: v_dual_mov_b32 v6, v1
1709 ; GFX11-NEXT: v_mov_b32_e32 v9, v8
1710 ; GFX11-NEXT: v_mov_b32_e32 v10, v8
1711 ; GFX11-NEXT: v_mov_b32_e32 v11, v8
1712 ; GFX11-NEXT: v_mov_b32_e32 v12, v8
1713 ; GFX11-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
1714 ; GFX11-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
1715 ; GFX11-NEXT: v_mov_b32_e32 v4, v12
1716 ; GFX11-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe
1717 ; GFX11-NEXT: s_waitcnt vmcnt(0)
1718 ; GFX11-NEXT: global_store_b32 v8, v4, s[8:9]
1719 ; GFX11-NEXT: ; return to shader part epilog
1721 ; GFX12-LABEL: load_mip_2d_tfe:
1722 ; GFX12: ; %bb.0: ; %main_body
1723 ; GFX12-NEXT: v_dual_mov_b32 v7, v0 :: v_dual_mov_b32 v8, 0
1724 ; GFX12-NEXT: v_dual_mov_b32 v5, v2 :: v_dual_mov_b32 v6, v1
1725 ; GFX12-NEXT: v_dual_mov_b32 v9, v8 :: v_dual_mov_b32 v10, v8
1726 ; GFX12-NEXT: v_dual_mov_b32 v11, v8 :: v_dual_mov_b32 v12, v8
1727 ; GFX12-NEXT: v_dual_mov_b32 v0, v8 :: v_dual_mov_b32 v1, v9
1728 ; GFX12-NEXT: v_dual_mov_b32 v2, v10 :: v_dual_mov_b32 v3, v11
1729 ; GFX12-NEXT: v_mov_b32_e32 v4, v12
1730 ; GFX12-NEXT: image_load_mip v[0:4], [v7, v6, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D tfe
1731 ; GFX12-NEXT: s_wait_loadcnt 0x0
1732 ; GFX12-NEXT: global_store_b32 v8, v4, s[8:9]
1733 ; GFX12-NEXT: ; return to shader part epilog
1735 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 1, i32 0)
1736 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1737 %v.err = extractvalue {<4 x float>, i32} %v, 1
1738 store i32 %v.err, ptr addrspace(1) %out, align 4
1739 ret <4 x float> %v.vec
1742 define amdgpu_ps float @load_1d_V2_tfe_dmask0(<8 x i32> inreg %rsrc, i32 %s) {
1743 ; VERDE-LABEL: load_1d_V2_tfe_dmask0:
1744 ; VERDE: ; %bb.0: ; %main_body
1745 ; VERDE-NEXT: v_mov_b32_e32 v1, 0
1746 ; VERDE-NEXT: v_mov_b32_e32 v2, v1
1747 ; VERDE-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1748 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1749 ; VERDE-NEXT: v_mov_b32_e32 v0, v2
1750 ; VERDE-NEXT: ; return to shader part epilog
1752 ; FIJI-LABEL: load_1d_V2_tfe_dmask0:
1753 ; FIJI: ; %bb.0: ; %main_body
1754 ; FIJI-NEXT: v_mov_b32_e32 v1, 0
1755 ; FIJI-NEXT: v_mov_b32_e32 v2, v1
1756 ; FIJI-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1757 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1758 ; FIJI-NEXT: v_mov_b32_e32 v0, v2
1759 ; FIJI-NEXT: ; return to shader part epilog
1761 ; GFX6789-LABEL: load_1d_V2_tfe_dmask0:
1762 ; GFX6789: ; %bb.0: ; %main_body
1763 ; GFX6789-NEXT: v_mov_b32_e32 v1, 0
1764 ; GFX6789-NEXT: v_mov_b32_e32 v2, v1
1765 ; GFX6789-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1766 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1767 ; GFX6789-NEXT: v_mov_b32_e32 v0, v2
1768 ; GFX6789-NEXT: ; return to shader part epilog
1770 ; NOPRT-LABEL: load_1d_V2_tfe_dmask0:
1771 ; NOPRT: ; %bb.0: ; %main_body
1772 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
1773 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x1 unorm tfe
1774 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1775 ; NOPRT-NEXT: v_mov_b32_e32 v0, v1
1776 ; NOPRT-NEXT: ; return to shader part epilog
1778 ; GFX10PLUS-LABEL: load_1d_V2_tfe_dmask0:
1779 ; GFX10PLUS: ; %bb.0: ; %main_body
1780 ; GFX10PLUS-NEXT: v_mov_b32_e32 v1, 0
1781 ; GFX10PLUS-NEXT: v_mov_b32_e32 v2, v1
1782 ; GFX10PLUS-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D unorm tfe
1783 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1784 ; GFX10PLUS-NEXT: v_mov_b32_e32 v0, v2
1785 ; GFX10PLUS-NEXT: ; return to shader part epilog
1787 ; GFX12-LABEL: load_1d_V2_tfe_dmask0:
1788 ; GFX12: ; %bb.0: ; %main_body
1789 ; GFX12-NEXT: v_mov_b32_e32 v1, 0
1790 ; GFX12-NEXT: v_mov_b32_e32 v2, v1
1791 ; GFX12-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D tfe
1792 ; GFX12-NEXT: s_wait_loadcnt 0x0
1793 ; GFX12-NEXT: v_mov_b32_e32 v0, v2
1794 ; GFX12-NEXT: ; return to shader part epilog
1796 %v = call {<2 x float>,i32} @llvm.amdgcn.image.load.1d.v2f32i32.i32(i32 0, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
1797 %v.err = extractvalue {<2 x float>, i32} %v, 1
1798 %vv = bitcast i32 %v.err to float
1802 define amdgpu_ps float @load_1d_V1_tfe_dmask0(<8 x i32> inreg %rsrc, i32 %s) {
1803 ; VERDE-LABEL: load_1d_V1_tfe_dmask0:
1804 ; VERDE: ; %bb.0: ; %main_body
1805 ; VERDE-NEXT: v_mov_b32_e32 v1, 0
1806 ; VERDE-NEXT: v_mov_b32_e32 v2, v1
1807 ; VERDE-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1808 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1809 ; VERDE-NEXT: v_mov_b32_e32 v0, v2
1810 ; VERDE-NEXT: ; return to shader part epilog
1812 ; FIJI-LABEL: load_1d_V1_tfe_dmask0:
1813 ; FIJI: ; %bb.0: ; %main_body
1814 ; FIJI-NEXT: v_mov_b32_e32 v1, 0
1815 ; FIJI-NEXT: v_mov_b32_e32 v2, v1
1816 ; FIJI-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1817 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1818 ; FIJI-NEXT: v_mov_b32_e32 v0, v2
1819 ; FIJI-NEXT: ; return to shader part epilog
1821 ; GFX6789-LABEL: load_1d_V1_tfe_dmask0:
1822 ; GFX6789: ; %bb.0: ; %main_body
1823 ; GFX6789-NEXT: v_mov_b32_e32 v1, 0
1824 ; GFX6789-NEXT: v_mov_b32_e32 v2, v1
1825 ; GFX6789-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1826 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1827 ; GFX6789-NEXT: v_mov_b32_e32 v0, v2
1828 ; GFX6789-NEXT: ; return to shader part epilog
1830 ; NOPRT-LABEL: load_1d_V1_tfe_dmask0:
1831 ; NOPRT: ; %bb.0: ; %main_body
1832 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
1833 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x1 unorm tfe
1834 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1835 ; NOPRT-NEXT: v_mov_b32_e32 v0, v1
1836 ; NOPRT-NEXT: ; return to shader part epilog
1838 ; GFX10PLUS-LABEL: load_1d_V1_tfe_dmask0:
1839 ; GFX10PLUS: ; %bb.0: ; %main_body
1840 ; GFX10PLUS-NEXT: v_mov_b32_e32 v1, 0
1841 ; GFX10PLUS-NEXT: v_mov_b32_e32 v2, v1
1842 ; GFX10PLUS-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D unorm tfe
1843 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1844 ; GFX10PLUS-NEXT: v_mov_b32_e32 v0, v2
1845 ; GFX10PLUS-NEXT: ; return to shader part epilog
1847 ; GFX12-LABEL: load_1d_V1_tfe_dmask0:
1848 ; GFX12: ; %bb.0: ; %main_body
1849 ; GFX12-NEXT: v_mov_b32_e32 v1, 0
1850 ; GFX12-NEXT: v_mov_b32_e32 v2, v1
1851 ; GFX12-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D tfe
1852 ; GFX12-NEXT: s_wait_loadcnt 0x0
1853 ; GFX12-NEXT: v_mov_b32_e32 v0, v2
1854 ; GFX12-NEXT: ; return to shader part epilog
1856 %v = call {float,i32} @llvm.amdgcn.image.load.1d.f32i32.i32(i32 0, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
1857 %v.err = extractvalue {float, i32} %v, 1
1858 %vv = bitcast i32 %v.err to float
1862 define amdgpu_ps float @load_mip_2d_tfe_dmask0(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1863 ; VERDE-LABEL: load_mip_2d_tfe_dmask0:
1864 ; VERDE: ; %bb.0: ; %main_body
1865 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1866 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1867 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1868 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1869 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1870 ; VERDE-NEXT: ; return to shader part epilog
1872 ; FIJI-LABEL: load_mip_2d_tfe_dmask0:
1873 ; FIJI: ; %bb.0: ; %main_body
1874 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1875 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1876 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1877 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1878 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1879 ; FIJI-NEXT: ; return to shader part epilog
1881 ; GFX6789-LABEL: load_mip_2d_tfe_dmask0:
1882 ; GFX6789: ; %bb.0: ; %main_body
1883 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1884 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1885 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1886 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1887 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1888 ; GFX6789-NEXT: ; return to shader part epilog
1890 ; NOPRT-LABEL: load_mip_2d_tfe_dmask0:
1891 ; NOPRT: ; %bb.0: ; %main_body
1892 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1893 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x1 unorm tfe
1894 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1895 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
1896 ; NOPRT-NEXT: ; return to shader part epilog
1898 ; GFX10PLUS-LABEL: load_mip_2d_tfe_dmask0:
1899 ; GFX10PLUS: ; %bb.0: ; %main_body
1900 ; GFX10PLUS-NEXT: v_mov_b32_e32 v3, 0
1901 ; GFX10PLUS-NEXT: v_mov_b32_e32 v4, v3
1902 ; GFX10PLUS-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe
1903 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1904 ; GFX10PLUS-NEXT: v_mov_b32_e32 v0, v4
1905 ; GFX10PLUS-NEXT: ; return to shader part epilog
1907 ; GFX12-LABEL: load_mip_2d_tfe_dmask0:
1908 ; GFX12: ; %bb.0: ; %main_body
1909 ; GFX12-NEXT: v_mov_b32_e32 v3, 0
1910 ; GFX12-NEXT: v_mov_b32_e32 v4, v3
1911 ; GFX12-NEXT: image_load_mip v[3:4], [v0, v1, v2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe
1912 ; GFX12-NEXT: s_wait_loadcnt 0x0
1913 ; GFX12-NEXT: v_mov_b32_e32 v0, v4
1914 ; GFX12-NEXT: ; return to shader part epilog
1916 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v4f32i32.i32(i32 0, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 1, i32 0)
1917 %v.err = extractvalue {<4 x float>, i32} %v, 1
1918 %vv = bitcast i32 %v.err to float
1922 define amdgpu_ps float @load_mip_2d_tfe_nouse(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1923 ; VERDE-LABEL: load_mip_2d_tfe_nouse:
1924 ; VERDE: ; %bb.0: ; %main_body
1925 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1926 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1927 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1928 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1929 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1930 ; VERDE-NEXT: ; return to shader part epilog
1932 ; FIJI-LABEL: load_mip_2d_tfe_nouse:
1933 ; FIJI: ; %bb.0: ; %main_body
1934 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1935 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1936 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1937 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1938 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1939 ; FIJI-NEXT: ; return to shader part epilog
1941 ; GFX6789-LABEL: load_mip_2d_tfe_nouse:
1942 ; GFX6789: ; %bb.0: ; %main_body
1943 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1944 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1945 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1946 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1947 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1948 ; GFX6789-NEXT: ; return to shader part epilog
1950 ; NOPRT-LABEL: load_mip_2d_tfe_nouse:
1951 ; NOPRT: ; %bb.0: ; %main_body
1952 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1953 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x1 unorm tfe
1954 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1955 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
1956 ; NOPRT-NEXT: ; return to shader part epilog
1958 ; GFX10PLUS-LABEL: load_mip_2d_tfe_nouse:
1959 ; GFX10PLUS: ; %bb.0: ; %main_body
1960 ; GFX10PLUS-NEXT: v_mov_b32_e32 v3, 0
1961 ; GFX10PLUS-NEXT: v_mov_b32_e32 v4, v3
1962 ; GFX10PLUS-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe
1963 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
1964 ; GFX10PLUS-NEXT: v_mov_b32_e32 v0, v4
1965 ; GFX10PLUS-NEXT: ; return to shader part epilog
1967 ; GFX12-LABEL: load_mip_2d_tfe_nouse:
1968 ; GFX12: ; %bb.0: ; %main_body
1969 ; GFX12-NEXT: v_mov_b32_e32 v3, 0
1970 ; GFX12-NEXT: v_mov_b32_e32 v4, v3
1971 ; GFX12-NEXT: image_load_mip v[3:4], [v0, v1, v2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe
1972 ; GFX12-NEXT: s_wait_loadcnt 0x0
1973 ; GFX12-NEXT: v_mov_b32_e32 v0, v4
1974 ; GFX12-NEXT: ; return to shader part epilog
1976 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v4f32i32.i32(i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 1, i32 0)
1977 %v.err = extractvalue {<4 x float>, i32} %v, 1
1978 %vv = bitcast i32 %v.err to float
1982 define amdgpu_ps float @load_mip_2d_tfe_nouse_V2(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1983 ; VERDE-LABEL: load_mip_2d_tfe_nouse_V2:
1984 ; VERDE: ; %bb.0: ; %main_body
1985 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1986 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1987 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1988 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1989 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1990 ; VERDE-NEXT: ; return to shader part epilog
1992 ; FIJI-LABEL: load_mip_2d_tfe_nouse_V2:
1993 ; FIJI: ; %bb.0: ; %main_body
1994 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1995 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1996 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1997 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1998 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1999 ; FIJI-NEXT: ; return to shader part epilog
2001 ; GFX6789-LABEL: load_mip_2d_tfe_nouse_V2:
2002 ; GFX6789: ; %bb.0: ; %main_body
2003 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
2004 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
2005 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
2006 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2007 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
2008 ; GFX6789-NEXT: ; return to shader part epilog
2010 ; NOPRT-LABEL: load_mip_2d_tfe_nouse_V2:
2011 ; NOPRT: ; %bb.0: ; %main_body
2012 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
2013 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x1 unorm tfe
2014 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2015 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
2016 ; NOPRT-NEXT: ; return to shader part epilog
2018 ; GFX10PLUS-LABEL: load_mip_2d_tfe_nouse_V2:
2019 ; GFX10PLUS: ; %bb.0: ; %main_body
2020 ; GFX10PLUS-NEXT: v_mov_b32_e32 v3, 0
2021 ; GFX10PLUS-NEXT: v_mov_b32_e32 v4, v3
2022 ; GFX10PLUS-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe
2023 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
2024 ; GFX10PLUS-NEXT: v_mov_b32_e32 v0, v4
2025 ; GFX10PLUS-NEXT: ; return to shader part epilog
2027 ; GFX12-LABEL: load_mip_2d_tfe_nouse_V2:
2028 ; GFX12: ; %bb.0: ; %main_body
2029 ; GFX12-NEXT: v_mov_b32_e32 v3, 0
2030 ; GFX12-NEXT: v_mov_b32_e32 v4, v3
2031 ; GFX12-NEXT: image_load_mip v[3:4], [v0, v1, v2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe
2032 ; GFX12-NEXT: s_wait_loadcnt 0x0
2033 ; GFX12-NEXT: v_mov_b32_e32 v0, v4
2034 ; GFX12-NEXT: ; return to shader part epilog
2036 %v = call {<2 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v2f32i32.i32(i32 6, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 1, i32 0)
2037 %v.err = extractvalue {<2 x float>, i32} %v, 1
2038 %vv = bitcast i32 %v.err to float
2042 define amdgpu_ps float @load_mip_2d_tfe_nouse_V1(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
2043 ; VERDE-LABEL: load_mip_2d_tfe_nouse_V1:
2044 ; VERDE: ; %bb.0: ; %main_body
2045 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
2046 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
2047 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 unorm tfe
2048 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2049 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
2050 ; VERDE-NEXT: ; return to shader part epilog
2052 ; FIJI-LABEL: load_mip_2d_tfe_nouse_V1:
2053 ; FIJI: ; %bb.0: ; %main_body
2054 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
2055 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
2056 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 unorm tfe
2057 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2058 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
2059 ; FIJI-NEXT: ; return to shader part epilog
2061 ; GFX6789-LABEL: load_mip_2d_tfe_nouse_V1:
2062 ; GFX6789: ; %bb.0: ; %main_body
2063 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
2064 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
2065 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 unorm tfe
2066 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2067 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
2068 ; GFX6789-NEXT: ; return to shader part epilog
2070 ; NOPRT-LABEL: load_mip_2d_tfe_nouse_V1:
2071 ; NOPRT: ; %bb.0: ; %main_body
2072 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
2073 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x2 unorm tfe
2074 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2075 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
2076 ; NOPRT-NEXT: ; return to shader part epilog
2078 ; GFX10PLUS-LABEL: load_mip_2d_tfe_nouse_V1:
2079 ; GFX10PLUS: ; %bb.0: ; %main_body
2080 ; GFX10PLUS-NEXT: v_mov_b32_e32 v3, 0
2081 ; GFX10PLUS-NEXT: v_mov_b32_e32 v4, v3
2082 ; GFX10PLUS-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_2D unorm tfe
2083 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
2084 ; GFX10PLUS-NEXT: v_mov_b32_e32 v0, v4
2085 ; GFX10PLUS-NEXT: ; return to shader part epilog
2087 ; GFX12-LABEL: load_mip_2d_tfe_nouse_V1:
2088 ; GFX12: ; %bb.0: ; %main_body
2089 ; GFX12-NEXT: v_mov_b32_e32 v3, 0
2090 ; GFX12-NEXT: v_mov_b32_e32 v4, v3
2091 ; GFX12-NEXT: image_load_mip v[3:4], [v0, v1, v2], s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_2D tfe
2092 ; GFX12-NEXT: s_wait_loadcnt 0x0
2093 ; GFX12-NEXT: v_mov_b32_e32 v0, v4
2094 ; GFX12-NEXT: ; return to shader part epilog
2096 %v = call {float, i32} @llvm.amdgcn.image.load.mip.2d.f32i32.i32(i32 2, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 1, i32 0)
2097 %v.err = extractvalue {float, i32} %v, 1
2098 %vv = bitcast i32 %v.err to float
2102 define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask3(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s) {
2103 ; VERDE-LABEL: load_1d_tfe_V4_dmask3:
2104 ; VERDE: ; %bb.0: ; %main_body
2105 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
2106 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
2107 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
2108 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
2109 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
2110 ; VERDE-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 unorm tfe
2111 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
2112 ; VERDE-NEXT: s_mov_b32 s10, -1
2113 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2114 ; VERDE-NEXT: buffer_store_dword v3, off, s[8:11], 0
2115 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
2116 ; VERDE-NEXT: ; return to shader part epilog
2118 ; FIJI-LABEL: load_1d_tfe_V4_dmask3:
2119 ; FIJI: ; %bb.0: ; %main_body
2120 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
2121 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
2122 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
2123 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
2124 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
2125 ; FIJI-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 unorm tfe
2126 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
2127 ; FIJI-NEXT: s_mov_b32 s10, -1
2128 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2129 ; FIJI-NEXT: buffer_store_dword v3, off, s[8:11], 0
2130 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2131 ; FIJI-NEXT: ; return to shader part epilog
2133 ; GFX6789-LABEL: load_1d_tfe_V4_dmask3:
2134 ; GFX6789: ; %bb.0: ; %main_body
2135 ; GFX6789-NEXT: v_mov_b32_e32 v5, 0
2136 ; GFX6789-NEXT: v_mov_b32_e32 v4, v0
2137 ; GFX6789-NEXT: v_mov_b32_e32 v6, v5
2138 ; GFX6789-NEXT: v_mov_b32_e32 v7, v5
2139 ; GFX6789-NEXT: v_mov_b32_e32 v8, v5
2140 ; GFX6789-NEXT: v_mov_b32_e32 v0, v5
2141 ; GFX6789-NEXT: v_mov_b32_e32 v1, v6
2142 ; GFX6789-NEXT: v_mov_b32_e32 v2, v7
2143 ; GFX6789-NEXT: v_mov_b32_e32 v3, v8
2144 ; GFX6789-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 unorm tfe
2145 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2146 ; GFX6789-NEXT: global_store_dword v5, v3, s[8:9]
2147 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2148 ; GFX6789-NEXT: ; return to shader part epilog
2150 ; NOPRT-LABEL: load_1d_tfe_V4_dmask3:
2151 ; NOPRT: ; %bb.0: ; %main_body
2152 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
2153 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0x7 unorm tfe
2154 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
2155 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2156 ; NOPRT-NEXT: global_store_dword v4, v3, s[8:9]
2157 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2158 ; NOPRT-NEXT: ; return to shader part epilog
2160 ; GFX10-LABEL: load_1d_tfe_V4_dmask3:
2161 ; GFX10: ; %bb.0: ; %main_body
2162 ; GFX10-NEXT: v_mov_b32_e32 v5, 0
2163 ; GFX10-NEXT: v_mov_b32_e32 v4, v0
2164 ; GFX10-NEXT: v_mov_b32_e32 v6, v5
2165 ; GFX10-NEXT: v_mov_b32_e32 v7, v5
2166 ; GFX10-NEXT: v_mov_b32_e32 v8, v5
2167 ; GFX10-NEXT: v_mov_b32_e32 v0, v5
2168 ; GFX10-NEXT: v_mov_b32_e32 v1, v6
2169 ; GFX10-NEXT: v_mov_b32_e32 v2, v7
2170 ; GFX10-NEXT: v_mov_b32_e32 v3, v8
2171 ; GFX10-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm tfe
2172 ; GFX10-NEXT: s_waitcnt vmcnt(0)
2173 ; GFX10-NEXT: global_store_dword v5, v3, s[8:9]
2174 ; GFX10-NEXT: ; return to shader part epilog
2176 ; GFX11-LABEL: load_1d_tfe_V4_dmask3:
2177 ; GFX11: ; %bb.0: ; %main_body
2178 ; GFX11-NEXT: v_dual_mov_b32 v4, v0 :: v_dual_mov_b32 v5, 0
2179 ; GFX11-NEXT: v_mov_b32_e32 v6, v5
2180 ; GFX11-NEXT: v_mov_b32_e32 v7, v5
2181 ; GFX11-NEXT: v_mov_b32_e32 v8, v5
2182 ; GFX11-NEXT: v_dual_mov_b32 v0, v5 :: v_dual_mov_b32 v1, v6
2183 ; GFX11-NEXT: v_dual_mov_b32 v2, v7 :: v_dual_mov_b32 v3, v8
2184 ; GFX11-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm tfe
2185 ; GFX11-NEXT: s_waitcnt vmcnt(0)
2186 ; GFX11-NEXT: global_store_b32 v5, v3, s[8:9]
2187 ; GFX11-NEXT: ; return to shader part epilog
2189 ; GFX12-LABEL: load_1d_tfe_V4_dmask3:
2190 ; GFX12: ; %bb.0: ; %main_body
2191 ; GFX12-NEXT: v_dual_mov_b32 v4, v0 :: v_dual_mov_b32 v5, 0
2192 ; GFX12-NEXT: v_dual_mov_b32 v6, v5 :: v_dual_mov_b32 v7, v5
2193 ; GFX12-NEXT: v_mov_b32_e32 v8, v5
2194 ; GFX12-NEXT: v_dual_mov_b32 v0, v5 :: v_dual_mov_b32 v1, v6
2195 ; GFX12-NEXT: v_dual_mov_b32 v2, v7 :: v_dual_mov_b32 v3, v8
2196 ; GFX12-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D tfe
2197 ; GFX12-NEXT: s_wait_loadcnt 0x0
2198 ; GFX12-NEXT: global_store_b32 v5, v3, s[8:9]
2199 ; GFX12-NEXT: ; return to shader part epilog
2201 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32 7, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
2202 %v.vec = extractvalue {<4 x float>, i32} %v, 0
2203 %v.err = extractvalue {<4 x float>, i32} %v, 1
2204 store i32 %v.err, ptr addrspace(1) %out, align 4
2205 ret <4 x float> %v.vec
2208 define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask2(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s) {
2209 ; VERDE-LABEL: load_1d_tfe_V4_dmask2:
2210 ; VERDE: ; %bb.0: ; %main_body
2211 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
2212 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
2213 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
2214 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
2215 ; VERDE-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 unorm tfe
2216 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
2217 ; VERDE-NEXT: s_mov_b32 s10, -1
2218 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2219 ; VERDE-NEXT: buffer_store_dword v2, off, s[8:11], 0
2220 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
2221 ; VERDE-NEXT: ; return to shader part epilog
2223 ; FIJI-LABEL: load_1d_tfe_V4_dmask2:
2224 ; FIJI: ; %bb.0: ; %main_body
2225 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
2226 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
2227 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
2228 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
2229 ; FIJI-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 unorm tfe
2230 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
2231 ; FIJI-NEXT: s_mov_b32 s10, -1
2232 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2233 ; FIJI-NEXT: buffer_store_dword v2, off, s[8:11], 0
2234 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2235 ; FIJI-NEXT: ; return to shader part epilog
2237 ; GFX6789-LABEL: load_1d_tfe_V4_dmask2:
2238 ; GFX6789: ; %bb.0: ; %main_body
2239 ; GFX6789-NEXT: v_mov_b32_e32 v4, 0
2240 ; GFX6789-NEXT: v_mov_b32_e32 v3, v0
2241 ; GFX6789-NEXT: v_mov_b32_e32 v5, v4
2242 ; GFX6789-NEXT: v_mov_b32_e32 v6, v4
2243 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
2244 ; GFX6789-NEXT: v_mov_b32_e32 v1, v5
2245 ; GFX6789-NEXT: v_mov_b32_e32 v2, v6
2246 ; GFX6789-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 unorm tfe
2247 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2248 ; GFX6789-NEXT: global_store_dword v4, v2, s[8:9]
2249 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2250 ; GFX6789-NEXT: ; return to shader part epilog
2252 ; NOPRT-LABEL: load_1d_tfe_V4_dmask2:
2253 ; NOPRT: ; %bb.0: ; %main_body
2254 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
2255 ; NOPRT-NEXT: image_load v[0:2], v0, s[0:7] dmask:0x6 unorm tfe
2256 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
2257 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2258 ; NOPRT-NEXT: global_store_dword v3, v2, s[8:9]
2259 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2260 ; NOPRT-NEXT: ; return to shader part epilog
2262 ; GFX10-LABEL: load_1d_tfe_V4_dmask2:
2263 ; GFX10: ; %bb.0: ; %main_body
2264 ; GFX10-NEXT: v_mov_b32_e32 v4, 0
2265 ; GFX10-NEXT: v_mov_b32_e32 v3, v0
2266 ; GFX10-NEXT: v_mov_b32_e32 v5, v4
2267 ; GFX10-NEXT: v_mov_b32_e32 v6, v4
2268 ; GFX10-NEXT: v_mov_b32_e32 v0, v4
2269 ; GFX10-NEXT: v_mov_b32_e32 v1, v5
2270 ; GFX10-NEXT: v_mov_b32_e32 v2, v6
2271 ; GFX10-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_1D unorm tfe
2272 ; GFX10-NEXT: s_waitcnt vmcnt(0)
2273 ; GFX10-NEXT: global_store_dword v4, v2, s[8:9]
2274 ; GFX10-NEXT: ; return to shader part epilog
2276 ; GFX11-LABEL: load_1d_tfe_V4_dmask2:
2277 ; GFX11: ; %bb.0: ; %main_body
2278 ; GFX11-NEXT: v_dual_mov_b32 v3, v0 :: v_dual_mov_b32 v4, 0
2279 ; GFX11-NEXT: v_mov_b32_e32 v5, v4
2280 ; GFX11-NEXT: v_mov_b32_e32 v6, v4
2281 ; GFX11-NEXT: v_dual_mov_b32 v0, v4 :: v_dual_mov_b32 v1, v5
2282 ; GFX11-NEXT: v_mov_b32_e32 v2, v6
2283 ; GFX11-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_1D unorm tfe
2284 ; GFX11-NEXT: s_waitcnt vmcnt(0)
2285 ; GFX11-NEXT: global_store_b32 v4, v2, s[8:9]
2286 ; GFX11-NEXT: ; return to shader part epilog
2288 ; GFX12-LABEL: load_1d_tfe_V4_dmask2:
2289 ; GFX12: ; %bb.0: ; %main_body
2290 ; GFX12-NEXT: v_dual_mov_b32 v3, v0 :: v_dual_mov_b32 v4, 0
2291 ; GFX12-NEXT: v_dual_mov_b32 v5, v4 :: v_dual_mov_b32 v6, v4
2292 ; GFX12-NEXT: v_dual_mov_b32 v0, v4 :: v_dual_mov_b32 v1, v5
2293 ; GFX12-NEXT: v_mov_b32_e32 v2, v6
2294 ; GFX12-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_1D tfe
2295 ; GFX12-NEXT: s_wait_loadcnt 0x0
2296 ; GFX12-NEXT: global_store_b32 v4, v2, s[8:9]
2297 ; GFX12-NEXT: ; return to shader part epilog
2299 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32 6, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
2300 %v.vec = extractvalue {<4 x float>, i32} %v, 0
2301 %v.err = extractvalue {<4 x float>, i32} %v, 1
2302 store i32 %v.err, ptr addrspace(1) %out, align 4
2303 ret <4 x float> %v.vec
2306 define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask1(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s) {
2307 ; VERDE-LABEL: load_1d_tfe_V4_dmask1:
2308 ; VERDE: ; %bb.0: ; %main_body
2309 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
2310 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
2311 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
2312 ; VERDE-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
2313 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
2314 ; VERDE-NEXT: s_mov_b32 s10, -1
2315 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2316 ; VERDE-NEXT: buffer_store_dword v1, off, s[8:11], 0
2317 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
2318 ; VERDE-NEXT: ; return to shader part epilog
2320 ; FIJI-LABEL: load_1d_tfe_V4_dmask1:
2321 ; FIJI: ; %bb.0: ; %main_body
2322 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
2323 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
2324 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
2325 ; FIJI-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
2326 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
2327 ; FIJI-NEXT: s_mov_b32 s10, -1
2328 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2329 ; FIJI-NEXT: buffer_store_dword v1, off, s[8:11], 0
2330 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2331 ; FIJI-NEXT: ; return to shader part epilog
2333 ; GFX6789-LABEL: load_1d_tfe_V4_dmask1:
2334 ; GFX6789: ; %bb.0: ; %main_body
2335 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
2336 ; GFX6789-NEXT: v_mov_b32_e32 v2, v0
2337 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
2338 ; GFX6789-NEXT: v_mov_b32_e32 v0, v3
2339 ; GFX6789-NEXT: v_mov_b32_e32 v1, v4
2340 ; GFX6789-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
2341 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2342 ; GFX6789-NEXT: global_store_dword v3, v1, s[8:9]
2343 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2344 ; GFX6789-NEXT: ; return to shader part epilog
2346 ; NOPRT-LABEL: load_1d_tfe_V4_dmask1:
2347 ; NOPRT: ; %bb.0: ; %main_body
2348 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
2349 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x8 unorm tfe
2350 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
2351 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2352 ; NOPRT-NEXT: global_store_dword v2, v1, s[8:9]
2353 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2354 ; NOPRT-NEXT: ; return to shader part epilog
2356 ; GFX10-LABEL: load_1d_tfe_V4_dmask1:
2357 ; GFX10: ; %bb.0: ; %main_body
2358 ; GFX10-NEXT: v_mov_b32_e32 v3, 0
2359 ; GFX10-NEXT: v_mov_b32_e32 v2, v0
2360 ; GFX10-NEXT: v_mov_b32_e32 v4, v3
2361 ; GFX10-NEXT: v_mov_b32_e32 v0, v3
2362 ; GFX10-NEXT: v_mov_b32_e32 v1, v4
2363 ; GFX10-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe
2364 ; GFX10-NEXT: s_waitcnt vmcnt(0)
2365 ; GFX10-NEXT: global_store_dword v3, v1, s[8:9]
2366 ; GFX10-NEXT: ; return to shader part epilog
2368 ; GFX11-LABEL: load_1d_tfe_V4_dmask1:
2369 ; GFX11: ; %bb.0: ; %main_body
2370 ; GFX11-NEXT: v_dual_mov_b32 v2, v0 :: v_dual_mov_b32 v3, 0
2371 ; GFX11-NEXT: v_mov_b32_e32 v4, v3
2372 ; GFX11-NEXT: v_dual_mov_b32 v0, v3 :: v_dual_mov_b32 v1, v4
2373 ; GFX11-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe
2374 ; GFX11-NEXT: s_waitcnt vmcnt(0)
2375 ; GFX11-NEXT: global_store_b32 v3, v1, s[8:9]
2376 ; GFX11-NEXT: ; return to shader part epilog
2378 ; GFX12-LABEL: load_1d_tfe_V4_dmask1:
2379 ; GFX12: ; %bb.0: ; %main_body
2380 ; GFX12-NEXT: v_dual_mov_b32 v2, v0 :: v_dual_mov_b32 v3, 0
2381 ; GFX12-NEXT: v_mov_b32_e32 v4, v3
2382 ; GFX12-NEXT: v_dual_mov_b32 v0, v3 :: v_dual_mov_b32 v1, v4
2383 ; GFX12-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D tfe
2384 ; GFX12-NEXT: s_wait_loadcnt 0x0
2385 ; GFX12-NEXT: global_store_b32 v3, v1, s[8:9]
2386 ; GFX12-NEXT: ; return to shader part epilog
2388 %v = call {<4 x float>,i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32 8, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
2389 %v.vec = extractvalue {<4 x float>, i32} %v, 0
2390 %v.err = extractvalue {<4 x float>, i32} %v, 1
2391 store i32 %v.err, ptr addrspace(1) %out, align 4
2392 ret <4 x float> %v.vec
2395 define amdgpu_ps <2 x float> @load_1d_tfe_V2_dmask1(<8 x i32> inreg %rsrc, ptr addrspace(1) inreg %out, i32 %s) {
2396 ; VERDE-LABEL: load_1d_tfe_V2_dmask1:
2397 ; VERDE: ; %bb.0: ; %main_body
2398 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
2399 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
2400 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
2401 ; VERDE-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
2402 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
2403 ; VERDE-NEXT: s_mov_b32 s10, -1
2404 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2405 ; VERDE-NEXT: buffer_store_dword v1, off, s[8:11], 0
2406 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
2407 ; VERDE-NEXT: ; return to shader part epilog
2409 ; FIJI-LABEL: load_1d_tfe_V2_dmask1:
2410 ; FIJI: ; %bb.0: ; %main_body
2411 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
2412 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
2413 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
2414 ; FIJI-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
2415 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
2416 ; FIJI-NEXT: s_mov_b32 s10, -1
2417 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2418 ; FIJI-NEXT: buffer_store_dword v1, off, s[8:11], 0
2419 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2420 ; FIJI-NEXT: ; return to shader part epilog
2422 ; GFX6789-LABEL: load_1d_tfe_V2_dmask1:
2423 ; GFX6789: ; %bb.0: ; %main_body
2424 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
2425 ; GFX6789-NEXT: v_mov_b32_e32 v2, v0
2426 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
2427 ; GFX6789-NEXT: v_mov_b32_e32 v0, v3
2428 ; GFX6789-NEXT: v_mov_b32_e32 v1, v4
2429 ; GFX6789-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
2430 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2431 ; GFX6789-NEXT: global_store_dword v3, v1, s[8:9]
2432 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2433 ; GFX6789-NEXT: ; return to shader part epilog
2435 ; NOPRT-LABEL: load_1d_tfe_V2_dmask1:
2436 ; NOPRT: ; %bb.0: ; %main_body
2437 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
2438 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x8 unorm tfe
2439 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
2440 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2441 ; NOPRT-NEXT: global_store_dword v2, v1, s[8:9]
2442 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2443 ; NOPRT-NEXT: ; return to shader part epilog
2445 ; GFX10-LABEL: load_1d_tfe_V2_dmask1:
2446 ; GFX10: ; %bb.0: ; %main_body
2447 ; GFX10-NEXT: v_mov_b32_e32 v3, 0
2448 ; GFX10-NEXT: v_mov_b32_e32 v2, v0
2449 ; GFX10-NEXT: v_mov_b32_e32 v4, v3
2450 ; GFX10-NEXT: v_mov_b32_e32 v0, v3
2451 ; GFX10-NEXT: v_mov_b32_e32 v1, v4
2452 ; GFX10-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe
2453 ; GFX10-NEXT: s_waitcnt vmcnt(0)
2454 ; GFX10-NEXT: global_store_dword v3, v1, s[8:9]
2455 ; GFX10-NEXT: ; return to shader part epilog
2457 ; GFX11-LABEL: load_1d_tfe_V2_dmask1:
2458 ; GFX11: ; %bb.0: ; %main_body
2459 ; GFX11-NEXT: v_dual_mov_b32 v2, v0 :: v_dual_mov_b32 v3, 0
2460 ; GFX11-NEXT: v_mov_b32_e32 v4, v3
2461 ; GFX11-NEXT: v_dual_mov_b32 v0, v3 :: v_dual_mov_b32 v1, v4
2462 ; GFX11-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe
2463 ; GFX11-NEXT: s_waitcnt vmcnt(0)
2464 ; GFX11-NEXT: global_store_b32 v3, v1, s[8:9]
2465 ; GFX11-NEXT: ; return to shader part epilog
2467 ; GFX12-LABEL: load_1d_tfe_V2_dmask1:
2468 ; GFX12: ; %bb.0: ; %main_body
2469 ; GFX12-NEXT: v_dual_mov_b32 v2, v0 :: v_dual_mov_b32 v3, 0
2470 ; GFX12-NEXT: v_mov_b32_e32 v4, v3
2471 ; GFX12-NEXT: v_dual_mov_b32 v0, v3 :: v_dual_mov_b32 v1, v4
2472 ; GFX12-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D tfe
2473 ; GFX12-NEXT: s_wait_loadcnt 0x0
2474 ; GFX12-NEXT: global_store_b32 v3, v1, s[8:9]
2475 ; GFX12-NEXT: ; return to shader part epilog
2477 %v = call {<2 x float>,i32} @llvm.amdgcn.image.load.1d.v2f32i32.i32(i32 8, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
2478 %v.vec = extractvalue {<2 x float>, i32} %v, 0
2479 %v.err = extractvalue {<2 x float>, i32} %v, 1
2480 store i32 %v.err, ptr addrspace(1) %out, align 4
2481 ret <2 x float> %v.vec
2485 define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r, i32 %mip) {
2486 ; VERDE-LABEL: load_mip_3d:
2487 ; VERDE: ; %bb.0: ; %main_body
2488 ; VERDE-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2489 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2490 ; VERDE-NEXT: ; return to shader part epilog
2492 ; FIJI-LABEL: load_mip_3d:
2493 ; FIJI: ; %bb.0: ; %main_body
2494 ; FIJI-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2495 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2496 ; FIJI-NEXT: ; return to shader part epilog
2498 ; GFX6789-LABEL: load_mip_3d:
2499 ; GFX6789: ; %bb.0: ; %main_body
2500 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2501 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2502 ; GFX6789-NEXT: ; return to shader part epilog
2504 ; NOPRT-LABEL: load_mip_3d:
2505 ; NOPRT: ; %bb.0: ; %main_body
2506 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2507 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2508 ; NOPRT-NEXT: ; return to shader part epilog
2510 ; GFX10PLUS-LABEL: load_mip_3d:
2511 ; GFX10PLUS: ; %bb.0: ; %main_body
2512 ; GFX10PLUS-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm
2513 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
2514 ; GFX10PLUS-NEXT: ; return to shader part epilog
2516 ; GFX12-LABEL: load_mip_3d:
2517 ; GFX12: ; %bb.0: ; %main_body
2518 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1, v2, v3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D
2519 ; GFX12-NEXT: s_wait_loadcnt 0x0
2520 ; GFX12-NEXT: ; return to shader part epilog
2522 %v = call <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %r, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2526 define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
2527 ; VERDE-LABEL: load_mip_cube:
2528 ; VERDE: ; %bb.0: ; %main_body
2529 ; VERDE-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2530 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2531 ; VERDE-NEXT: ; return to shader part epilog
2533 ; FIJI-LABEL: load_mip_cube:
2534 ; FIJI: ; %bb.0: ; %main_body
2535 ; FIJI-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2536 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2537 ; FIJI-NEXT: ; return to shader part epilog
2539 ; GFX6789-LABEL: load_mip_cube:
2540 ; GFX6789: ; %bb.0: ; %main_body
2541 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2542 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2543 ; GFX6789-NEXT: ; return to shader part epilog
2545 ; NOPRT-LABEL: load_mip_cube:
2546 ; NOPRT: ; %bb.0: ; %main_body
2547 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2548 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2549 ; NOPRT-NEXT: ; return to shader part epilog
2551 ; GFX10PLUS-LABEL: load_mip_cube:
2552 ; GFX10PLUS: ; %bb.0: ; %main_body
2553 ; GFX10PLUS-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm
2554 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
2555 ; GFX10PLUS-NEXT: ; return to shader part epilog
2557 ; GFX12-LABEL: load_mip_cube:
2558 ; GFX12: ; %bb.0: ; %main_body
2559 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1, v2, v3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE
2560 ; GFX12-NEXT: s_wait_loadcnt 0x0
2561 ; GFX12-NEXT: ; return to shader part epilog
2563 %v = call <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2567 define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice, i32 %mip) {
2568 ; VERDE-LABEL: load_mip_1darray:
2569 ; VERDE: ; %bb.0: ; %main_body
2570 ; VERDE-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2571 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2572 ; VERDE-NEXT: ; return to shader part epilog
2574 ; FIJI-LABEL: load_mip_1darray:
2575 ; FIJI: ; %bb.0: ; %main_body
2576 ; FIJI-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2577 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2578 ; FIJI-NEXT: ; return to shader part epilog
2580 ; GFX6789-LABEL: load_mip_1darray:
2581 ; GFX6789: ; %bb.0: ; %main_body
2582 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2583 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2584 ; GFX6789-NEXT: ; return to shader part epilog
2586 ; NOPRT-LABEL: load_mip_1darray:
2587 ; NOPRT: ; %bb.0: ; %main_body
2588 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2589 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2590 ; NOPRT-NEXT: ; return to shader part epilog
2592 ; GFX10PLUS-LABEL: load_mip_1darray:
2593 ; GFX10PLUS: ; %bb.0: ; %main_body
2594 ; GFX10PLUS-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm
2595 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
2596 ; GFX10PLUS-NEXT: ; return to shader part epilog
2598 ; GFX12-LABEL: load_mip_1darray:
2599 ; GFX12: ; %bb.0: ; %main_body
2600 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1, v2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY
2601 ; GFX12-NEXT: s_wait_loadcnt 0x0
2602 ; GFX12-NEXT: ; return to shader part epilog
2604 %v = call <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i32(i32 15, i32 %s, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2608 define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
2609 ; VERDE-LABEL: load_mip_2darray:
2610 ; VERDE: ; %bb.0: ; %main_body
2611 ; VERDE-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2612 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2613 ; VERDE-NEXT: ; return to shader part epilog
2615 ; FIJI-LABEL: load_mip_2darray:
2616 ; FIJI: ; %bb.0: ; %main_body
2617 ; FIJI-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2618 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2619 ; FIJI-NEXT: ; return to shader part epilog
2621 ; GFX6789-LABEL: load_mip_2darray:
2622 ; GFX6789: ; %bb.0: ; %main_body
2623 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2624 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2625 ; GFX6789-NEXT: ; return to shader part epilog
2627 ; NOPRT-LABEL: load_mip_2darray:
2628 ; NOPRT: ; %bb.0: ; %main_body
2629 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2630 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2631 ; NOPRT-NEXT: ; return to shader part epilog
2633 ; GFX10PLUS-LABEL: load_mip_2darray:
2634 ; GFX10PLUS: ; %bb.0: ; %main_body
2635 ; GFX10PLUS-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm
2636 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
2637 ; GFX10PLUS-NEXT: ; return to shader part epilog
2639 ; GFX12-LABEL: load_mip_2darray:
2640 ; GFX12: ; %bb.0: ; %main_body
2641 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1, v2, v3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY
2642 ; GFX12-NEXT: s_wait_loadcnt 0x0
2643 ; GFX12-NEXT: ; return to shader part epilog
2645 %v = call <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2649 define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
2650 ; VERDE-LABEL: store_1d:
2651 ; VERDE: ; %bb.0: ; %main_body
2652 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2653 ; VERDE-NEXT: s_endpgm
2655 ; FIJI-LABEL: store_1d:
2656 ; FIJI: ; %bb.0: ; %main_body
2657 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2658 ; FIJI-NEXT: s_endpgm
2660 ; GFX6789-LABEL: store_1d:
2661 ; GFX6789: ; %bb.0: ; %main_body
2662 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2663 ; GFX6789-NEXT: s_endpgm
2665 ; NOPRT-LABEL: store_1d:
2666 ; NOPRT: ; %bb.0: ; %main_body
2667 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2668 ; NOPRT-NEXT: s_endpgm
2670 ; GFX10PLUS-LABEL: store_1d:
2671 ; GFX10PLUS: ; %bb.0: ; %main_body
2672 ; GFX10PLUS-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
2673 ; GFX10PLUS-NEXT: s_endpgm
2675 ; GFX12-LABEL: store_1d:
2676 ; GFX12: ; %bb.0: ; %main_body
2677 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
2678 ; GFX12-NEXT: s_endpgm
2680 call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
2684 define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t) {
2685 ; VERDE-LABEL: store_2d:
2686 ; VERDE: ; %bb.0: ; %main_body
2687 ; VERDE-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2688 ; VERDE-NEXT: s_endpgm
2690 ; FIJI-LABEL: store_2d:
2691 ; FIJI: ; %bb.0: ; %main_body
2692 ; FIJI-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2693 ; FIJI-NEXT: s_endpgm
2695 ; GFX6789-LABEL: store_2d:
2696 ; GFX6789: ; %bb.0: ; %main_body
2697 ; GFX6789-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2698 ; GFX6789-NEXT: s_endpgm
2700 ; NOPRT-LABEL: store_2d:
2701 ; NOPRT: ; %bb.0: ; %main_body
2702 ; NOPRT-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2703 ; NOPRT-NEXT: s_endpgm
2705 ; GFX10PLUS-LABEL: store_2d:
2706 ; GFX10PLUS: ; %bb.0: ; %main_body
2707 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
2708 ; GFX10PLUS-NEXT: s_endpgm
2710 ; GFX12-LABEL: store_2d:
2711 ; GFX12: ; %bb.0: ; %main_body
2712 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D
2713 ; GFX12-NEXT: s_endpgm
2715 call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
2719 define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r) {
2720 ; VERDE-LABEL: store_3d:
2721 ; VERDE: ; %bb.0: ; %main_body
2722 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2723 ; VERDE-NEXT: s_endpgm
2725 ; FIJI-LABEL: store_3d:
2726 ; FIJI: ; %bb.0: ; %main_body
2727 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2728 ; FIJI-NEXT: s_endpgm
2730 ; GFX6789-LABEL: store_3d:
2731 ; GFX6789: ; %bb.0: ; %main_body
2732 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2733 ; GFX6789-NEXT: s_endpgm
2735 ; NOPRT-LABEL: store_3d:
2736 ; NOPRT: ; %bb.0: ; %main_body
2737 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2738 ; NOPRT-NEXT: s_endpgm
2740 ; GFX10PLUS-LABEL: store_3d:
2741 ; GFX10PLUS: ; %bb.0: ; %main_body
2742 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm
2743 ; GFX10PLUS-NEXT: s_endpgm
2745 ; GFX12-LABEL: store_3d:
2746 ; GFX12: ; %bb.0: ; %main_body
2747 ; GFX12-NEXT: image_store v[0:3], [v4, v5, v6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D
2748 ; GFX12-NEXT: s_endpgm
2750 call void @llvm.amdgcn.image.store.3d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 0, i32 0)
2754 define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
2755 ; VERDE-LABEL: store_cube:
2756 ; VERDE: ; %bb.0: ; %main_body
2757 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2758 ; VERDE-NEXT: s_endpgm
2760 ; FIJI-LABEL: store_cube:
2761 ; FIJI: ; %bb.0: ; %main_body
2762 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2763 ; FIJI-NEXT: s_endpgm
2765 ; GFX6789-LABEL: store_cube:
2766 ; GFX6789: ; %bb.0: ; %main_body
2767 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2768 ; GFX6789-NEXT: s_endpgm
2770 ; NOPRT-LABEL: store_cube:
2771 ; NOPRT: ; %bb.0: ; %main_body
2772 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2773 ; NOPRT-NEXT: s_endpgm
2775 ; GFX10PLUS-LABEL: store_cube:
2776 ; GFX10PLUS: ; %bb.0: ; %main_body
2777 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm
2778 ; GFX10PLUS-NEXT: s_endpgm
2780 ; GFX12-LABEL: store_cube:
2781 ; GFX12: ; %bb.0: ; %main_body
2782 ; GFX12-NEXT: image_store v[0:3], [v4, v5, v6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE
2783 ; GFX12-NEXT: s_endpgm
2785 call void @llvm.amdgcn.image.store.cube.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
2789 define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice) {
2790 ; VERDE-LABEL: store_1darray:
2791 ; VERDE: ; %bb.0: ; %main_body
2792 ; VERDE-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2793 ; VERDE-NEXT: s_endpgm
2795 ; FIJI-LABEL: store_1darray:
2796 ; FIJI: ; %bb.0: ; %main_body
2797 ; FIJI-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2798 ; FIJI-NEXT: s_endpgm
2800 ; GFX6789-LABEL: store_1darray:
2801 ; GFX6789: ; %bb.0: ; %main_body
2802 ; GFX6789-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2803 ; GFX6789-NEXT: s_endpgm
2805 ; NOPRT-LABEL: store_1darray:
2806 ; NOPRT: ; %bb.0: ; %main_body
2807 ; NOPRT-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2808 ; NOPRT-NEXT: s_endpgm
2810 ; GFX10PLUS-LABEL: store_1darray:
2811 ; GFX10PLUS: ; %bb.0: ; %main_body
2812 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm
2813 ; GFX10PLUS-NEXT: s_endpgm
2815 ; GFX12-LABEL: store_1darray:
2816 ; GFX12: ; %bb.0: ; %main_body
2817 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY
2818 ; GFX12-NEXT: s_endpgm
2820 call void @llvm.amdgcn.image.store.1darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
2824 define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
2825 ; VERDE-LABEL: store_2darray:
2826 ; VERDE: ; %bb.0: ; %main_body
2827 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2828 ; VERDE-NEXT: s_endpgm
2830 ; FIJI-LABEL: store_2darray:
2831 ; FIJI: ; %bb.0: ; %main_body
2832 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2833 ; FIJI-NEXT: s_endpgm
2835 ; GFX6789-LABEL: store_2darray:
2836 ; GFX6789: ; %bb.0: ; %main_body
2837 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2838 ; GFX6789-NEXT: s_endpgm
2840 ; NOPRT-LABEL: store_2darray:
2841 ; NOPRT: ; %bb.0: ; %main_body
2842 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2843 ; NOPRT-NEXT: s_endpgm
2845 ; GFX10PLUS-LABEL: store_2darray:
2846 ; GFX10PLUS: ; %bb.0: ; %main_body
2847 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm
2848 ; GFX10PLUS-NEXT: s_endpgm
2850 ; GFX12-LABEL: store_2darray:
2851 ; GFX12: ; %bb.0: ; %main_body
2852 ; GFX12-NEXT: image_store v[0:3], [v4, v5, v6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY
2853 ; GFX12-NEXT: s_endpgm
2855 call void @llvm.amdgcn.image.store.2darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
2859 define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %fragid) {
2860 ; VERDE-LABEL: store_2dmsaa:
2861 ; VERDE: ; %bb.0: ; %main_body
2862 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2863 ; VERDE-NEXT: s_endpgm
2865 ; FIJI-LABEL: store_2dmsaa:
2866 ; FIJI: ; %bb.0: ; %main_body
2867 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2868 ; FIJI-NEXT: s_endpgm
2870 ; GFX6789-LABEL: store_2dmsaa:
2871 ; GFX6789: ; %bb.0: ; %main_body
2872 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2873 ; GFX6789-NEXT: s_endpgm
2875 ; NOPRT-LABEL: store_2dmsaa:
2876 ; NOPRT: ; %bb.0: ; %main_body
2877 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2878 ; NOPRT-NEXT: s_endpgm
2880 ; GFX10PLUS-LABEL: store_2dmsaa:
2881 ; GFX10PLUS: ; %bb.0: ; %main_body
2882 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm
2883 ; GFX10PLUS-NEXT: s_endpgm
2885 ; GFX12-LABEL: store_2dmsaa:
2886 ; GFX12: ; %bb.0: ; %main_body
2887 ; GFX12-NEXT: image_store v[0:3], [v4, v5, v6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA
2888 ; GFX12-NEXT: s_endpgm
2890 call void @llvm.amdgcn.image.store.2dmsaa.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
2894 define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
2895 ; VERDE-LABEL: store_2darraymsaa:
2896 ; VERDE: ; %bb.0: ; %main_body
2897 ; VERDE-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2898 ; VERDE-NEXT: s_endpgm
2900 ; FIJI-LABEL: store_2darraymsaa:
2901 ; FIJI: ; %bb.0: ; %main_body
2902 ; FIJI-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2903 ; FIJI-NEXT: s_endpgm
2905 ; GFX6789-LABEL: store_2darraymsaa:
2906 ; GFX6789: ; %bb.0: ; %main_body
2907 ; GFX6789-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2908 ; GFX6789-NEXT: s_endpgm
2910 ; NOPRT-LABEL: store_2darraymsaa:
2911 ; NOPRT: ; %bb.0: ; %main_body
2912 ; NOPRT-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2913 ; NOPRT-NEXT: s_endpgm
2915 ; GFX10PLUS-LABEL: store_2darraymsaa:
2916 ; GFX10PLUS: ; %bb.0: ; %main_body
2917 ; GFX10PLUS-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm
2918 ; GFX10PLUS-NEXT: s_endpgm
2920 ; GFX12-LABEL: store_2darraymsaa:
2921 ; GFX12: ; %bb.0: ; %main_body
2922 ; GFX12-NEXT: image_store v[0:3], [v4, v5, v6, v7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY
2923 ; GFX12-NEXT: s_endpgm
2925 call void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
2929 define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %mip) {
2930 ; VERDE-LABEL: store_mip_1d:
2931 ; VERDE: ; %bb.0: ; %main_body
2932 ; VERDE-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2933 ; VERDE-NEXT: s_endpgm
2935 ; FIJI-LABEL: store_mip_1d:
2936 ; FIJI: ; %bb.0: ; %main_body
2937 ; FIJI-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2938 ; FIJI-NEXT: s_endpgm
2940 ; GFX6789-LABEL: store_mip_1d:
2941 ; GFX6789: ; %bb.0: ; %main_body
2942 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2943 ; GFX6789-NEXT: s_endpgm
2945 ; NOPRT-LABEL: store_mip_1d:
2946 ; NOPRT: ; %bb.0: ; %main_body
2947 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2948 ; NOPRT-NEXT: s_endpgm
2950 ; GFX10PLUS-LABEL: store_mip_1d:
2951 ; GFX10PLUS: ; %bb.0: ; %main_body
2952 ; GFX10PLUS-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
2953 ; GFX10PLUS-NEXT: s_endpgm
2955 ; GFX12-LABEL: store_mip_1d:
2956 ; GFX12: ; %bb.0: ; %main_body
2957 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
2958 ; GFX12-NEXT: s_endpgm
2960 call void @llvm.amdgcn.image.store.mip.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2964 define amdgpu_ps void @store_mip_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %mip) {
2965 ; VERDE-LABEL: store_mip_2d:
2966 ; VERDE: ; %bb.0: ; %main_body
2967 ; VERDE-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2968 ; VERDE-NEXT: s_endpgm
2970 ; FIJI-LABEL: store_mip_2d:
2971 ; FIJI: ; %bb.0: ; %main_body
2972 ; FIJI-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2973 ; FIJI-NEXT: s_endpgm
2975 ; GFX6789-LABEL: store_mip_2d:
2976 ; GFX6789: ; %bb.0: ; %main_body
2977 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2978 ; GFX6789-NEXT: s_endpgm
2980 ; NOPRT-LABEL: store_mip_2d:
2981 ; NOPRT: ; %bb.0: ; %main_body
2982 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2983 ; NOPRT-NEXT: s_endpgm
2985 ; GFX10PLUS-LABEL: store_mip_2d:
2986 ; GFX10PLUS: ; %bb.0: ; %main_body
2987 ; GFX10PLUS-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
2988 ; GFX10PLUS-NEXT: s_endpgm
2990 ; GFX12-LABEL: store_mip_2d:
2991 ; GFX12: ; %bb.0: ; %main_body
2992 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5, v6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D
2993 ; GFX12-NEXT: s_endpgm
2995 call void @llvm.amdgcn.image.store.mip.2d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2999 define amdgpu_ps void @store_mip_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r, i32 %mip) {
3000 ; VERDE-LABEL: store_mip_3d:
3001 ; VERDE: ; %bb.0: ; %main_body
3002 ; VERDE-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
3003 ; VERDE-NEXT: s_endpgm
3005 ; FIJI-LABEL: store_mip_3d:
3006 ; FIJI: ; %bb.0: ; %main_body
3007 ; FIJI-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
3008 ; FIJI-NEXT: s_endpgm
3010 ; GFX6789-LABEL: store_mip_3d:
3011 ; GFX6789: ; %bb.0: ; %main_body
3012 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
3013 ; GFX6789-NEXT: s_endpgm
3015 ; NOPRT-LABEL: store_mip_3d:
3016 ; NOPRT: ; %bb.0: ; %main_body
3017 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
3018 ; NOPRT-NEXT: s_endpgm
3020 ; GFX10PLUS-LABEL: store_mip_3d:
3021 ; GFX10PLUS: ; %bb.0: ; %main_body
3022 ; GFX10PLUS-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm
3023 ; GFX10PLUS-NEXT: s_endpgm
3025 ; GFX12-LABEL: store_mip_3d:
3026 ; GFX12: ; %bb.0: ; %main_body
3027 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5, v6, v7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D
3028 ; GFX12-NEXT: s_endpgm
3030 call void @llvm.amdgcn.image.store.mip.3d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %r, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3034 define amdgpu_ps void @store_mip_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
3035 ; VERDE-LABEL: store_mip_cube:
3036 ; VERDE: ; %bb.0: ; %main_body
3037 ; VERDE-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3038 ; VERDE-NEXT: s_endpgm
3040 ; FIJI-LABEL: store_mip_cube:
3041 ; FIJI: ; %bb.0: ; %main_body
3042 ; FIJI-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3043 ; FIJI-NEXT: s_endpgm
3045 ; GFX6789-LABEL: store_mip_cube:
3046 ; GFX6789: ; %bb.0: ; %main_body
3047 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3048 ; GFX6789-NEXT: s_endpgm
3050 ; NOPRT-LABEL: store_mip_cube:
3051 ; NOPRT: ; %bb.0: ; %main_body
3052 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3053 ; NOPRT-NEXT: s_endpgm
3055 ; GFX10PLUS-LABEL: store_mip_cube:
3056 ; GFX10PLUS: ; %bb.0: ; %main_body
3057 ; GFX10PLUS-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm
3058 ; GFX10PLUS-NEXT: s_endpgm
3060 ; GFX12-LABEL: store_mip_cube:
3061 ; GFX12: ; %bb.0: ; %main_body
3062 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5, v6, v7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE
3063 ; GFX12-NEXT: s_endpgm
3065 call void @llvm.amdgcn.image.store.mip.cube.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3069 define amdgpu_ps void @store_mip_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice, i32 %mip) {
3070 ; VERDE-LABEL: store_mip_1darray:
3071 ; VERDE: ; %bb.0: ; %main_body
3072 ; VERDE-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
3073 ; VERDE-NEXT: s_endpgm
3075 ; FIJI-LABEL: store_mip_1darray:
3076 ; FIJI: ; %bb.0: ; %main_body
3077 ; FIJI-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
3078 ; FIJI-NEXT: s_endpgm
3080 ; GFX6789-LABEL: store_mip_1darray:
3081 ; GFX6789: ; %bb.0: ; %main_body
3082 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
3083 ; GFX6789-NEXT: s_endpgm
3085 ; NOPRT-LABEL: store_mip_1darray:
3086 ; NOPRT: ; %bb.0: ; %main_body
3087 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
3088 ; NOPRT-NEXT: s_endpgm
3090 ; GFX10PLUS-LABEL: store_mip_1darray:
3091 ; GFX10PLUS: ; %bb.0: ; %main_body
3092 ; GFX10PLUS-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm
3093 ; GFX10PLUS-NEXT: s_endpgm
3095 ; GFX12-LABEL: store_mip_1darray:
3096 ; GFX12: ; %bb.0: ; %main_body
3097 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5, v6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY
3098 ; GFX12-NEXT: s_endpgm
3100 call void @llvm.amdgcn.image.store.mip.1darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3104 define amdgpu_ps void @store_mip_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
3105 ; VERDE-LABEL: store_mip_2darray:
3106 ; VERDE: ; %bb.0: ; %main_body
3107 ; VERDE-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3108 ; VERDE-NEXT: s_endpgm
3110 ; FIJI-LABEL: store_mip_2darray:
3111 ; FIJI: ; %bb.0: ; %main_body
3112 ; FIJI-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3113 ; FIJI-NEXT: s_endpgm
3115 ; GFX6789-LABEL: store_mip_2darray:
3116 ; GFX6789: ; %bb.0: ; %main_body
3117 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3118 ; GFX6789-NEXT: s_endpgm
3120 ; NOPRT-LABEL: store_mip_2darray:
3121 ; NOPRT: ; %bb.0: ; %main_body
3122 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
3123 ; NOPRT-NEXT: s_endpgm
3125 ; GFX10PLUS-LABEL: store_mip_2darray:
3126 ; GFX10PLUS: ; %bb.0: ; %main_body
3127 ; GFX10PLUS-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm
3128 ; GFX10PLUS-NEXT: s_endpgm
3130 ; GFX12-LABEL: store_mip_2darray:
3131 ; GFX12: ; %bb.0: ; %main_body
3132 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5, v6, v7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY
3133 ; GFX12-NEXT: s_endpgm
3135 call void @llvm.amdgcn.image.store.mip.2darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3139 define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, i32 %mip) {
3140 ; VERDE-LABEL: getresinfo_1d:
3141 ; VERDE: ; %bb.0: ; %main_body
3142 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3143 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3144 ; VERDE-NEXT: ; return to shader part epilog
3146 ; FIJI-LABEL: getresinfo_1d:
3147 ; FIJI: ; %bb.0: ; %main_body
3148 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3149 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3150 ; FIJI-NEXT: ; return to shader part epilog
3152 ; GFX6789-LABEL: getresinfo_1d:
3153 ; GFX6789: ; %bb.0: ; %main_body
3154 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3155 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3156 ; GFX6789-NEXT: ; return to shader part epilog
3158 ; NOPRT-LABEL: getresinfo_1d:
3159 ; NOPRT: ; %bb.0: ; %main_body
3160 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3161 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3162 ; NOPRT-NEXT: ; return to shader part epilog
3164 ; GFX10PLUS-LABEL: getresinfo_1d:
3165 ; GFX10PLUS: ; %bb.0: ; %main_body
3166 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
3167 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3168 ; GFX10PLUS-NEXT: ; return to shader part epilog
3170 ; GFX12-LABEL: getresinfo_1d:
3171 ; GFX12: ; %bb.0: ; %main_body
3172 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
3173 ; GFX12-NEXT: s_wait_loadcnt 0x0
3174 ; GFX12-NEXT: ; return to shader part epilog
3176 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3180 define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, i32 %mip) {
3181 ; VERDE-LABEL: getresinfo_2d:
3182 ; VERDE: ; %bb.0: ; %main_body
3183 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3184 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3185 ; VERDE-NEXT: ; return to shader part epilog
3187 ; FIJI-LABEL: getresinfo_2d:
3188 ; FIJI: ; %bb.0: ; %main_body
3189 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3190 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3191 ; FIJI-NEXT: ; return to shader part epilog
3193 ; GFX6789-LABEL: getresinfo_2d:
3194 ; GFX6789: ; %bb.0: ; %main_body
3195 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3196 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3197 ; GFX6789-NEXT: ; return to shader part epilog
3199 ; NOPRT-LABEL: getresinfo_2d:
3200 ; NOPRT: ; %bb.0: ; %main_body
3201 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3202 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3203 ; NOPRT-NEXT: ; return to shader part epilog
3205 ; GFX10PLUS-LABEL: getresinfo_2d:
3206 ; GFX10PLUS: ; %bb.0: ; %main_body
3207 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
3208 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3209 ; GFX10PLUS-NEXT: ; return to shader part epilog
3211 ; GFX12-LABEL: getresinfo_2d:
3212 ; GFX12: ; %bb.0: ; %main_body
3213 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D
3214 ; GFX12-NEXT: s_wait_loadcnt 0x0
3215 ; GFX12-NEXT: ; return to shader part epilog
3217 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3221 define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, i32 %mip) {
3222 ; VERDE-LABEL: getresinfo_3d:
3223 ; VERDE: ; %bb.0: ; %main_body
3224 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3225 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3226 ; VERDE-NEXT: ; return to shader part epilog
3228 ; FIJI-LABEL: getresinfo_3d:
3229 ; FIJI: ; %bb.0: ; %main_body
3230 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3231 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3232 ; FIJI-NEXT: ; return to shader part epilog
3234 ; GFX6789-LABEL: getresinfo_3d:
3235 ; GFX6789: ; %bb.0: ; %main_body
3236 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3237 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3238 ; GFX6789-NEXT: ; return to shader part epilog
3240 ; NOPRT-LABEL: getresinfo_3d:
3241 ; NOPRT: ; %bb.0: ; %main_body
3242 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3243 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3244 ; NOPRT-NEXT: ; return to shader part epilog
3246 ; GFX10PLUS-LABEL: getresinfo_3d:
3247 ; GFX10PLUS: ; %bb.0: ; %main_body
3248 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm
3249 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3250 ; GFX10PLUS-NEXT: ; return to shader part epilog
3252 ; GFX12-LABEL: getresinfo_3d:
3253 ; GFX12: ; %bb.0: ; %main_body
3254 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D
3255 ; GFX12-NEXT: s_wait_loadcnt 0x0
3256 ; GFX12-NEXT: ; return to shader part epilog
3258 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3262 define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, i32 %mip) {
3263 ; VERDE-LABEL: getresinfo_cube:
3264 ; VERDE: ; %bb.0: ; %main_body
3265 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3266 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3267 ; VERDE-NEXT: ; return to shader part epilog
3269 ; FIJI-LABEL: getresinfo_cube:
3270 ; FIJI: ; %bb.0: ; %main_body
3271 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3272 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3273 ; FIJI-NEXT: ; return to shader part epilog
3275 ; GFX6789-LABEL: getresinfo_cube:
3276 ; GFX6789: ; %bb.0: ; %main_body
3277 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3278 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3279 ; GFX6789-NEXT: ; return to shader part epilog
3281 ; NOPRT-LABEL: getresinfo_cube:
3282 ; NOPRT: ; %bb.0: ; %main_body
3283 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3284 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3285 ; NOPRT-NEXT: ; return to shader part epilog
3287 ; GFX10PLUS-LABEL: getresinfo_cube:
3288 ; GFX10PLUS: ; %bb.0: ; %main_body
3289 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm
3290 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3291 ; GFX10PLUS-NEXT: ; return to shader part epilog
3293 ; GFX12-LABEL: getresinfo_cube:
3294 ; GFX12: ; %bb.0: ; %main_body
3295 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE
3296 ; GFX12-NEXT: s_wait_loadcnt 0x0
3297 ; GFX12-NEXT: ; return to shader part epilog
3299 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3303 define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, i32 %mip) {
3304 ; VERDE-LABEL: getresinfo_1darray:
3305 ; VERDE: ; %bb.0: ; %main_body
3306 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3307 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3308 ; VERDE-NEXT: ; return to shader part epilog
3310 ; FIJI-LABEL: getresinfo_1darray:
3311 ; FIJI: ; %bb.0: ; %main_body
3312 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3313 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3314 ; FIJI-NEXT: ; return to shader part epilog
3316 ; GFX6789-LABEL: getresinfo_1darray:
3317 ; GFX6789: ; %bb.0: ; %main_body
3318 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3319 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3320 ; GFX6789-NEXT: ; return to shader part epilog
3322 ; NOPRT-LABEL: getresinfo_1darray:
3323 ; NOPRT: ; %bb.0: ; %main_body
3324 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3325 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3326 ; NOPRT-NEXT: ; return to shader part epilog
3328 ; GFX10PLUS-LABEL: getresinfo_1darray:
3329 ; GFX10PLUS: ; %bb.0: ; %main_body
3330 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm
3331 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3332 ; GFX10PLUS-NEXT: ; return to shader part epilog
3334 ; GFX12-LABEL: getresinfo_1darray:
3335 ; GFX12: ; %bb.0: ; %main_body
3336 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY
3337 ; GFX12-NEXT: s_wait_loadcnt 0x0
3338 ; GFX12-NEXT: ; return to shader part epilog
3340 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3344 define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, i32 %mip) {
3345 ; VERDE-LABEL: getresinfo_2darray:
3346 ; VERDE: ; %bb.0: ; %main_body
3347 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3348 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3349 ; VERDE-NEXT: ; return to shader part epilog
3351 ; FIJI-LABEL: getresinfo_2darray:
3352 ; FIJI: ; %bb.0: ; %main_body
3353 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3354 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3355 ; FIJI-NEXT: ; return to shader part epilog
3357 ; GFX6789-LABEL: getresinfo_2darray:
3358 ; GFX6789: ; %bb.0: ; %main_body
3359 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3360 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3361 ; GFX6789-NEXT: ; return to shader part epilog
3363 ; NOPRT-LABEL: getresinfo_2darray:
3364 ; NOPRT: ; %bb.0: ; %main_body
3365 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3366 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3367 ; NOPRT-NEXT: ; return to shader part epilog
3369 ; GFX10PLUS-LABEL: getresinfo_2darray:
3370 ; GFX10PLUS: ; %bb.0: ; %main_body
3371 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm
3372 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3373 ; GFX10PLUS-NEXT: ; return to shader part epilog
3375 ; GFX12-LABEL: getresinfo_2darray:
3376 ; GFX12: ; %bb.0: ; %main_body
3377 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY
3378 ; GFX12-NEXT: s_wait_loadcnt 0x0
3379 ; GFX12-NEXT: ; return to shader part epilog
3381 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3385 define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, i32 %mip) {
3386 ; VERDE-LABEL: getresinfo_2dmsaa:
3387 ; VERDE: ; %bb.0: ; %main_body
3388 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3389 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3390 ; VERDE-NEXT: ; return to shader part epilog
3392 ; FIJI-LABEL: getresinfo_2dmsaa:
3393 ; FIJI: ; %bb.0: ; %main_body
3394 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3395 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3396 ; FIJI-NEXT: ; return to shader part epilog
3398 ; GFX6789-LABEL: getresinfo_2dmsaa:
3399 ; GFX6789: ; %bb.0: ; %main_body
3400 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3401 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3402 ; GFX6789-NEXT: ; return to shader part epilog
3404 ; NOPRT-LABEL: getresinfo_2dmsaa:
3405 ; NOPRT: ; %bb.0: ; %main_body
3406 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
3407 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3408 ; NOPRT-NEXT: ; return to shader part epilog
3410 ; GFX10PLUS-LABEL: getresinfo_2dmsaa:
3411 ; GFX10PLUS: ; %bb.0: ; %main_body
3412 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm
3413 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3414 ; GFX10PLUS-NEXT: ; return to shader part epilog
3416 ; GFX12-LABEL: getresinfo_2dmsaa:
3417 ; GFX12: ; %bb.0: ; %main_body
3418 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA
3419 ; GFX12-NEXT: s_wait_loadcnt 0x0
3420 ; GFX12-NEXT: ; return to shader part epilog
3422 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3426 define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, i32 %mip) {
3427 ; VERDE-LABEL: getresinfo_2darraymsaa:
3428 ; VERDE: ; %bb.0: ; %main_body
3429 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3430 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3431 ; VERDE-NEXT: ; return to shader part epilog
3433 ; FIJI-LABEL: getresinfo_2darraymsaa:
3434 ; FIJI: ; %bb.0: ; %main_body
3435 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3436 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3437 ; FIJI-NEXT: ; return to shader part epilog
3439 ; GFX6789-LABEL: getresinfo_2darraymsaa:
3440 ; GFX6789: ; %bb.0: ; %main_body
3441 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3442 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3443 ; GFX6789-NEXT: ; return to shader part epilog
3445 ; NOPRT-LABEL: getresinfo_2darraymsaa:
3446 ; NOPRT: ; %bb.0: ; %main_body
3447 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
3448 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3449 ; NOPRT-NEXT: ; return to shader part epilog
3451 ; GFX10PLUS-LABEL: getresinfo_2darraymsaa:
3452 ; GFX10PLUS: ; %bb.0: ; %main_body
3453 ; GFX10PLUS-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm
3454 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3455 ; GFX10PLUS-NEXT: ; return to shader part epilog
3457 ; GFX12-LABEL: getresinfo_2darraymsaa:
3458 ; GFX12: ; %bb.0: ; %main_body
3459 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY
3460 ; GFX12-NEXT: s_wait_loadcnt 0x0
3461 ; GFX12-NEXT: ; return to shader part epilog
3463 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3467 define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, i32 %s) {
3468 ; VERDE-LABEL: load_1d_V1:
3469 ; VERDE: ; %bb.0: ; %main_body
3470 ; VERDE-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
3471 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3472 ; VERDE-NEXT: ; return to shader part epilog
3474 ; FIJI-LABEL: load_1d_V1:
3475 ; FIJI: ; %bb.0: ; %main_body
3476 ; FIJI-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
3477 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3478 ; FIJI-NEXT: ; return to shader part epilog
3480 ; GFX6789-LABEL: load_1d_V1:
3481 ; GFX6789: ; %bb.0: ; %main_body
3482 ; GFX6789-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
3483 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3484 ; GFX6789-NEXT: ; return to shader part epilog
3486 ; NOPRT-LABEL: load_1d_V1:
3487 ; NOPRT: ; %bb.0: ; %main_body
3488 ; NOPRT-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
3489 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3490 ; NOPRT-NEXT: ; return to shader part epilog
3492 ; GFX10PLUS-LABEL: load_1d_V1:
3493 ; GFX10PLUS: ; %bb.0: ; %main_body
3494 ; GFX10PLUS-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm
3495 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3496 ; GFX10PLUS-NEXT: ; return to shader part epilog
3498 ; GFX12-LABEL: load_1d_V1:
3499 ; GFX12: ; %bb.0: ; %main_body
3500 ; GFX12-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D
3501 ; GFX12-NEXT: s_wait_loadcnt 0x0
3502 ; GFX12-NEXT: ; return to shader part epilog
3504 %v = call float @llvm.amdgcn.image.load.1d.f32.i32(i32 8, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
3508 define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, i32 %s) {
3509 ; VERDE-LABEL: load_1d_V2:
3510 ; VERDE: ; %bb.0: ; %main_body
3511 ; VERDE-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
3512 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3513 ; VERDE-NEXT: ; return to shader part epilog
3515 ; FIJI-LABEL: load_1d_V2:
3516 ; FIJI: ; %bb.0: ; %main_body
3517 ; FIJI-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
3518 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3519 ; FIJI-NEXT: ; return to shader part epilog
3521 ; GFX6789-LABEL: load_1d_V2:
3522 ; GFX6789: ; %bb.0: ; %main_body
3523 ; GFX6789-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
3524 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3525 ; GFX6789-NEXT: ; return to shader part epilog
3527 ; NOPRT-LABEL: load_1d_V2:
3528 ; NOPRT: ; %bb.0: ; %main_body
3529 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
3530 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3531 ; NOPRT-NEXT: ; return to shader part epilog
3533 ; GFX10PLUS-LABEL: load_1d_V2:
3534 ; GFX10PLUS: ; %bb.0: ; %main_body
3535 ; GFX10PLUS-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm
3536 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3537 ; GFX10PLUS-NEXT: ; return to shader part epilog
3539 ; GFX12-LABEL: load_1d_V2:
3540 ; GFX12: ; %bb.0: ; %main_body
3541 ; GFX12-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D
3542 ; GFX12-NEXT: s_wait_loadcnt 0x0
3543 ; GFX12-NEXT: ; return to shader part epilog
3545 %v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i32(i32 9, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
3549 define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, i32 %s) {
3550 ; VERDE-LABEL: store_1d_V1:
3551 ; VERDE: ; %bb.0: ; %main_body
3552 ; VERDE-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
3553 ; VERDE-NEXT: s_endpgm
3555 ; FIJI-LABEL: store_1d_V1:
3556 ; FIJI: ; %bb.0: ; %main_body
3557 ; FIJI-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
3558 ; FIJI-NEXT: s_endpgm
3560 ; GFX6789-LABEL: store_1d_V1:
3561 ; GFX6789: ; %bb.0: ; %main_body
3562 ; GFX6789-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
3563 ; GFX6789-NEXT: s_endpgm
3565 ; NOPRT-LABEL: store_1d_V1:
3566 ; NOPRT: ; %bb.0: ; %main_body
3567 ; NOPRT-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
3568 ; NOPRT-NEXT: s_endpgm
3570 ; GFX10PLUS-LABEL: store_1d_V1:
3571 ; GFX10PLUS: ; %bb.0: ; %main_body
3572 ; GFX10PLUS-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm
3573 ; GFX10PLUS-NEXT: s_endpgm
3575 ; GFX12-LABEL: store_1d_V1:
3576 ; GFX12: ; %bb.0: ; %main_body
3577 ; GFX12-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D
3578 ; GFX12-NEXT: s_endpgm
3580 call void @llvm.amdgcn.image.store.1d.f32.i32(float %vdata, i32 2, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
3584 define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, i32 %s) {
3585 ; VERDE-LABEL: store_1d_V2:
3586 ; VERDE: ; %bb.0: ; %main_body
3587 ; VERDE-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
3588 ; VERDE-NEXT: s_endpgm
3590 ; FIJI-LABEL: store_1d_V2:
3591 ; FIJI: ; %bb.0: ; %main_body
3592 ; FIJI-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
3593 ; FIJI-NEXT: s_endpgm
3595 ; GFX6789-LABEL: store_1d_V2:
3596 ; GFX6789: ; %bb.0: ; %main_body
3597 ; GFX6789-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
3598 ; GFX6789-NEXT: s_endpgm
3600 ; NOPRT-LABEL: store_1d_V2:
3601 ; NOPRT: ; %bb.0: ; %main_body
3602 ; NOPRT-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
3603 ; NOPRT-NEXT: s_endpgm
3605 ; GFX10PLUS-LABEL: store_1d_V2:
3606 ; GFX10PLUS: ; %bb.0: ; %main_body
3607 ; GFX10PLUS-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm
3608 ; GFX10PLUS-NEXT: s_endpgm
3610 ; GFX12-LABEL: store_1d_V2:
3611 ; GFX12: ; %bb.0: ; %main_body
3612 ; GFX12-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D
3613 ; GFX12-NEXT: s_endpgm
3615 call void @llvm.amdgcn.image.store.1d.v2f32.i32(<2 x float> %vdata, i32 12, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
3619 define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, i32 %s) {
3620 ; VERDE-LABEL: load_1d_glc:
3621 ; VERDE: ; %bb.0: ; %main_body
3622 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
3623 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3624 ; VERDE-NEXT: ; return to shader part epilog
3626 ; FIJI-LABEL: load_1d_glc:
3627 ; FIJI: ; %bb.0: ; %main_body
3628 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
3629 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3630 ; FIJI-NEXT: ; return to shader part epilog
3632 ; GFX6789-LABEL: load_1d_glc:
3633 ; GFX6789: ; %bb.0: ; %main_body
3634 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
3635 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3636 ; GFX6789-NEXT: ; return to shader part epilog
3638 ; NOPRT-LABEL: load_1d_glc:
3639 ; NOPRT: ; %bb.0: ; %main_body
3640 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
3641 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3642 ; NOPRT-NEXT: ; return to shader part epilog
3644 ; GFX10PLUS-LABEL: load_1d_glc:
3645 ; GFX10PLUS: ; %bb.0: ; %main_body
3646 ; GFX10PLUS-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc
3647 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3648 ; GFX10PLUS-NEXT: ; return to shader part epilog
3650 ; GFX12-LABEL: load_1d_glc:
3651 ; GFX12: ; %bb.0: ; %main_body
3652 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_NT
3653 ; GFX12-NEXT: s_wait_loadcnt 0x0
3654 ; GFX12-NEXT: ; return to shader part epilog
3656 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
3660 define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, i32 %s) {
3661 ; VERDE-LABEL: load_1d_slc:
3662 ; VERDE: ; %bb.0: ; %main_body
3663 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3664 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3665 ; VERDE-NEXT: ; return to shader part epilog
3667 ; FIJI-LABEL: load_1d_slc:
3668 ; FIJI: ; %bb.0: ; %main_body
3669 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3670 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3671 ; FIJI-NEXT: ; return to shader part epilog
3673 ; GFX6789-LABEL: load_1d_slc:
3674 ; GFX6789: ; %bb.0: ; %main_body
3675 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3676 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3677 ; GFX6789-NEXT: ; return to shader part epilog
3679 ; NOPRT-LABEL: load_1d_slc:
3680 ; NOPRT: ; %bb.0: ; %main_body
3681 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3682 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3683 ; NOPRT-NEXT: ; return to shader part epilog
3685 ; GFX10PLUS-LABEL: load_1d_slc:
3686 ; GFX10PLUS: ; %bb.0: ; %main_body
3687 ; GFX10PLUS-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc
3688 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3689 ; GFX10PLUS-NEXT: ; return to shader part epilog
3691 ; GFX12-LABEL: load_1d_slc:
3692 ; GFX12: ; %bb.0: ; %main_body
3693 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_HT
3694 ; GFX12-NEXT: s_wait_loadcnt 0x0
3695 ; GFX12-NEXT: ; return to shader part epilog
3697 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
3701 define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, i32 %s) {
3702 ; VERDE-LABEL: load_1d_glc_slc:
3703 ; VERDE: ; %bb.0: ; %main_body
3704 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3705 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3706 ; VERDE-NEXT: ; return to shader part epilog
3708 ; FIJI-LABEL: load_1d_glc_slc:
3709 ; FIJI: ; %bb.0: ; %main_body
3710 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3711 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3712 ; FIJI-NEXT: ; return to shader part epilog
3714 ; GFX6789-LABEL: load_1d_glc_slc:
3715 ; GFX6789: ; %bb.0: ; %main_body
3716 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3717 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3718 ; GFX6789-NEXT: ; return to shader part epilog
3720 ; NOPRT-LABEL: load_1d_glc_slc:
3721 ; NOPRT: ; %bb.0: ; %main_body
3722 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3723 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3724 ; NOPRT-NEXT: ; return to shader part epilog
3726 ; GFX10PLUS-LABEL: load_1d_glc_slc:
3727 ; GFX10PLUS: ; %bb.0: ; %main_body
3728 ; GFX10PLUS-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc
3729 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3730 ; GFX10PLUS-NEXT: ; return to shader part epilog
3732 ; GFX12-LABEL: load_1d_glc_slc:
3733 ; GFX12: ; %bb.0: ; %main_body
3734 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_LU
3735 ; GFX12-NEXT: s_wait_loadcnt 0x0
3736 ; GFX12-NEXT: ; return to shader part epilog
3738 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
3742 define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
3743 ; VERDE-LABEL: store_1d_glc:
3744 ; VERDE: ; %bb.0: ; %main_body
3745 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3746 ; VERDE-NEXT: s_endpgm
3748 ; FIJI-LABEL: store_1d_glc:
3749 ; FIJI: ; %bb.0: ; %main_body
3750 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3751 ; FIJI-NEXT: s_endpgm
3753 ; GFX6789-LABEL: store_1d_glc:
3754 ; GFX6789: ; %bb.0: ; %main_body
3755 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3756 ; GFX6789-NEXT: s_endpgm
3758 ; NOPRT-LABEL: store_1d_glc:
3759 ; NOPRT: ; %bb.0: ; %main_body
3760 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3761 ; NOPRT-NEXT: s_endpgm
3763 ; GFX10PLUS-LABEL: store_1d_glc:
3764 ; GFX10PLUS: ; %bb.0: ; %main_body
3765 ; GFX10PLUS-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc
3766 ; GFX10PLUS-NEXT: s_endpgm
3768 ; GFX12-LABEL: store_1d_glc:
3769 ; GFX12: ; %bb.0: ; %main_body
3770 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_NT
3771 ; GFX12-NEXT: s_endpgm
3773 call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
3777 define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
3778 ; VERDE-LABEL: store_1d_slc:
3779 ; VERDE: ; %bb.0: ; %main_body
3780 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3781 ; VERDE-NEXT: s_endpgm
3783 ; FIJI-LABEL: store_1d_slc:
3784 ; FIJI: ; %bb.0: ; %main_body
3785 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3786 ; FIJI-NEXT: s_endpgm
3788 ; GFX6789-LABEL: store_1d_slc:
3789 ; GFX6789: ; %bb.0: ; %main_body
3790 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3791 ; GFX6789-NEXT: s_endpgm
3793 ; NOPRT-LABEL: store_1d_slc:
3794 ; NOPRT: ; %bb.0: ; %main_body
3795 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3796 ; NOPRT-NEXT: s_endpgm
3798 ; GFX10PLUS-LABEL: store_1d_slc:
3799 ; GFX10PLUS: ; %bb.0: ; %main_body
3800 ; GFX10PLUS-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc
3801 ; GFX10PLUS-NEXT: s_endpgm
3803 ; GFX12-LABEL: store_1d_slc:
3804 ; GFX12: ; %bb.0: ; %main_body
3805 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_HT
3806 ; GFX12-NEXT: s_endpgm
3808 call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
3812 define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
3813 ; VERDE-LABEL: store_1d_glc_slc:
3814 ; VERDE: ; %bb.0: ; %main_body
3815 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3816 ; VERDE-NEXT: s_endpgm
3818 ; FIJI-LABEL: store_1d_glc_slc:
3819 ; FIJI: ; %bb.0: ; %main_body
3820 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3821 ; FIJI-NEXT: s_endpgm
3823 ; GFX6789-LABEL: store_1d_glc_slc:
3824 ; GFX6789: ; %bb.0: ; %main_body
3825 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3826 ; GFX6789-NEXT: s_endpgm
3828 ; NOPRT-LABEL: store_1d_glc_slc:
3829 ; NOPRT: ; %bb.0: ; %main_body
3830 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3831 ; NOPRT-NEXT: s_endpgm
3833 ; GFX10PLUS-LABEL: store_1d_glc_slc:
3834 ; GFX10PLUS: ; %bb.0: ; %main_body
3835 ; GFX10PLUS-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc
3836 ; GFX10PLUS-NEXT: s_endpgm
3838 ; GFX12-LABEL: store_1d_glc_slc:
3839 ; GFX12: ; %bb.0: ; %main_body
3840 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB
3841 ; GFX12-NEXT: s_endpgm
3843 call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
3847 define amdgpu_ps <3 x float> @getresinfo_dmask7(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) {
3848 ; VERDE-LABEL: getresinfo_dmask7:
3849 ; VERDE: ; %bb.0: ; %main_body
3850 ; VERDE-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3851 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3852 ; VERDE-NEXT: ; return to shader part epilog
3854 ; FIJI-LABEL: getresinfo_dmask7:
3855 ; FIJI: ; %bb.0: ; %main_body
3856 ; FIJI-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3857 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3858 ; FIJI-NEXT: ; return to shader part epilog
3860 ; GFX6789-LABEL: getresinfo_dmask7:
3861 ; GFX6789: ; %bb.0: ; %main_body
3862 ; GFX6789-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3863 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3864 ; GFX6789-NEXT: ; return to shader part epilog
3866 ; NOPRT-LABEL: getresinfo_dmask7:
3867 ; NOPRT: ; %bb.0: ; %main_body
3868 ; NOPRT-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3869 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3870 ; NOPRT-NEXT: ; return to shader part epilog
3872 ; GFX10PLUS-LABEL: getresinfo_dmask7:
3873 ; GFX10PLUS: ; %bb.0: ; %main_body
3874 ; GFX10PLUS-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm
3875 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3876 ; GFX10PLUS-NEXT: ; return to shader part epilog
3878 ; GFX12-LABEL: getresinfo_dmask7:
3879 ; GFX12: ; %bb.0: ; %main_body
3880 ; GFX12-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D
3881 ; GFX12-NEXT: s_wait_loadcnt 0x0
3882 ; GFX12-NEXT: ; return to shader part epilog
3884 %r = call <3 x float> @llvm.amdgcn.image.getresinfo.1d.v3f32.i32(i32 7, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3888 define amdgpu_ps <2 x float> @getresinfo_dmask3(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) {
3889 ; VERDE-LABEL: getresinfo_dmask3:
3890 ; VERDE: ; %bb.0: ; %main_body
3891 ; VERDE-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3892 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3893 ; VERDE-NEXT: ; return to shader part epilog
3895 ; FIJI-LABEL: getresinfo_dmask3:
3896 ; FIJI: ; %bb.0: ; %main_body
3897 ; FIJI-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3898 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3899 ; FIJI-NEXT: ; return to shader part epilog
3901 ; GFX6789-LABEL: getresinfo_dmask3:
3902 ; GFX6789: ; %bb.0: ; %main_body
3903 ; GFX6789-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3904 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3905 ; GFX6789-NEXT: ; return to shader part epilog
3907 ; NOPRT-LABEL: getresinfo_dmask3:
3908 ; NOPRT: ; %bb.0: ; %main_body
3909 ; NOPRT-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3910 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3911 ; NOPRT-NEXT: ; return to shader part epilog
3913 ; GFX10PLUS-LABEL: getresinfo_dmask3:
3914 ; GFX10PLUS: ; %bb.0: ; %main_body
3915 ; GFX10PLUS-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_1D unorm
3916 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3917 ; GFX10PLUS-NEXT: ; return to shader part epilog
3919 ; GFX12-LABEL: getresinfo_dmask3:
3920 ; GFX12: ; %bb.0: ; %main_body
3921 ; GFX12-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_1D
3922 ; GFX12-NEXT: s_wait_loadcnt 0x0
3923 ; GFX12-NEXT: ; return to shader part epilog
3925 %r = call <2 x float> @llvm.amdgcn.image.getresinfo.1d.v2f32.i32(i32 3, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3929 define amdgpu_ps float @getresinfo_dmask1(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) {
3930 ; VERDE-LABEL: getresinfo_dmask1:
3931 ; VERDE: ; %bb.0: ; %main_body
3932 ; VERDE-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3933 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3934 ; VERDE-NEXT: ; return to shader part epilog
3936 ; FIJI-LABEL: getresinfo_dmask1:
3937 ; FIJI: ; %bb.0: ; %main_body
3938 ; FIJI-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3939 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3940 ; FIJI-NEXT: ; return to shader part epilog
3942 ; GFX6789-LABEL: getresinfo_dmask1:
3943 ; GFX6789: ; %bb.0: ; %main_body
3944 ; GFX6789-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3945 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3946 ; GFX6789-NEXT: ; return to shader part epilog
3948 ; NOPRT-LABEL: getresinfo_dmask1:
3949 ; NOPRT: ; %bb.0: ; %main_body
3950 ; NOPRT-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3951 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3952 ; NOPRT-NEXT: ; return to shader part epilog
3954 ; GFX10PLUS-LABEL: getresinfo_dmask1:
3955 ; GFX10PLUS: ; %bb.0: ; %main_body
3956 ; GFX10PLUS-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D unorm
3957 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
3958 ; GFX10PLUS-NEXT: ; return to shader part epilog
3960 ; GFX12-LABEL: getresinfo_dmask1:
3961 ; GFX12: ; %bb.0: ; %main_body
3962 ; GFX12-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D
3963 ; GFX12-NEXT: s_wait_loadcnt 0x0
3964 ; GFX12-NEXT: ; return to shader part epilog
3966 %r = call float @llvm.amdgcn.image.getresinfo.1d.f32.i32(i32 1, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3970 define amdgpu_ps <4 x float> @getresinfo_dmask0(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) #0 {
3971 ; VERDE-LABEL: getresinfo_dmask0:
3972 ; VERDE: ; %bb.0: ; %main_body
3973 ; VERDE-NEXT: ; return to shader part epilog
3975 ; FIJI-LABEL: getresinfo_dmask0:
3976 ; FIJI: ; %bb.0: ; %main_body
3977 ; FIJI-NEXT: ; return to shader part epilog
3979 ; GFX6789-LABEL: getresinfo_dmask0:
3980 ; GFX6789: ; %bb.0: ; %main_body
3981 ; GFX6789-NEXT: ; return to shader part epilog
3983 ; NOPRT-LABEL: getresinfo_dmask0:
3984 ; NOPRT: ; %bb.0: ; %main_body
3985 ; NOPRT-NEXT: ; return to shader part epilog
3987 ; GFX10PLUS-LABEL: getresinfo_dmask0:
3988 ; GFX10PLUS: ; %bb.0: ; %main_body
3989 ; GFX10PLUS-NEXT: ; return to shader part epilog
3991 ; GFX12-LABEL: getresinfo_dmask0:
3992 ; GFX12: ; %bb.0: ; %main_body
3993 ; GFX12-NEXT: ; return to shader part epilog
3995 %r = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32 0, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
4000 define amdgpu_ps void @image_store_wait(<8 x i32> inreg %arg, <8 x i32> inreg %arg1, <8 x i32> inreg %arg2, <4 x float> %arg3, i32 %arg4) #0 {
4001 ; VERDE-LABEL: image_store_wait:
4002 ; VERDE: ; %bb.0: ; %main_body
4003 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
4004 ; VERDE-NEXT: s_waitcnt expcnt(0)
4005 ; VERDE-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
4006 ; VERDE-NEXT: s_waitcnt vmcnt(0)
4007 ; VERDE-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
4008 ; VERDE-NEXT: s_endpgm
4010 ; FIJI-LABEL: image_store_wait:
4011 ; FIJI: ; %bb.0: ; %main_body
4012 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
4013 ; FIJI-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
4014 ; FIJI-NEXT: s_waitcnt vmcnt(0)
4015 ; FIJI-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
4016 ; FIJI-NEXT: s_endpgm
4018 ; GFX6789-LABEL: image_store_wait:
4019 ; GFX6789: ; %bb.0: ; %main_body
4020 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
4021 ; GFX6789-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
4022 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
4023 ; GFX6789-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
4024 ; GFX6789-NEXT: s_endpgm
4026 ; NOPRT-LABEL: image_store_wait:
4027 ; NOPRT: ; %bb.0: ; %main_body
4028 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
4029 ; NOPRT-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
4030 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
4031 ; NOPRT-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
4032 ; NOPRT-NEXT: s_endpgm
4034 ; GFX10PLUS-LABEL: image_store_wait:
4035 ; GFX10PLUS: ; %bb.0: ; %main_body
4036 ; GFX10PLUS-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
4037 ; GFX10PLUS-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
4038 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0)
4039 ; GFX10PLUS-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf dim:SQ_RSRC_IMG_1D unorm
4040 ; GFX10PLUS-NEXT: s_endpgm
4042 ; GFX12-LABEL: image_store_wait:
4043 ; GFX12: ; %bb.0: ; %main_body
4044 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D
4045 ; GFX12-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf dim:SQ_RSRC_IMG_1D
4046 ; GFX12-NEXT: s_wait_loadcnt 0x0
4047 ; GFX12-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf dim:SQ_RSRC_IMG_1D
4048 ; GFX12-NEXT: s_endpgm
4050 call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %arg3, i32 15, i32 %arg4, <8 x i32> %arg, i32 0, i32 0)
4051 %data = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %arg4, <8 x i32> %arg1, i32 0, i32 0)
4052 call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %data, i32 15, i32 %arg4, <8 x i32> %arg2, i32 0, i32 0)
4056 define amdgpu_ps float @image_load_mmo(<8 x i32> inreg %rsrc, ptr addrspace(3) %lds, <2 x i32> %c) #0 {
4057 ; VERDE-LABEL: image_load_mmo:
4059 ; VERDE-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
4060 ; VERDE-NEXT: v_mov_b32_e32 v2, 0
4061 ; VERDE-NEXT: s_mov_b32 m0, -1
4062 ; VERDE-NEXT: ds_write_b32 v0, v2
4063 ; VERDE-NEXT: v_add_i32_e32 v0, vcc, 16, v0
4064 ; VERDE-NEXT: ds_write_b32 v0, v2
4065 ; VERDE-NEXT: s_waitcnt vmcnt(0)
4066 ; VERDE-NEXT: v_mov_b32_e32 v0, v1
4067 ; VERDE-NEXT: s_waitcnt lgkmcnt(0)
4068 ; VERDE-NEXT: ; return to shader part epilog
4070 ; FIJI-LABEL: image_load_mmo:
4072 ; FIJI-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
4073 ; FIJI-NEXT: v_mov_b32_e32 v2, 0
4074 ; FIJI-NEXT: s_mov_b32 m0, -1
4075 ; FIJI-NEXT: ds_write2_b32 v0, v2, v2 offset1:4
4076 ; FIJI-NEXT: s_waitcnt vmcnt(0)
4077 ; FIJI-NEXT: v_mov_b32_e32 v0, v1
4078 ; FIJI-NEXT: s_waitcnt lgkmcnt(0)
4079 ; FIJI-NEXT: ; return to shader part epilog
4081 ; GFX6789-LABEL: image_load_mmo:
4083 ; GFX6789-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
4084 ; GFX6789-NEXT: v_mov_b32_e32 v2, 0
4085 ; GFX6789-NEXT: ds_write2_b32 v0, v2, v2 offset1:4
4086 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
4087 ; GFX6789-NEXT: v_mov_b32_e32 v0, v1
4088 ; GFX6789-NEXT: s_waitcnt lgkmcnt(0)
4089 ; GFX6789-NEXT: ; return to shader part epilog
4091 ; NOPRT-LABEL: image_load_mmo:
4093 ; NOPRT-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
4094 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
4095 ; NOPRT-NEXT: ds_write2_b32 v0, v2, v2 offset1:4
4096 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
4097 ; NOPRT-NEXT: v_mov_b32_e32 v0, v1
4098 ; NOPRT-NEXT: s_waitcnt lgkmcnt(0)
4099 ; NOPRT-NEXT: ; return to shader part epilog
4101 ; GFX10-LABEL: image_load_mmo:
4103 ; GFX10-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
4104 ; GFX10-NEXT: v_mov_b32_e32 v2, 0
4105 ; GFX10-NEXT: ds_write2_b32 v0, v2, v2 offset1:4
4106 ; GFX10-NEXT: s_waitcnt vmcnt(0)
4107 ; GFX10-NEXT: v_mov_b32_e32 v0, v1
4108 ; GFX10-NEXT: s_waitcnt lgkmcnt(0)
4109 ; GFX10-NEXT: ; return to shader part epilog
4111 ; GFX11-LABEL: image_load_mmo:
4113 ; GFX11-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
4114 ; GFX11-NEXT: v_mov_b32_e32 v2, 0
4115 ; GFX11-NEXT: ds_store_2addr_b32 v0, v2, v2 offset1:4
4116 ; GFX11-NEXT: s_waitcnt vmcnt(0)
4117 ; GFX11-NEXT: v_mov_b32_e32 v0, v1
4118 ; GFX11-NEXT: s_waitcnt lgkmcnt(0)
4119 ; GFX11-NEXT: ; return to shader part epilog
4121 ; GFX12-LABEL: image_load_mmo:
4123 ; GFX12-NEXT: image_load v1, [v1, v2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D
4124 ; GFX12-NEXT: v_mov_b32_e32 v2, 0
4125 ; GFX12-NEXT: ds_store_2addr_b32 v0, v2, v2 offset1:4
4126 ; GFX12-NEXT: s_wait_loadcnt 0x0
4127 ; GFX12-NEXT: v_mov_b32_e32 v0, v1
4128 ; GFX12-NEXT: s_wait_dscnt 0x0
4129 ; GFX12-NEXT: ; return to shader part epilog
4130 store float 0.000000e+00, ptr addrspace(3) %lds
4131 %c0 = extractelement <2 x i32> %c, i32 0
4132 %c1 = extractelement <2 x i32> %c, i32 1
4133 %tex = call float @llvm.amdgcn.image.load.2d.f32.i32(i32 1, i32 %c0, i32 %c1, <8 x i32> %rsrc, i32 0, i32 0)
4134 %tmp2 = getelementptr float, ptr addrspace(3) %lds, i32 4
4135 store float 0.000000e+00, ptr addrspace(3) %tmp2
4139 declare <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #1
4140 declare {float,i32} @llvm.amdgcn.image.load.1d.f32i32.i32(i32, i32, <8 x i32>, i32, i32) #1
4141 declare {<2 x float>,i32} @llvm.amdgcn.image.load.1d.v2f32i32.i32(i32, i32, <8 x i32>, i32, i32) #1
4142 declare {<4 x float>,i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32, i32, <8 x i32>, i32, i32) #1
4143 declare <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4144 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2d.v4f32i32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4145 declare <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4146 declare {<4 x float>,i32} @llvm.amdgcn.image.load.3d.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4147 declare <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4148 declare {<4 x float>,i32} @llvm.amdgcn.image.load.cube.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4149 declare <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4150 declare {<4 x float>,i32} @llvm.amdgcn.image.load.1darray.v4f32i32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4151 declare <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4152 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2darray.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4153 declare <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4154 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2dmsaa.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4155 declare <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4156 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2darraymsaa.v4f32i32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4158 declare <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4159 declare <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4160 declare {<4 x float>,i32} @llvm.amdgcn.image.load.mip.1d.v4f32i32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4161 declare {<4 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4162 declare {<2 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v2f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4163 declare {float,i32} @llvm.amdgcn.image.load.mip.2d.f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4164 declare <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4165 declare <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4166 declare <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4167 declare <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
4169 declare void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float>, i32, i32, <8 x i32>, i32, i32) #0
4170 declare void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float>, i32, i32, i32, <8 x i32>, i32, i32) #0
4171 declare void @llvm.amdgcn.image.store.3d.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4172 declare void @llvm.amdgcn.image.store.cube.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4173 declare void @llvm.amdgcn.image.store.1darray.v4f32.i32(<4 x float>, i32, i32, i32, <8 x i32>, i32, i32) #0
4174 declare void @llvm.amdgcn.image.store.2darray.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4175 declare void @llvm.amdgcn.image.store.2dmsaa.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4176 declare void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4178 declare void @llvm.amdgcn.image.store.mip.1d.v4f32.i32(<4 x float>, i32, i32, i32, <8 x i32>, i32, i32) #0
4179 declare void @llvm.amdgcn.image.store.mip.2d.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4180 declare void @llvm.amdgcn.image.store.mip.3d.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4181 declare void @llvm.amdgcn.image.store.mip.cube.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4182 declare void @llvm.amdgcn.image.store.mip.1darray.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4183 declare void @llvm.amdgcn.image.store.mip.2darray.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
4185 declare <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4186 declare <3 x float> @llvm.amdgcn.image.getresinfo.1d.v3f32.i32(i32 immarg, i32, <8 x i32>, i32 immarg, i32 immarg) #1
4187 declare <2 x float> @llvm.amdgcn.image.getresinfo.1d.v2f32.i32(i32 immarg, i32, <8 x i32>, i32 immarg, i32 immarg) #1
4188 declare float @llvm.amdgcn.image.getresinfo.1d.f32.i32(i32 immarg, i32, <8 x i32>, i32 immarg, i32 immarg) #1
4189 declare <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4190 declare <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4191 declare <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4192 declare <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4193 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4194 declare <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4195 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
4197 declare float @llvm.amdgcn.image.load.1d.f32.i32(i32, i32, <8 x i32>, i32, i32) #1
4198 declare float @llvm.amdgcn.image.load.2d.f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
4199 declare <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i32(i32, i32, <8 x i32>, i32, i32) #1
4200 declare void @llvm.amdgcn.image.store.1d.f32.i32(float, i32, i32, <8 x i32>, i32, i32) #0
4201 declare void @llvm.amdgcn.image.store.1d.v2f32.i32(<2 x float>, i32, i32, <8 x i32>, i32, i32) #0
4203 attributes #0 = { nounwind }
4204 attributes #1 = { nounwind readonly }
4205 attributes #2 = { nounwind readnone }