1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=VERDE %s
3 ; RUN: llc -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=FIJI %s
4 ; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX6789 %s
5 ; RUN: llc -march=amdgcn -mcpu=gfx900 -mattr=-enable-prt-strict-null -verify-machineinstrs < %s | FileCheck -check-prefixes=NOPRT %s
6 ; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -show-mc-encoding < %s | FileCheck -check-prefixes=GFX10 %s
8 define amdgpu_ps <4 x float> @load_1d(<8 x i32> inreg %rsrc, i32 %s) {
9 ; VERDE-LABEL: load_1d:
10 ; VERDE: ; %bb.0: ; %main_body
11 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
12 ; VERDE-NEXT: s_waitcnt vmcnt(0)
13 ; VERDE-NEXT: ; return to shader part epilog
15 ; FIJI-LABEL: load_1d:
16 ; FIJI: ; %bb.0: ; %main_body
17 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
18 ; FIJI-NEXT: s_waitcnt vmcnt(0)
19 ; FIJI-NEXT: ; return to shader part epilog
21 ; GFX6789-LABEL: load_1d:
22 ; GFX6789: ; %bb.0: ; %main_body
23 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
24 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
25 ; GFX6789-NEXT: ; return to shader part epilog
27 ; NOPRT-LABEL: load_1d:
28 ; NOPRT: ; %bb.0: ; %main_body
29 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm
30 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
31 ; NOPRT-NEXT: ; return to shader part epilog
33 ; GFX10-LABEL: load_1d:
34 ; GFX10: ; %bb.0: ; %main_body
35 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
36 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
37 ; GFX10-NEXT: ; return to shader part epilog
39 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
43 define amdgpu_ps <4 x float> @load_1d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
44 ; VERDE-LABEL: load_1d_tfe:
45 ; VERDE: ; %bb.0: ; %main_body
46 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
47 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
48 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
49 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
50 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
51 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
52 ; VERDE-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe
53 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
54 ; VERDE-NEXT: s_mov_b32 s10, -1
55 ; VERDE-NEXT: s_waitcnt vmcnt(0)
56 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
57 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
58 ; VERDE-NEXT: ; return to shader part epilog
60 ; FIJI-LABEL: load_1d_tfe:
61 ; FIJI: ; %bb.0: ; %main_body
62 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
63 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
64 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
65 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
66 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
67 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
68 ; FIJI-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe
69 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
70 ; FIJI-NEXT: s_mov_b32 s10, -1
71 ; FIJI-NEXT: s_waitcnt vmcnt(0)
72 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
73 ; FIJI-NEXT: s_waitcnt vmcnt(0)
74 ; FIJI-NEXT: ; return to shader part epilog
76 ; GFX6789-LABEL: load_1d_tfe:
77 ; GFX6789: ; %bb.0: ; %main_body
78 ; GFX6789-NEXT: v_mov_b32_e32 v6, 0
79 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
80 ; GFX6789-NEXT: v_mov_b32_e32 v7, v6
81 ; GFX6789-NEXT: v_mov_b32_e32 v8, v6
82 ; GFX6789-NEXT: v_mov_b32_e32 v9, v6
83 ; GFX6789-NEXT: v_mov_b32_e32 v10, v6
84 ; GFX6789-NEXT: v_mov_b32_e32 v0, v6
85 ; GFX6789-NEXT: v_mov_b32_e32 v1, v7
86 ; GFX6789-NEXT: v_mov_b32_e32 v2, v8
87 ; GFX6789-NEXT: v_mov_b32_e32 v3, v9
88 ; GFX6789-NEXT: v_mov_b32_e32 v4, v10
89 ; GFX6789-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe
90 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
91 ; GFX6789-NEXT: global_store_dword v6, v4, s[8:9]
92 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
93 ; GFX6789-NEXT: ; return to shader part epilog
95 ; NOPRT-LABEL: load_1d_tfe:
96 ; NOPRT: ; %bb.0: ; %main_body
97 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
98 ; NOPRT-NEXT: image_load v[0:4], v0, s[0:7] dmask:0xf unorm tfe
99 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
100 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
101 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
102 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
103 ; NOPRT-NEXT: ; return to shader part epilog
105 ; GFX10-LABEL: load_1d_tfe:
106 ; GFX10: ; %bb.0: ; %main_body
107 ; GFX10-NEXT: v_mov_b32_e32 v6, 0 ; encoding: [0x80,0x02,0x0c,0x7e]
108 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
109 ; GFX10-NEXT: v_mov_b32_e32 v7, v6 ; encoding: [0x06,0x03,0x0e,0x7e]
110 ; GFX10-NEXT: v_mov_b32_e32 v8, v6 ; encoding: [0x06,0x03,0x10,0x7e]
111 ; GFX10-NEXT: v_mov_b32_e32 v9, v6 ; encoding: [0x06,0x03,0x12,0x7e]
112 ; GFX10-NEXT: v_mov_b32_e32 v10, v6 ; encoding: [0x06,0x03,0x14,0x7e]
113 ; GFX10-NEXT: v_mov_b32_e32 v0, v6 ; encoding: [0x06,0x03,0x00,0x7e]
114 ; GFX10-NEXT: v_mov_b32_e32 v1, v7 ; encoding: [0x07,0x03,0x02,0x7e]
115 ; GFX10-NEXT: v_mov_b32_e32 v2, v8 ; encoding: [0x08,0x03,0x04,0x7e]
116 ; GFX10-NEXT: v_mov_b32_e32 v3, v9 ; encoding: [0x09,0x03,0x06,0x7e]
117 ; GFX10-NEXT: v_mov_b32_e32 v4, v10 ; encoding: [0x0a,0x03,0x08,0x7e]
118 ; GFX10-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00]
119 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
120 ; GFX10-NEXT: global_store_dword v6, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x06,0x04,0x08,0x00]
121 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
122 ; GFX10-NEXT: ; return to shader part epilog
124 %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)
125 %v.vec = extractvalue {<4 x float>, i32} %v, 0
126 %v.err = extractvalue {<4 x float>, i32} %v, 1
127 store i32 %v.err, i32 addrspace(1)* %out, align 4
128 ret <4 x float> %v.vec
131 define amdgpu_ps <4 x float> @load_1d_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
132 ; VERDE-LABEL: load_1d_lwe:
133 ; VERDE: ; %bb.0: ; %main_body
134 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
135 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
136 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
137 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
138 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
139 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
140 ; VERDE-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm lwe
141 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
142 ; VERDE-NEXT: s_mov_b32 s10, -1
143 ; VERDE-NEXT: s_waitcnt vmcnt(0)
144 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
145 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
146 ; VERDE-NEXT: ; return to shader part epilog
148 ; FIJI-LABEL: load_1d_lwe:
149 ; FIJI: ; %bb.0: ; %main_body
150 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
151 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
152 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
153 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
154 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
155 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
156 ; FIJI-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm lwe
157 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
158 ; FIJI-NEXT: s_mov_b32 s10, -1
159 ; FIJI-NEXT: s_waitcnt vmcnt(0)
160 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
161 ; FIJI-NEXT: s_waitcnt vmcnt(0)
162 ; FIJI-NEXT: ; return to shader part epilog
164 ; GFX6789-LABEL: load_1d_lwe:
165 ; GFX6789: ; %bb.0: ; %main_body
166 ; GFX6789-NEXT: v_mov_b32_e32 v6, 0
167 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
168 ; GFX6789-NEXT: v_mov_b32_e32 v7, v6
169 ; GFX6789-NEXT: v_mov_b32_e32 v8, v6
170 ; GFX6789-NEXT: v_mov_b32_e32 v9, v6
171 ; GFX6789-NEXT: v_mov_b32_e32 v10, v6
172 ; GFX6789-NEXT: v_mov_b32_e32 v0, v6
173 ; GFX6789-NEXT: v_mov_b32_e32 v1, v7
174 ; GFX6789-NEXT: v_mov_b32_e32 v2, v8
175 ; GFX6789-NEXT: v_mov_b32_e32 v3, v9
176 ; GFX6789-NEXT: v_mov_b32_e32 v4, v10
177 ; GFX6789-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf unorm lwe
178 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
179 ; GFX6789-NEXT: global_store_dword v6, v4, s[8:9]
180 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
181 ; GFX6789-NEXT: ; return to shader part epilog
183 ; NOPRT-LABEL: load_1d_lwe:
184 ; NOPRT: ; %bb.0: ; %main_body
185 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
186 ; NOPRT-NEXT: image_load v[0:4], v0, s[0:7] dmask:0xf unorm lwe
187 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
188 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
189 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
190 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
191 ; NOPRT-NEXT: ; return to shader part epilog
193 ; GFX10-LABEL: load_1d_lwe:
194 ; GFX10: ; %bb.0: ; %main_body
195 ; GFX10-NEXT: v_mov_b32_e32 v6, 0 ; encoding: [0x80,0x02,0x0c,0x7e]
196 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
197 ; GFX10-NEXT: v_mov_b32_e32 v7, v6 ; encoding: [0x06,0x03,0x0e,0x7e]
198 ; GFX10-NEXT: v_mov_b32_e32 v8, v6 ; encoding: [0x06,0x03,0x10,0x7e]
199 ; GFX10-NEXT: v_mov_b32_e32 v9, v6 ; encoding: [0x06,0x03,0x12,0x7e]
200 ; GFX10-NEXT: v_mov_b32_e32 v10, v6 ; encoding: [0x06,0x03,0x14,0x7e]
201 ; GFX10-NEXT: v_mov_b32_e32 v0, v6 ; encoding: [0x06,0x03,0x00,0x7e]
202 ; GFX10-NEXT: v_mov_b32_e32 v1, v7 ; encoding: [0x07,0x03,0x02,0x7e]
203 ; GFX10-NEXT: v_mov_b32_e32 v2, v8 ; encoding: [0x08,0x03,0x04,0x7e]
204 ; GFX10-NEXT: v_mov_b32_e32 v3, v9 ; encoding: [0x09,0x03,0x06,0x7e]
205 ; GFX10-NEXT: v_mov_b32_e32 v4, v10 ; encoding: [0x0a,0x03,0x08,0x7e]
206 ; GFX10-NEXT: image_load v[0:4], v5, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe ; encoding: [0x00,0x1f,0x02,0xf0,0x05,0x00,0x00,0x00]
207 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
208 ; GFX10-NEXT: global_store_dword v6, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x06,0x04,0x08,0x00]
209 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
210 ; GFX10-NEXT: ; return to shader part epilog
212 %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)
213 %v.vec = extractvalue {<4 x float>, i32} %v, 0
214 %v.err = extractvalue {<4 x float>, i32} %v, 1
215 store i32 %v.err, i32 addrspace(1)* %out, align 4
216 ret <4 x float> %v.vec
219 define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t) {
220 ; VERDE-LABEL: load_2d:
221 ; VERDE: ; %bb.0: ; %main_body
222 ; VERDE-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
223 ; VERDE-NEXT: s_waitcnt vmcnt(0)
224 ; VERDE-NEXT: ; return to shader part epilog
226 ; FIJI-LABEL: load_2d:
227 ; FIJI: ; %bb.0: ; %main_body
228 ; FIJI-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
229 ; FIJI-NEXT: s_waitcnt vmcnt(0)
230 ; FIJI-NEXT: ; return to shader part epilog
232 ; GFX6789-LABEL: load_2d:
233 ; GFX6789: ; %bb.0: ; %main_body
234 ; GFX6789-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
235 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
236 ; GFX6789-NEXT: ; return to shader part epilog
238 ; NOPRT-LABEL: load_2d:
239 ; NOPRT: ; %bb.0: ; %main_body
240 ; NOPRT-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm
241 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
242 ; NOPRT-NEXT: ; return to shader part epilog
244 ; GFX10-LABEL: load_2d:
245 ; GFX10: ; %bb.0: ; %main_body
246 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
247 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
248 ; GFX10-NEXT: ; return to shader part epilog
250 %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)
254 define amdgpu_ps <4 x float> @load_2d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t) {
255 ; VERDE-LABEL: load_2d_tfe:
256 ; VERDE: ; %bb.0: ; %main_body
257 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
258 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
259 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
260 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
261 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
262 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
263 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
264 ; VERDE-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe
265 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
266 ; VERDE-NEXT: s_mov_b32 s10, -1
267 ; VERDE-NEXT: s_waitcnt vmcnt(0)
268 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
269 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
270 ; VERDE-NEXT: ; return to shader part epilog
272 ; FIJI-LABEL: load_2d_tfe:
273 ; FIJI: ; %bb.0: ; %main_body
274 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
275 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
276 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
277 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
278 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
279 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
280 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
281 ; FIJI-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe
282 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
283 ; FIJI-NEXT: s_mov_b32 s10, -1
284 ; FIJI-NEXT: s_waitcnt vmcnt(0)
285 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
286 ; FIJI-NEXT: s_waitcnt vmcnt(0)
287 ; FIJI-NEXT: ; return to shader part epilog
289 ; GFX6789-LABEL: load_2d_tfe:
290 ; GFX6789: ; %bb.0: ; %main_body
291 ; GFX6789-NEXT: v_mov_b32_e32 v7, 0
292 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
293 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
294 ; GFX6789-NEXT: v_mov_b32_e32 v8, v7
295 ; GFX6789-NEXT: v_mov_b32_e32 v9, v7
296 ; GFX6789-NEXT: v_mov_b32_e32 v10, v7
297 ; GFX6789-NEXT: v_mov_b32_e32 v11, v7
298 ; GFX6789-NEXT: v_mov_b32_e32 v0, v7
299 ; GFX6789-NEXT: v_mov_b32_e32 v1, v8
300 ; GFX6789-NEXT: v_mov_b32_e32 v2, v9
301 ; GFX6789-NEXT: v_mov_b32_e32 v3, v10
302 ; GFX6789-NEXT: v_mov_b32_e32 v4, v11
303 ; GFX6789-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe
304 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
305 ; GFX6789-NEXT: global_store_dword v7, v4, s[8:9]
306 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
307 ; GFX6789-NEXT: ; return to shader part epilog
309 ; NOPRT-LABEL: load_2d_tfe:
310 ; NOPRT: ; %bb.0: ; %main_body
311 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
312 ; NOPRT-NEXT: image_load v[0:4], v[0:1], s[0:7] dmask:0xf unorm tfe
313 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
314 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
315 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
316 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
317 ; NOPRT-NEXT: ; return to shader part epilog
319 ; GFX10-LABEL: load_2d_tfe:
320 ; GFX10: ; %bb.0: ; %main_body
321 ; GFX10-NEXT: v_mov_b32_e32 v7, 0 ; encoding: [0x80,0x02,0x0e,0x7e]
322 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
323 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
324 ; GFX10-NEXT: v_mov_b32_e32 v8, v7 ; encoding: [0x07,0x03,0x10,0x7e]
325 ; GFX10-NEXT: v_mov_b32_e32 v9, v7 ; encoding: [0x07,0x03,0x12,0x7e]
326 ; GFX10-NEXT: v_mov_b32_e32 v10, v7 ; encoding: [0x07,0x03,0x14,0x7e]
327 ; GFX10-NEXT: v_mov_b32_e32 v11, v7 ; encoding: [0x07,0x03,0x16,0x7e]
328 ; GFX10-NEXT: v_mov_b32_e32 v0, v7 ; encoding: [0x07,0x03,0x00,0x7e]
329 ; GFX10-NEXT: v_mov_b32_e32 v1, v8 ; encoding: [0x08,0x03,0x02,0x7e]
330 ; GFX10-NEXT: v_mov_b32_e32 v2, v9 ; encoding: [0x09,0x03,0x04,0x7e]
331 ; GFX10-NEXT: v_mov_b32_e32 v3, v10 ; encoding: [0x0a,0x03,0x06,0x7e]
332 ; GFX10-NEXT: v_mov_b32_e32 v4, v11 ; encoding: [0x0b,0x03,0x08,0x7e]
333 ; GFX10-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe ; encoding: [0x08,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00]
334 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
335 ; GFX10-NEXT: global_store_dword v7, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x07,0x04,0x08,0x00]
336 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
337 ; GFX10-NEXT: ; return to shader part epilog
339 %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)
340 %v.vec = extractvalue {<4 x float>, i32} %v, 0
341 %v.err = extractvalue {<4 x float>, i32} %v, 1
342 store i32 %v.err, i32 addrspace(1)* %out, align 4
343 ret <4 x float> %v.vec
346 define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r) {
347 ; VERDE-LABEL: load_3d:
348 ; VERDE: ; %bb.0: ; %main_body
349 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
350 ; VERDE-NEXT: s_waitcnt vmcnt(0)
351 ; VERDE-NEXT: ; return to shader part epilog
353 ; FIJI-LABEL: load_3d:
354 ; FIJI: ; %bb.0: ; %main_body
355 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
356 ; FIJI-NEXT: s_waitcnt vmcnt(0)
357 ; FIJI-NEXT: ; return to shader part epilog
359 ; GFX6789-LABEL: load_3d:
360 ; GFX6789: ; %bb.0: ; %main_body
361 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
362 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
363 ; GFX6789-NEXT: ; return to shader part epilog
365 ; NOPRT-LABEL: load_3d:
366 ; NOPRT: ; %bb.0: ; %main_body
367 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
368 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
369 ; NOPRT-NEXT: ; return to shader part epilog
371 ; GFX10-LABEL: load_3d:
372 ; GFX10: ; %bb.0: ; %main_body
373 ; GFX10-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ; encoding: [0x10,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
374 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
375 ; GFX10-NEXT: ; return to shader part epilog
377 %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)
381 define amdgpu_ps <4 x float> @load_3d_tfe_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %r) {
382 ; VERDE-LABEL: load_3d_tfe_lwe:
383 ; VERDE: ; %bb.0: ; %main_body
384 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
385 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
386 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
387 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
388 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
389 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
390 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
391 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
392 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
393 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
394 ; VERDE-NEXT: s_mov_b32 s10, -1
395 ; VERDE-NEXT: s_waitcnt vmcnt(0)
396 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
397 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
398 ; VERDE-NEXT: ; return to shader part epilog
400 ; FIJI-LABEL: load_3d_tfe_lwe:
401 ; FIJI: ; %bb.0: ; %main_body
402 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
403 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
404 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
405 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
406 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
407 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
408 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
409 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
410 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
411 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
412 ; FIJI-NEXT: s_mov_b32 s10, -1
413 ; FIJI-NEXT: s_waitcnt vmcnt(0)
414 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
415 ; FIJI-NEXT: s_waitcnt vmcnt(0)
416 ; FIJI-NEXT: ; return to shader part epilog
418 ; GFX6789-LABEL: load_3d_tfe_lwe:
419 ; GFX6789: ; %bb.0: ; %main_body
420 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
421 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
422 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
423 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
424 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
425 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
426 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
427 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
428 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
429 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
430 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
431 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
432 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
433 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
434 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
435 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
436 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
437 ; GFX6789-NEXT: ; return to shader part epilog
439 ; NOPRT-LABEL: load_3d_tfe_lwe:
440 ; NOPRT: ; %bb.0: ; %main_body
441 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
442 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm tfe lwe
443 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
444 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
445 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
446 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
447 ; NOPRT-NEXT: ; return to shader part epilog
449 ; GFX10-LABEL: load_3d_tfe_lwe:
450 ; GFX10: ; %bb.0: ; %main_body
451 ; GFX10-NEXT: v_mov_b32_e32 v8, 0 ; encoding: [0x80,0x02,0x10,0x7e]
452 ; GFX10-NEXT: v_mov_b32_e32 v7, v2 ; encoding: [0x02,0x03,0x0e,0x7e]
453 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
454 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
455 ; GFX10-NEXT: v_mov_b32_e32 v9, v8 ; encoding: [0x08,0x03,0x12,0x7e]
456 ; GFX10-NEXT: v_mov_b32_e32 v10, v8 ; encoding: [0x08,0x03,0x14,0x7e]
457 ; GFX10-NEXT: v_mov_b32_e32 v11, v8 ; encoding: [0x08,0x03,0x16,0x7e]
458 ; GFX10-NEXT: v_mov_b32_e32 v12, v8 ; encoding: [0x08,0x03,0x18,0x7e]
459 ; GFX10-NEXT: v_mov_b32_e32 v0, v8 ; encoding: [0x08,0x03,0x00,0x7e]
460 ; GFX10-NEXT: v_mov_b32_e32 v1, v9 ; encoding: [0x09,0x03,0x02,0x7e]
461 ; GFX10-NEXT: v_mov_b32_e32 v2, v10 ; encoding: [0x0a,0x03,0x04,0x7e]
462 ; GFX10-NEXT: v_mov_b32_e32 v3, v11 ; encoding: [0x0b,0x03,0x06,0x7e]
463 ; GFX10-NEXT: v_mov_b32_e32 v4, v12 ; encoding: [0x0c,0x03,0x08,0x7e]
464 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm tfe lwe ; encoding: [0x10,0x1f,0x03,0xf0,0x05,0x00,0x00,0x00]
465 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
466 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x08,0x04,0x08,0x00]
467 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
468 ; GFX10-NEXT: ; return to shader part epilog
470 %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)
471 %v.vec = extractvalue {<4 x float>, i32} %v, 0
472 %v.err = extractvalue {<4 x float>, i32} %v, 1
473 store i32 %v.err, i32 addrspace(1)* %out, align 4
474 ret <4 x float> %v.vec
477 define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
478 ; VERDE-LABEL: load_cube:
479 ; VERDE: ; %bb.0: ; %main_body
480 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
481 ; VERDE-NEXT: s_waitcnt vmcnt(0)
482 ; VERDE-NEXT: ; return to shader part epilog
484 ; FIJI-LABEL: load_cube:
485 ; FIJI: ; %bb.0: ; %main_body
486 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
487 ; FIJI-NEXT: s_waitcnt vmcnt(0)
488 ; FIJI-NEXT: ; return to shader part epilog
490 ; GFX6789-LABEL: load_cube:
491 ; GFX6789: ; %bb.0: ; %main_body
492 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
493 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
494 ; GFX6789-NEXT: ; return to shader part epilog
496 ; NOPRT-LABEL: load_cube:
497 ; NOPRT: ; %bb.0: ; %main_body
498 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
499 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
500 ; NOPRT-NEXT: ; return to shader part epilog
502 ; GFX10-LABEL: load_cube:
503 ; GFX10: ; %bb.0: ; %main_body
504 ; GFX10-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ; encoding: [0x18,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
505 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
506 ; GFX10-NEXT: ; return to shader part epilog
508 %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)
512 define amdgpu_ps <4 x float> @load_cube_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice) {
513 ; VERDE-LABEL: load_cube_lwe:
514 ; VERDE: ; %bb.0: ; %main_body
515 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
516 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
517 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
518 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
519 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
520 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
521 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
522 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
523 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
524 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
525 ; VERDE-NEXT: s_mov_b32 s10, -1
526 ; VERDE-NEXT: s_waitcnt vmcnt(0)
527 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
528 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
529 ; VERDE-NEXT: ; return to shader part epilog
531 ; FIJI-LABEL: load_cube_lwe:
532 ; FIJI: ; %bb.0: ; %main_body
533 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
534 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
535 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
536 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
537 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
538 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
539 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
540 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
541 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
542 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
543 ; FIJI-NEXT: s_mov_b32 s10, -1
544 ; FIJI-NEXT: s_waitcnt vmcnt(0)
545 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
546 ; FIJI-NEXT: s_waitcnt vmcnt(0)
547 ; FIJI-NEXT: ; return to shader part epilog
549 ; GFX6789-LABEL: load_cube_lwe:
550 ; GFX6789: ; %bb.0: ; %main_body
551 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
552 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
553 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
554 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
555 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
556 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
557 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
558 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
559 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
560 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
561 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
562 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
563 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
564 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
565 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
566 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
567 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
568 ; GFX6789-NEXT: ; return to shader part epilog
570 ; NOPRT-LABEL: load_cube_lwe:
571 ; NOPRT: ; %bb.0: ; %main_body
572 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
573 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm lwe da
574 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
575 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
576 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
577 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
578 ; NOPRT-NEXT: ; return to shader part epilog
580 ; GFX10-LABEL: load_cube_lwe:
581 ; GFX10: ; %bb.0: ; %main_body
582 ; GFX10-NEXT: v_mov_b32_e32 v8, 0 ; encoding: [0x80,0x02,0x10,0x7e]
583 ; GFX10-NEXT: v_mov_b32_e32 v7, v2 ; encoding: [0x02,0x03,0x0e,0x7e]
584 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
585 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
586 ; GFX10-NEXT: v_mov_b32_e32 v9, v8 ; encoding: [0x08,0x03,0x12,0x7e]
587 ; GFX10-NEXT: v_mov_b32_e32 v10, v8 ; encoding: [0x08,0x03,0x14,0x7e]
588 ; GFX10-NEXT: v_mov_b32_e32 v11, v8 ; encoding: [0x08,0x03,0x16,0x7e]
589 ; GFX10-NEXT: v_mov_b32_e32 v12, v8 ; encoding: [0x08,0x03,0x18,0x7e]
590 ; GFX10-NEXT: v_mov_b32_e32 v0, v8 ; encoding: [0x08,0x03,0x00,0x7e]
591 ; GFX10-NEXT: v_mov_b32_e32 v1, v9 ; encoding: [0x09,0x03,0x02,0x7e]
592 ; GFX10-NEXT: v_mov_b32_e32 v2, v10 ; encoding: [0x0a,0x03,0x04,0x7e]
593 ; GFX10-NEXT: v_mov_b32_e32 v3, v11 ; encoding: [0x0b,0x03,0x06,0x7e]
594 ; GFX10-NEXT: v_mov_b32_e32 v4, v12 ; encoding: [0x0c,0x03,0x08,0x7e]
595 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm lwe ; encoding: [0x18,0x1f,0x02,0xf0,0x05,0x00,0x00,0x00]
596 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
597 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x08,0x04,0x08,0x00]
598 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
599 ; GFX10-NEXT: ; return to shader part epilog
601 %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)
602 %v.vec = extractvalue {<4 x float>, i32} %v, 0
603 %v.err = extractvalue {<4 x float>, i32} %v, 1
604 store i32 %v.err, i32 addrspace(1)* %out, align 4
605 ret <4 x float> %v.vec
608 define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice) {
609 ; VERDE-LABEL: load_1darray:
610 ; VERDE: ; %bb.0: ; %main_body
611 ; VERDE-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
612 ; VERDE-NEXT: s_waitcnt vmcnt(0)
613 ; VERDE-NEXT: ; return to shader part epilog
615 ; FIJI-LABEL: load_1darray:
616 ; FIJI: ; %bb.0: ; %main_body
617 ; FIJI-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
618 ; FIJI-NEXT: s_waitcnt vmcnt(0)
619 ; FIJI-NEXT: ; return to shader part epilog
621 ; GFX6789-LABEL: load_1darray:
622 ; GFX6789: ; %bb.0: ; %main_body
623 ; GFX6789-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
624 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
625 ; GFX6789-NEXT: ; return to shader part epilog
627 ; NOPRT-LABEL: load_1darray:
628 ; NOPRT: ; %bb.0: ; %main_body
629 ; NOPRT-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da
630 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
631 ; NOPRT-NEXT: ; return to shader part epilog
633 ; GFX10-LABEL: load_1darray:
634 ; GFX10: ; %bb.0: ; %main_body
635 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ; encoding: [0x20,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
636 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
637 ; GFX10-NEXT: ; return to shader part epilog
639 %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)
643 define amdgpu_ps <4 x float> @load_1darray_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %slice) {
644 ; VERDE-LABEL: load_1darray_tfe:
645 ; VERDE: ; %bb.0: ; %main_body
646 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
647 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
648 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
649 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
650 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
651 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
652 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
653 ; VERDE-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe da
654 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
655 ; VERDE-NEXT: s_mov_b32 s10, -1
656 ; VERDE-NEXT: s_waitcnt vmcnt(0)
657 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
658 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
659 ; VERDE-NEXT: ; return to shader part epilog
661 ; FIJI-LABEL: load_1darray_tfe:
662 ; FIJI: ; %bb.0: ; %main_body
663 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
664 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
665 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
666 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
667 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
668 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
669 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
670 ; FIJI-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe da
671 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
672 ; FIJI-NEXT: s_mov_b32 s10, -1
673 ; FIJI-NEXT: s_waitcnt vmcnt(0)
674 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
675 ; FIJI-NEXT: s_waitcnt vmcnt(0)
676 ; FIJI-NEXT: ; return to shader part epilog
678 ; GFX6789-LABEL: load_1darray_tfe:
679 ; GFX6789: ; %bb.0: ; %main_body
680 ; GFX6789-NEXT: v_mov_b32_e32 v7, 0
681 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
682 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
683 ; GFX6789-NEXT: v_mov_b32_e32 v8, v7
684 ; GFX6789-NEXT: v_mov_b32_e32 v9, v7
685 ; GFX6789-NEXT: v_mov_b32_e32 v10, v7
686 ; GFX6789-NEXT: v_mov_b32_e32 v11, v7
687 ; GFX6789-NEXT: v_mov_b32_e32 v0, v7
688 ; GFX6789-NEXT: v_mov_b32_e32 v1, v8
689 ; GFX6789-NEXT: v_mov_b32_e32 v2, v9
690 ; GFX6789-NEXT: v_mov_b32_e32 v3, v10
691 ; GFX6789-NEXT: v_mov_b32_e32 v4, v11
692 ; GFX6789-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf unorm tfe da
693 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
694 ; GFX6789-NEXT: global_store_dword v7, v4, s[8:9]
695 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
696 ; GFX6789-NEXT: ; return to shader part epilog
698 ; NOPRT-LABEL: load_1darray_tfe:
699 ; NOPRT: ; %bb.0: ; %main_body
700 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
701 ; NOPRT-NEXT: image_load v[0:4], v[0:1], s[0:7] dmask:0xf unorm tfe da
702 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
703 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
704 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
705 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
706 ; NOPRT-NEXT: ; return to shader part epilog
708 ; GFX10-LABEL: load_1darray_tfe:
709 ; GFX10: ; %bb.0: ; %main_body
710 ; GFX10-NEXT: v_mov_b32_e32 v7, 0 ; encoding: [0x80,0x02,0x0e,0x7e]
711 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
712 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
713 ; GFX10-NEXT: v_mov_b32_e32 v8, v7 ; encoding: [0x07,0x03,0x10,0x7e]
714 ; GFX10-NEXT: v_mov_b32_e32 v9, v7 ; encoding: [0x07,0x03,0x12,0x7e]
715 ; GFX10-NEXT: v_mov_b32_e32 v10, v7 ; encoding: [0x07,0x03,0x14,0x7e]
716 ; GFX10-NEXT: v_mov_b32_e32 v11, v7 ; encoding: [0x07,0x03,0x16,0x7e]
717 ; GFX10-NEXT: v_mov_b32_e32 v0, v7 ; encoding: [0x07,0x03,0x00,0x7e]
718 ; GFX10-NEXT: v_mov_b32_e32 v1, v8 ; encoding: [0x08,0x03,0x02,0x7e]
719 ; GFX10-NEXT: v_mov_b32_e32 v2, v9 ; encoding: [0x09,0x03,0x04,0x7e]
720 ; GFX10-NEXT: v_mov_b32_e32 v3, v10 ; encoding: [0x0a,0x03,0x06,0x7e]
721 ; GFX10-NEXT: v_mov_b32_e32 v4, v11 ; encoding: [0x0b,0x03,0x08,0x7e]
722 ; GFX10-NEXT: image_load v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm tfe ; encoding: [0x20,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00]
723 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
724 ; GFX10-NEXT: global_store_dword v7, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x07,0x04,0x08,0x00]
725 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
726 ; GFX10-NEXT: ; return to shader part epilog
728 %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)
729 %v.vec = extractvalue {<4 x float>, i32} %v, 0
730 %v.err = extractvalue {<4 x float>, i32} %v, 1
731 store i32 %v.err, i32 addrspace(1)* %out, align 4
732 ret <4 x float> %v.vec
735 define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
736 ; VERDE-LABEL: load_2darray:
737 ; VERDE: ; %bb.0: ; %main_body
738 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
739 ; VERDE-NEXT: s_waitcnt vmcnt(0)
740 ; VERDE-NEXT: ; return to shader part epilog
742 ; FIJI-LABEL: load_2darray:
743 ; FIJI: ; %bb.0: ; %main_body
744 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
745 ; FIJI-NEXT: s_waitcnt vmcnt(0)
746 ; FIJI-NEXT: ; return to shader part epilog
748 ; GFX6789-LABEL: load_2darray:
749 ; GFX6789: ; %bb.0: ; %main_body
750 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
751 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
752 ; GFX6789-NEXT: ; return to shader part epilog
754 ; NOPRT-LABEL: load_2darray:
755 ; NOPRT: ; %bb.0: ; %main_body
756 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
757 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
758 ; NOPRT-NEXT: ; return to shader part epilog
760 ; GFX10-LABEL: load_2darray:
761 ; GFX10: ; %bb.0: ; %main_body
762 ; GFX10-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ; encoding: [0x28,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
763 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
764 ; GFX10-NEXT: ; return to shader part epilog
766 %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)
770 define amdgpu_ps <4 x float> @load_2darray_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice) {
771 ; VERDE-LABEL: load_2darray_lwe:
772 ; VERDE: ; %bb.0: ; %main_body
773 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
774 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
775 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
776 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
777 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
778 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
779 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
780 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
781 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
782 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
783 ; VERDE-NEXT: s_mov_b32 s10, -1
784 ; VERDE-NEXT: s_waitcnt vmcnt(0)
785 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
786 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
787 ; VERDE-NEXT: ; return to shader part epilog
789 ; FIJI-LABEL: load_2darray_lwe:
790 ; FIJI: ; %bb.0: ; %main_body
791 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
792 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
793 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
794 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
795 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
796 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
797 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
798 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
799 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
800 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
801 ; FIJI-NEXT: s_mov_b32 s10, -1
802 ; FIJI-NEXT: s_waitcnt vmcnt(0)
803 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
804 ; FIJI-NEXT: s_waitcnt vmcnt(0)
805 ; FIJI-NEXT: ; return to shader part epilog
807 ; GFX6789-LABEL: load_2darray_lwe:
808 ; GFX6789: ; %bb.0: ; %main_body
809 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
810 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
811 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
812 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
813 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
814 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
815 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
816 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
817 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
818 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
819 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
820 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
821 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
822 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm lwe da
823 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
824 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
825 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
826 ; GFX6789-NEXT: ; return to shader part epilog
828 ; NOPRT-LABEL: load_2darray_lwe:
829 ; NOPRT: ; %bb.0: ; %main_body
830 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
831 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm lwe da
832 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
833 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
834 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
835 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
836 ; NOPRT-NEXT: ; return to shader part epilog
838 ; GFX10-LABEL: load_2darray_lwe:
839 ; GFX10: ; %bb.0: ; %main_body
840 ; GFX10-NEXT: v_mov_b32_e32 v8, 0 ; encoding: [0x80,0x02,0x10,0x7e]
841 ; GFX10-NEXT: v_mov_b32_e32 v7, v2 ; encoding: [0x02,0x03,0x0e,0x7e]
842 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
843 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
844 ; GFX10-NEXT: v_mov_b32_e32 v9, v8 ; encoding: [0x08,0x03,0x12,0x7e]
845 ; GFX10-NEXT: v_mov_b32_e32 v10, v8 ; encoding: [0x08,0x03,0x14,0x7e]
846 ; GFX10-NEXT: v_mov_b32_e32 v11, v8 ; encoding: [0x08,0x03,0x16,0x7e]
847 ; GFX10-NEXT: v_mov_b32_e32 v12, v8 ; encoding: [0x08,0x03,0x18,0x7e]
848 ; GFX10-NEXT: v_mov_b32_e32 v0, v8 ; encoding: [0x08,0x03,0x00,0x7e]
849 ; GFX10-NEXT: v_mov_b32_e32 v1, v9 ; encoding: [0x09,0x03,0x02,0x7e]
850 ; GFX10-NEXT: v_mov_b32_e32 v2, v10 ; encoding: [0x0a,0x03,0x04,0x7e]
851 ; GFX10-NEXT: v_mov_b32_e32 v3, v11 ; encoding: [0x0b,0x03,0x06,0x7e]
852 ; GFX10-NEXT: v_mov_b32_e32 v4, v12 ; encoding: [0x0c,0x03,0x08,0x7e]
853 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm lwe ; encoding: [0x28,0x1f,0x02,0xf0,0x05,0x00,0x00,0x00]
854 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
855 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x08,0x04,0x08,0x00]
856 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
857 ; GFX10-NEXT: ; return to shader part epilog
859 %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)
860 %v.vec = extractvalue {<4 x float>, i32} %v, 0
861 %v.err = extractvalue {<4 x float>, i32} %v, 1
862 store i32 %v.err, i32 addrspace(1)* %out, align 4
863 ret <4 x float> %v.vec
866 define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %fragid) {
867 ; VERDE-LABEL: load_2dmsaa:
868 ; VERDE: ; %bb.0: ; %main_body
869 ; VERDE-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
870 ; VERDE-NEXT: s_waitcnt vmcnt(0)
871 ; VERDE-NEXT: ; return to shader part epilog
873 ; FIJI-LABEL: load_2dmsaa:
874 ; FIJI: ; %bb.0: ; %main_body
875 ; FIJI-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
876 ; FIJI-NEXT: s_waitcnt vmcnt(0)
877 ; FIJI-NEXT: ; return to shader part epilog
879 ; GFX6789-LABEL: load_2dmsaa:
880 ; GFX6789: ; %bb.0: ; %main_body
881 ; GFX6789-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
882 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
883 ; GFX6789-NEXT: ; return to shader part epilog
885 ; NOPRT-LABEL: load_2dmsaa:
886 ; NOPRT: ; %bb.0: ; %main_body
887 ; NOPRT-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf unorm
888 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
889 ; NOPRT-NEXT: ; return to shader part epilog
891 ; GFX10-LABEL: load_2dmsaa:
892 ; GFX10: ; %bb.0: ; %main_body
893 ; GFX10-NEXT: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm ; encoding: [0x30,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
894 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
895 ; GFX10-NEXT: ; return to shader part epilog
897 %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)
901 define amdgpu_ps <4 x float> @load_2dmsaa_both(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %fragid) {
902 ; VERDE-LABEL: load_2dmsaa_both:
903 ; VERDE: ; %bb.0: ; %main_body
904 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
905 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
906 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
907 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
908 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
909 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
910 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
911 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
912 ; VERDE-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
913 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
914 ; VERDE-NEXT: s_mov_b32 s10, -1
915 ; VERDE-NEXT: s_waitcnt vmcnt(0)
916 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
917 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
918 ; VERDE-NEXT: ; return to shader part epilog
920 ; FIJI-LABEL: load_2dmsaa_both:
921 ; FIJI: ; %bb.0: ; %main_body
922 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
923 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
924 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
925 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
926 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
927 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
928 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
929 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
930 ; FIJI-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
931 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
932 ; FIJI-NEXT: s_mov_b32 s10, -1
933 ; FIJI-NEXT: s_waitcnt vmcnt(0)
934 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
935 ; FIJI-NEXT: s_waitcnt vmcnt(0)
936 ; FIJI-NEXT: ; return to shader part epilog
938 ; GFX6789-LABEL: load_2dmsaa_both:
939 ; GFX6789: ; %bb.0: ; %main_body
940 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
941 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
942 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
943 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
944 ; GFX6789-NEXT: v_mov_b32_e32 v9, v8
945 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
946 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
947 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
948 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
949 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
950 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
951 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
952 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
953 ; GFX6789-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe lwe
954 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
955 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
956 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
957 ; GFX6789-NEXT: ; return to shader part epilog
959 ; NOPRT-LABEL: load_2dmsaa_both:
960 ; NOPRT: ; %bb.0: ; %main_body
961 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
962 ; NOPRT-NEXT: image_load v[0:4], v[0:2], s[0:7] dmask:0xf unorm tfe lwe
963 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
964 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
965 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
966 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
967 ; NOPRT-NEXT: ; return to shader part epilog
969 ; GFX10-LABEL: load_2dmsaa_both:
970 ; GFX10: ; %bb.0: ; %main_body
971 ; GFX10-NEXT: v_mov_b32_e32 v8, 0 ; encoding: [0x80,0x02,0x10,0x7e]
972 ; GFX10-NEXT: v_mov_b32_e32 v7, v2 ; encoding: [0x02,0x03,0x0e,0x7e]
973 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
974 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
975 ; GFX10-NEXT: v_mov_b32_e32 v9, v8 ; encoding: [0x08,0x03,0x12,0x7e]
976 ; GFX10-NEXT: v_mov_b32_e32 v10, v8 ; encoding: [0x08,0x03,0x14,0x7e]
977 ; GFX10-NEXT: v_mov_b32_e32 v11, v8 ; encoding: [0x08,0x03,0x16,0x7e]
978 ; GFX10-NEXT: v_mov_b32_e32 v12, v8 ; encoding: [0x08,0x03,0x18,0x7e]
979 ; GFX10-NEXT: v_mov_b32_e32 v0, v8 ; encoding: [0x08,0x03,0x00,0x7e]
980 ; GFX10-NEXT: v_mov_b32_e32 v1, v9 ; encoding: [0x09,0x03,0x02,0x7e]
981 ; GFX10-NEXT: v_mov_b32_e32 v2, v10 ; encoding: [0x0a,0x03,0x04,0x7e]
982 ; GFX10-NEXT: v_mov_b32_e32 v3, v11 ; encoding: [0x0b,0x03,0x06,0x7e]
983 ; GFX10-NEXT: v_mov_b32_e32 v4, v12 ; encoding: [0x0c,0x03,0x08,0x7e]
984 ; GFX10-NEXT: image_load v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm tfe lwe ; encoding: [0x30,0x1f,0x03,0xf0,0x05,0x00,0x00,0x00]
985 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
986 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x08,0x04,0x08,0x00]
987 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
988 ; GFX10-NEXT: ; return to shader part epilog
990 %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)
991 %v.vec = extractvalue {<4 x float>, i32} %v, 0
992 %v.err = extractvalue {<4 x float>, i32} %v, 1
993 store i32 %v.err, i32 addrspace(1)* %out, align 4
994 ret <4 x float> %v.vec
997 define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
998 ; VERDE-LABEL: load_2darraymsaa:
999 ; VERDE: ; %bb.0: ; %main_body
1000 ; VERDE-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1001 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1002 ; VERDE-NEXT: ; return to shader part epilog
1004 ; FIJI-LABEL: load_2darraymsaa:
1005 ; FIJI: ; %bb.0: ; %main_body
1006 ; FIJI-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1007 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1008 ; FIJI-NEXT: ; return to shader part epilog
1010 ; GFX6789-LABEL: load_2darraymsaa:
1011 ; GFX6789: ; %bb.0: ; %main_body
1012 ; GFX6789-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1013 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1014 ; GFX6789-NEXT: ; return to shader part epilog
1016 ; NOPRT-LABEL: load_2darraymsaa:
1017 ; NOPRT: ; %bb.0: ; %main_body
1018 ; NOPRT-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
1019 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1020 ; NOPRT-NEXT: ; return to shader part epilog
1022 ; GFX10-LABEL: load_2darraymsaa:
1023 ; GFX10: ; %bb.0: ; %main_body
1024 ; GFX10-NEXT: image_load v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm ; encoding: [0x38,0x1f,0x00,0xf0,0x00,0x00,0x00,0x00]
1025 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1026 ; GFX10-NEXT: ; return to shader part epilog
1028 %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)
1032 define amdgpu_ps <4 x float> @load_2darraymsaa_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
1033 ; VERDE-LABEL: load_2darraymsaa_tfe:
1034 ; VERDE: ; %bb.0: ; %main_body
1035 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1036 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1037 ; VERDE-NEXT: v_mov_b32_e32 v8, v3
1038 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
1039 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1040 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1041 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1042 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1043 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1044 ; VERDE-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf unorm tfe da
1045 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1046 ; VERDE-NEXT: s_mov_b32 s10, -1
1047 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1048 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1049 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1050 ; VERDE-NEXT: ; return to shader part epilog
1052 ; FIJI-LABEL: load_2darraymsaa_tfe:
1053 ; FIJI: ; %bb.0: ; %main_body
1054 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1055 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1056 ; FIJI-NEXT: v_mov_b32_e32 v8, v3
1057 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
1058 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1059 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1060 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1061 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1062 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1063 ; FIJI-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf unorm tfe da
1064 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1065 ; FIJI-NEXT: s_mov_b32 s10, -1
1066 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1067 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1068 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1069 ; FIJI-NEXT: ; return to shader part epilog
1071 ; GFX6789-LABEL: load_2darraymsaa_tfe:
1072 ; GFX6789: ; %bb.0: ; %main_body
1073 ; GFX6789-NEXT: v_mov_b32_e32 v9, 0
1074 ; GFX6789-NEXT: v_mov_b32_e32 v8, v3
1075 ; GFX6789-NEXT: v_mov_b32_e32 v7, v2
1076 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1077 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1078 ; GFX6789-NEXT: v_mov_b32_e32 v10, v9
1079 ; GFX6789-NEXT: v_mov_b32_e32 v11, v9
1080 ; GFX6789-NEXT: v_mov_b32_e32 v12, v9
1081 ; GFX6789-NEXT: v_mov_b32_e32 v13, v9
1082 ; GFX6789-NEXT: v_mov_b32_e32 v0, v9
1083 ; GFX6789-NEXT: v_mov_b32_e32 v1, v10
1084 ; GFX6789-NEXT: v_mov_b32_e32 v2, v11
1085 ; GFX6789-NEXT: v_mov_b32_e32 v3, v12
1086 ; GFX6789-NEXT: v_mov_b32_e32 v4, v13
1087 ; GFX6789-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf unorm tfe da
1088 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1089 ; GFX6789-NEXT: global_store_dword v9, v4, s[8:9]
1090 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1091 ; GFX6789-NEXT: ; return to shader part epilog
1093 ; NOPRT-LABEL: load_2darraymsaa_tfe:
1094 ; NOPRT: ; %bb.0: ; %main_body
1095 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1096 ; NOPRT-NEXT: image_load v[0:4], v[0:3], s[0:7] dmask:0xf unorm tfe da
1097 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1098 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1099 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1100 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1101 ; NOPRT-NEXT: ; return to shader part epilog
1103 ; GFX10-LABEL: load_2darraymsaa_tfe:
1104 ; GFX10: ; %bb.0: ; %main_body
1105 ; GFX10-NEXT: v_mov_b32_e32 v9, 0 ; encoding: [0x80,0x02,0x12,0x7e]
1106 ; GFX10-NEXT: v_mov_b32_e32 v8, v3 ; encoding: [0x03,0x03,0x10,0x7e]
1107 ; GFX10-NEXT: v_mov_b32_e32 v7, v2 ; encoding: [0x02,0x03,0x0e,0x7e]
1108 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
1109 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
1110 ; GFX10-NEXT: v_mov_b32_e32 v10, v9 ; encoding: [0x09,0x03,0x14,0x7e]
1111 ; GFX10-NEXT: v_mov_b32_e32 v11, v9 ; encoding: [0x09,0x03,0x16,0x7e]
1112 ; GFX10-NEXT: v_mov_b32_e32 v12, v9 ; encoding: [0x09,0x03,0x18,0x7e]
1113 ; GFX10-NEXT: v_mov_b32_e32 v13, v9 ; encoding: [0x09,0x03,0x1a,0x7e]
1114 ; GFX10-NEXT: v_mov_b32_e32 v0, v9 ; encoding: [0x09,0x03,0x00,0x7e]
1115 ; GFX10-NEXT: v_mov_b32_e32 v1, v10 ; encoding: [0x0a,0x03,0x02,0x7e]
1116 ; GFX10-NEXT: v_mov_b32_e32 v2, v11 ; encoding: [0x0b,0x03,0x04,0x7e]
1117 ; GFX10-NEXT: v_mov_b32_e32 v3, v12 ; encoding: [0x0c,0x03,0x06,0x7e]
1118 ; GFX10-NEXT: v_mov_b32_e32 v4, v13 ; encoding: [0x0d,0x03,0x08,0x7e]
1119 ; GFX10-NEXT: image_load v[0:4], v[5:8], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm tfe ; encoding: [0x38,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00]
1120 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1121 ; GFX10-NEXT: global_store_dword v9, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x09,0x04,0x08,0x00]
1122 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1123 ; GFX10-NEXT: ; return to shader part epilog
1125 %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)
1126 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1127 %v.err = extractvalue {<4 x float>, i32} %v, 1
1128 store i32 %v.err, i32 addrspace(1)* %out, align 4
1129 ret <4 x float> %v.vec
1132 define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, i32 %s, i32 %mip) {
1133 ; VERDE-LABEL: load_mip_1d:
1134 ; VERDE: ; %bb.0: ; %main_body
1135 ; VERDE-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1136 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1137 ; VERDE-NEXT: ; return to shader part epilog
1139 ; FIJI-LABEL: load_mip_1d:
1140 ; FIJI: ; %bb.0: ; %main_body
1141 ; FIJI-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1142 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1143 ; FIJI-NEXT: ; return to shader part epilog
1145 ; GFX6789-LABEL: load_mip_1d:
1146 ; GFX6789: ; %bb.0: ; %main_body
1147 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1148 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1149 ; GFX6789-NEXT: ; return to shader part epilog
1151 ; NOPRT-LABEL: load_mip_1d:
1152 ; NOPRT: ; %bb.0: ; %main_body
1153 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm
1154 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1155 ; NOPRT-NEXT: ; return to shader part epilog
1157 ; GFX10-LABEL: load_mip_1d:
1158 ; GFX10: ; %bb.0: ; %main_body
1159 ; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x04,0xf0,0x00,0x00,0x00,0x00]
1160 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1161 ; GFX10-NEXT: ; return to shader part epilog
1163 %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)
1167 define amdgpu_ps <4 x float> @load_mip_1d_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %mip) {
1168 ; VERDE-LABEL: load_mip_1d_lwe:
1169 ; VERDE: ; %bb.0: ; %main_body
1170 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1171 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1172 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1173 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1174 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1175 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1176 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1177 ; VERDE-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf unorm lwe
1178 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1179 ; VERDE-NEXT: s_mov_b32 s10, -1
1180 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1181 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1182 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1183 ; VERDE-NEXT: ; return to shader part epilog
1185 ; FIJI-LABEL: load_mip_1d_lwe:
1186 ; FIJI: ; %bb.0: ; %main_body
1187 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1188 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1189 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1190 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1191 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1192 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1193 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1194 ; FIJI-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf unorm lwe
1195 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1196 ; FIJI-NEXT: s_mov_b32 s10, -1
1197 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1198 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1199 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1200 ; FIJI-NEXT: ; return to shader part epilog
1202 ; GFX6789-LABEL: load_mip_1d_lwe:
1203 ; GFX6789: ; %bb.0: ; %main_body
1204 ; GFX6789-NEXT: v_mov_b32_e32 v7, 0
1205 ; GFX6789-NEXT: v_mov_b32_e32 v6, v1
1206 ; GFX6789-NEXT: v_mov_b32_e32 v5, v0
1207 ; GFX6789-NEXT: v_mov_b32_e32 v8, v7
1208 ; GFX6789-NEXT: v_mov_b32_e32 v9, v7
1209 ; GFX6789-NEXT: v_mov_b32_e32 v10, v7
1210 ; GFX6789-NEXT: v_mov_b32_e32 v11, v7
1211 ; GFX6789-NEXT: v_mov_b32_e32 v0, v7
1212 ; GFX6789-NEXT: v_mov_b32_e32 v1, v8
1213 ; GFX6789-NEXT: v_mov_b32_e32 v2, v9
1214 ; GFX6789-NEXT: v_mov_b32_e32 v3, v10
1215 ; GFX6789-NEXT: v_mov_b32_e32 v4, v11
1216 ; GFX6789-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf unorm lwe
1217 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1218 ; GFX6789-NEXT: global_store_dword v7, v4, s[8:9]
1219 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1220 ; GFX6789-NEXT: ; return to shader part epilog
1222 ; NOPRT-LABEL: load_mip_1d_lwe:
1223 ; NOPRT: ; %bb.0: ; %main_body
1224 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1225 ; NOPRT-NEXT: image_load_mip v[0:4], v[0:1], s[0:7] dmask:0xf unorm lwe
1226 ; NOPRT-NEXT: v_mov_b32_e32 v5, 0
1227 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1228 ; NOPRT-NEXT: global_store_dword v5, v4, s[8:9]
1229 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1230 ; NOPRT-NEXT: ; return to shader part epilog
1232 ; GFX10-LABEL: load_mip_1d_lwe:
1233 ; GFX10: ; %bb.0: ; %main_body
1234 ; GFX10-NEXT: v_mov_b32_e32 v7, 0 ; encoding: [0x80,0x02,0x0e,0x7e]
1235 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
1236 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
1237 ; GFX10-NEXT: v_mov_b32_e32 v8, v7 ; encoding: [0x07,0x03,0x10,0x7e]
1238 ; GFX10-NEXT: v_mov_b32_e32 v9, v7 ; encoding: [0x07,0x03,0x12,0x7e]
1239 ; GFX10-NEXT: v_mov_b32_e32 v10, v7 ; encoding: [0x07,0x03,0x14,0x7e]
1240 ; GFX10-NEXT: v_mov_b32_e32 v11, v7 ; encoding: [0x07,0x03,0x16,0x7e]
1241 ; GFX10-NEXT: v_mov_b32_e32 v0, v7 ; encoding: [0x07,0x03,0x00,0x7e]
1242 ; GFX10-NEXT: v_mov_b32_e32 v1, v8 ; encoding: [0x08,0x03,0x02,0x7e]
1243 ; GFX10-NEXT: v_mov_b32_e32 v2, v9 ; encoding: [0x09,0x03,0x04,0x7e]
1244 ; GFX10-NEXT: v_mov_b32_e32 v3, v10 ; encoding: [0x0a,0x03,0x06,0x7e]
1245 ; GFX10-NEXT: v_mov_b32_e32 v4, v11 ; encoding: [0x0b,0x03,0x08,0x7e]
1246 ; GFX10-NEXT: image_load_mip v[0:4], v[5:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe ; encoding: [0x00,0x1f,0x06,0xf0,0x05,0x00,0x00,0x00]
1247 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1248 ; GFX10-NEXT: global_store_dword v7, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x07,0x04,0x08,0x00]
1249 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1250 ; GFX10-NEXT: ; return to shader part epilog
1252 %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)
1253 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1254 %v.err = extractvalue {<4 x float>, i32} %v, 1
1255 store i32 %v.err, i32 addrspace(1)* %out, align 4
1256 ret <4 x float> %v.vec
1259 define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1260 ; VERDE-LABEL: load_mip_2d:
1261 ; VERDE: ; %bb.0: ; %main_body
1262 ; VERDE-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1263 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1264 ; VERDE-NEXT: ; return to shader part epilog
1266 ; FIJI-LABEL: load_mip_2d:
1267 ; FIJI: ; %bb.0: ; %main_body
1268 ; FIJI-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1269 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1270 ; FIJI-NEXT: ; return to shader part epilog
1272 ; GFX6789-LABEL: load_mip_2d:
1273 ; GFX6789: ; %bb.0: ; %main_body
1274 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1275 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1276 ; GFX6789-NEXT: ; return to shader part epilog
1278 ; NOPRT-LABEL: load_mip_2d:
1279 ; NOPRT: ; %bb.0: ; %main_body
1280 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm
1281 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1282 ; NOPRT-NEXT: ; return to shader part epilog
1284 ; GFX10-LABEL: load_mip_2d:
1285 ; GFX10: ; %bb.0: ; %main_body
1286 ; GFX10-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x1f,0x04,0xf0,0x00,0x00,0x00,0x00]
1287 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1288 ; GFX10-NEXT: ; return to shader part epilog
1290 %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)
1294 define amdgpu_ps <4 x float> @load_mip_2d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %mip) {
1295 ; VERDE-LABEL: load_mip_2d_tfe:
1296 ; VERDE: ; %bb.0: ; %main_body
1297 ; VERDE-NEXT: v_mov_b32_e32 v5, v0
1298 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1299 ; VERDE-NEXT: v_mov_b32_e32 v7, v2
1300 ; VERDE-NEXT: v_mov_b32_e32 v6, v1
1301 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1302 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1303 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1304 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1305 ; VERDE-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe
1306 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1307 ; VERDE-NEXT: s_mov_b32 s10, -1
1308 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1309 ; VERDE-NEXT: buffer_store_dword v4, off, s[8:11], 0
1310 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1311 ; VERDE-NEXT: ; return to shader part epilog
1313 ; FIJI-LABEL: load_mip_2d_tfe:
1314 ; FIJI: ; %bb.0: ; %main_body
1315 ; FIJI-NEXT: v_mov_b32_e32 v5, v0
1316 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1317 ; FIJI-NEXT: v_mov_b32_e32 v7, v2
1318 ; FIJI-NEXT: v_mov_b32_e32 v6, v1
1319 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1320 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1321 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1322 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1323 ; FIJI-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe
1324 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1325 ; FIJI-NEXT: s_mov_b32 s10, -1
1326 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1327 ; FIJI-NEXT: buffer_store_dword v4, off, s[8:11], 0
1328 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1329 ; FIJI-NEXT: ; return to shader part epilog
1331 ; GFX6789-LABEL: load_mip_2d_tfe:
1332 ; GFX6789: ; %bb.0: ; %main_body
1333 ; GFX6789-NEXT: v_mov_b32_e32 v8, 0
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 v9, v8
1338 ; GFX6789-NEXT: v_mov_b32_e32 v10, v8
1339 ; GFX6789-NEXT: v_mov_b32_e32 v11, v8
1340 ; GFX6789-NEXT: v_mov_b32_e32 v12, v8
1341 ; GFX6789-NEXT: v_mov_b32_e32 v0, v8
1342 ; GFX6789-NEXT: v_mov_b32_e32 v1, v9
1343 ; GFX6789-NEXT: v_mov_b32_e32 v2, v10
1344 ; GFX6789-NEXT: v_mov_b32_e32 v3, v11
1345 ; GFX6789-NEXT: v_mov_b32_e32 v4, v12
1346 ; GFX6789-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf unorm tfe
1347 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1348 ; GFX6789-NEXT: global_store_dword v8, v4, s[8:9]
1349 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1350 ; GFX6789-NEXT: ; return to shader part epilog
1352 ; NOPRT-LABEL: load_mip_2d_tfe:
1353 ; NOPRT: ; %bb.0: ; %main_body
1354 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1355 ; NOPRT-NEXT: image_load_mip v[0:4], v[0:2], s[0:7] dmask:0xf unorm tfe
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_mip_2d_tfe:
1363 ; GFX10: ; %bb.0: ; %main_body
1364 ; GFX10-NEXT: v_mov_b32_e32 v8, 0 ; encoding: [0x80,0x02,0x10,0x7e]
1365 ; GFX10-NEXT: v_mov_b32_e32 v7, v2 ; encoding: [0x02,0x03,0x0e,0x7e]
1366 ; GFX10-NEXT: v_mov_b32_e32 v6, v1 ; encoding: [0x01,0x03,0x0c,0x7e]
1367 ; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e]
1368 ; GFX10-NEXT: v_mov_b32_e32 v9, v8 ; encoding: [0x08,0x03,0x12,0x7e]
1369 ; GFX10-NEXT: v_mov_b32_e32 v10, v8 ; encoding: [0x08,0x03,0x14,0x7e]
1370 ; GFX10-NEXT: v_mov_b32_e32 v11, v8 ; encoding: [0x08,0x03,0x16,0x7e]
1371 ; GFX10-NEXT: v_mov_b32_e32 v12, v8 ; encoding: [0x08,0x03,0x18,0x7e]
1372 ; GFX10-NEXT: v_mov_b32_e32 v0, v8 ; encoding: [0x08,0x03,0x00,0x7e]
1373 ; GFX10-NEXT: v_mov_b32_e32 v1, v9 ; encoding: [0x09,0x03,0x02,0x7e]
1374 ; GFX10-NEXT: v_mov_b32_e32 v2, v10 ; encoding: [0x0a,0x03,0x04,0x7e]
1375 ; GFX10-NEXT: v_mov_b32_e32 v3, v11 ; encoding: [0x0b,0x03,0x06,0x7e]
1376 ; GFX10-NEXT: v_mov_b32_e32 v4, v12 ; encoding: [0x0c,0x03,0x08,0x7e]
1377 ; GFX10-NEXT: image_load_mip v[0:4], v[5:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe ; encoding: [0x08,0x1f,0x05,0xf0,0x05,0x00,0x00,0x00]
1378 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1379 ; GFX10-NEXT: global_store_dword v8, v4, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x08,0x04,0x08,0x00]
1380 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1381 ; GFX10-NEXT: ; return to shader part epilog
1383 %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)
1384 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1385 %v.err = extractvalue {<4 x float>, i32} %v, 1
1386 store i32 %v.err, i32 addrspace(1)* %out, align 4
1387 ret <4 x float> %v.vec
1390 define amdgpu_ps float @load_1d_V2_tfe_dmask0(<8 x i32> inreg %rsrc, i32 %s) {
1391 ; VERDE-LABEL: load_1d_V2_tfe_dmask0:
1392 ; VERDE: ; %bb.0: ; %main_body
1393 ; VERDE-NEXT: v_mov_b32_e32 v1, 0
1394 ; VERDE-NEXT: v_mov_b32_e32 v2, v1
1395 ; VERDE-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1396 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1397 ; VERDE-NEXT: v_mov_b32_e32 v0, v2
1398 ; VERDE-NEXT: ; return to shader part epilog
1400 ; FIJI-LABEL: load_1d_V2_tfe_dmask0:
1401 ; FIJI: ; %bb.0: ; %main_body
1402 ; FIJI-NEXT: v_mov_b32_e32 v1, 0
1403 ; FIJI-NEXT: v_mov_b32_e32 v2, v1
1404 ; FIJI-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1405 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1406 ; FIJI-NEXT: v_mov_b32_e32 v0, v2
1407 ; FIJI-NEXT: ; return to shader part epilog
1409 ; GFX6789-LABEL: load_1d_V2_tfe_dmask0:
1410 ; GFX6789: ; %bb.0: ; %main_body
1411 ; GFX6789-NEXT: v_mov_b32_e32 v1, 0
1412 ; GFX6789-NEXT: v_mov_b32_e32 v2, v1
1413 ; GFX6789-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1414 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1415 ; GFX6789-NEXT: v_mov_b32_e32 v0, v2
1416 ; GFX6789-NEXT: ; return to shader part epilog
1418 ; NOPRT-LABEL: load_1d_V2_tfe_dmask0:
1419 ; NOPRT: ; %bb.0: ; %main_body
1420 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
1421 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x1 unorm tfe
1422 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1423 ; NOPRT-NEXT: v_mov_b32_e32 v0, v1
1424 ; NOPRT-NEXT: ; return to shader part epilog
1426 ; GFX10-LABEL: load_1d_V2_tfe_dmask0:
1427 ; GFX10: ; %bb.0: ; %main_body
1428 ; GFX10-NEXT: v_mov_b32_e32 v1, 0 ; encoding: [0x80,0x02,0x02,0x7e]
1429 ; GFX10-NEXT: v_mov_b32_e32 v2, v1 ; encoding: [0x01,0x03,0x04,0x7e]
1430 ; GFX10-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x11,0x01,0xf0,0x00,0x01,0x00,0x00]
1431 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1432 ; GFX10-NEXT: v_mov_b32_e32 v0, v2 ; encoding: [0x02,0x03,0x00,0x7e]
1433 ; GFX10-NEXT: ; return to shader part epilog
1435 %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)
1436 %v.err = extractvalue {<2 x float>, i32} %v, 1
1437 %vv = bitcast i32 %v.err to float
1441 define amdgpu_ps float @load_1d_V1_tfe_dmask0(<8 x i32> inreg %rsrc, i32 %s) {
1442 ; VERDE-LABEL: load_1d_V1_tfe_dmask0:
1443 ; VERDE: ; %bb.0: ; %main_body
1444 ; VERDE-NEXT: v_mov_b32_e32 v1, 0
1445 ; VERDE-NEXT: v_mov_b32_e32 v2, v1
1446 ; VERDE-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1447 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1448 ; VERDE-NEXT: v_mov_b32_e32 v0, v2
1449 ; VERDE-NEXT: ; return to shader part epilog
1451 ; FIJI-LABEL: load_1d_V1_tfe_dmask0:
1452 ; FIJI: ; %bb.0: ; %main_body
1453 ; FIJI-NEXT: v_mov_b32_e32 v1, 0
1454 ; FIJI-NEXT: v_mov_b32_e32 v2, v1
1455 ; FIJI-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1456 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1457 ; FIJI-NEXT: v_mov_b32_e32 v0, v2
1458 ; FIJI-NEXT: ; return to shader part epilog
1460 ; GFX6789-LABEL: load_1d_V1_tfe_dmask0:
1461 ; GFX6789: ; %bb.0: ; %main_body
1462 ; GFX6789-NEXT: v_mov_b32_e32 v1, 0
1463 ; GFX6789-NEXT: v_mov_b32_e32 v2, v1
1464 ; GFX6789-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 unorm tfe
1465 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1466 ; GFX6789-NEXT: v_mov_b32_e32 v0, v2
1467 ; GFX6789-NEXT: ; return to shader part epilog
1469 ; NOPRT-LABEL: load_1d_V1_tfe_dmask0:
1470 ; NOPRT: ; %bb.0: ; %main_body
1471 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
1472 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x1 unorm tfe
1473 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1474 ; NOPRT-NEXT: v_mov_b32_e32 v0, v1
1475 ; NOPRT-NEXT: ; return to shader part epilog
1477 ; GFX10-LABEL: load_1d_V1_tfe_dmask0:
1478 ; GFX10: ; %bb.0: ; %main_body
1479 ; GFX10-NEXT: v_mov_b32_e32 v1, 0 ; encoding: [0x80,0x02,0x02,0x7e]
1480 ; GFX10-NEXT: v_mov_b32_e32 v2, v1 ; encoding: [0x01,0x03,0x04,0x7e]
1481 ; GFX10-NEXT: image_load v[1:2], v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x11,0x01,0xf0,0x00,0x01,0x00,0x00]
1482 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1483 ; GFX10-NEXT: v_mov_b32_e32 v0, v2 ; encoding: [0x02,0x03,0x00,0x7e]
1484 ; GFX10-NEXT: ; return to shader part epilog
1486 %v = call {float,i32} @llvm.amdgcn.image.load.1d.f32i32.i32(i32 0, i32 %s, <8 x i32> %rsrc, i32 1, i32 0)
1487 %v.err = extractvalue {float, i32} %v, 1
1488 %vv = bitcast i32 %v.err to float
1492 define amdgpu_ps float @load_mip_2d_tfe_dmask0(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1493 ; VERDE-LABEL: load_mip_2d_tfe_dmask0:
1494 ; VERDE: ; %bb.0: ; %main_body
1495 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1496 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1497 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1498 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1499 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1500 ; VERDE-NEXT: ; return to shader part epilog
1502 ; FIJI-LABEL: load_mip_2d_tfe_dmask0:
1503 ; FIJI: ; %bb.0: ; %main_body
1504 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1505 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1506 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1507 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1508 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1509 ; FIJI-NEXT: ; return to shader part epilog
1511 ; GFX6789-LABEL: load_mip_2d_tfe_dmask0:
1512 ; GFX6789: ; %bb.0: ; %main_body
1513 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1514 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1515 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1516 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1517 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1518 ; GFX6789-NEXT: ; return to shader part epilog
1520 ; NOPRT-LABEL: load_mip_2d_tfe_dmask0:
1521 ; NOPRT: ; %bb.0: ; %main_body
1522 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1523 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x1 unorm tfe
1524 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1525 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
1526 ; NOPRT-NEXT: ; return to shader part epilog
1528 ; GFX10-LABEL: load_mip_2d_tfe_dmask0:
1529 ; GFX10: ; %bb.0: ; %main_body
1530 ; GFX10-NEXT: v_mov_b32_e32 v3, 0 ; encoding: [0x80,0x02,0x06,0x7e]
1531 ; GFX10-NEXT: v_mov_b32_e32 v4, v3 ; encoding: [0x03,0x03,0x08,0x7e]
1532 ; GFX10-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe ; encoding: [0x08,0x11,0x05,0xf0,0x00,0x03,0x00,0x00]
1533 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1534 ; GFX10-NEXT: v_mov_b32_e32 v0, v4 ; encoding: [0x04,0x03,0x00,0x7e]
1535 ; GFX10-NEXT: ; return to shader part epilog
1537 %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)
1538 %v.err = extractvalue {<4 x float>, i32} %v, 1
1539 %vv = bitcast i32 %v.err to float
1543 define amdgpu_ps float @load_mip_2d_tfe_nouse(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1544 ; VERDE-LABEL: load_mip_2d_tfe_nouse:
1545 ; VERDE: ; %bb.0: ; %main_body
1546 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1547 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1548 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1549 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1550 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1551 ; VERDE-NEXT: ; return to shader part epilog
1553 ; FIJI-LABEL: load_mip_2d_tfe_nouse:
1554 ; FIJI: ; %bb.0: ; %main_body
1555 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1556 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1557 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1558 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1559 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1560 ; FIJI-NEXT: ; return to shader part epilog
1562 ; GFX6789-LABEL: load_mip_2d_tfe_nouse:
1563 ; GFX6789: ; %bb.0: ; %main_body
1564 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1565 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1566 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1567 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1568 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1569 ; GFX6789-NEXT: ; return to shader part epilog
1571 ; NOPRT-LABEL: load_mip_2d_tfe_nouse:
1572 ; NOPRT: ; %bb.0: ; %main_body
1573 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1574 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x1 unorm tfe
1575 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1576 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
1577 ; NOPRT-NEXT: ; return to shader part epilog
1579 ; GFX10-LABEL: load_mip_2d_tfe_nouse:
1580 ; GFX10: ; %bb.0: ; %main_body
1581 ; GFX10-NEXT: v_mov_b32_e32 v3, 0 ; encoding: [0x80,0x02,0x06,0x7e]
1582 ; GFX10-NEXT: v_mov_b32_e32 v4, v3 ; encoding: [0x03,0x03,0x08,0x7e]
1583 ; GFX10-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe ; encoding: [0x08,0x11,0x05,0xf0,0x00,0x03,0x00,0x00]
1584 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1585 ; GFX10-NEXT: v_mov_b32_e32 v0, v4 ; encoding: [0x04,0x03,0x00,0x7e]
1586 ; GFX10-NEXT: ; return to shader part epilog
1588 %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)
1589 %v.err = extractvalue {<4 x float>, i32} %v, 1
1590 %vv = bitcast i32 %v.err to float
1594 define amdgpu_ps float @load_mip_2d_tfe_nouse_V2(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1595 ; VERDE-LABEL: load_mip_2d_tfe_nouse_V2:
1596 ; VERDE: ; %bb.0: ; %main_body
1597 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1598 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1599 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1600 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1601 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1602 ; VERDE-NEXT: ; return to shader part epilog
1604 ; FIJI-LABEL: load_mip_2d_tfe_nouse_V2:
1605 ; FIJI: ; %bb.0: ; %main_body
1606 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1607 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1608 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1609 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1610 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1611 ; FIJI-NEXT: ; return to shader part epilog
1613 ; GFX6789-LABEL: load_mip_2d_tfe_nouse_V2:
1614 ; GFX6789: ; %bb.0: ; %main_body
1615 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1616 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1617 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 unorm tfe
1618 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1619 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1620 ; GFX6789-NEXT: ; return to shader part epilog
1622 ; NOPRT-LABEL: load_mip_2d_tfe_nouse_V2:
1623 ; NOPRT: ; %bb.0: ; %main_body
1624 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1625 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x1 unorm tfe
1626 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1627 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
1628 ; NOPRT-NEXT: ; return to shader part epilog
1630 ; GFX10-LABEL: load_mip_2d_tfe_nouse_V2:
1631 ; GFX10: ; %bb.0: ; %main_body
1632 ; GFX10-NEXT: v_mov_b32_e32 v3, 0 ; encoding: [0x80,0x02,0x06,0x7e]
1633 ; GFX10-NEXT: v_mov_b32_e32 v4, v3 ; encoding: [0x03,0x03,0x08,0x7e]
1634 ; GFX10-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe ; encoding: [0x08,0x11,0x05,0xf0,0x00,0x03,0x00,0x00]
1635 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1636 ; GFX10-NEXT: v_mov_b32_e32 v0, v4 ; encoding: [0x04,0x03,0x00,0x7e]
1637 ; GFX10-NEXT: ; return to shader part epilog
1639 %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)
1640 %v.err = extractvalue {<2 x float>, i32} %v, 1
1641 %vv = bitcast i32 %v.err to float
1645 define amdgpu_ps float @load_mip_2d_tfe_nouse_V1(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
1646 ; VERDE-LABEL: load_mip_2d_tfe_nouse_V1:
1647 ; VERDE: ; %bb.0: ; %main_body
1648 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
1649 ; VERDE-NEXT: v_mov_b32_e32 v4, v3
1650 ; VERDE-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 unorm tfe
1651 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1652 ; VERDE-NEXT: v_mov_b32_e32 v0, v4
1653 ; VERDE-NEXT: ; return to shader part epilog
1655 ; FIJI-LABEL: load_mip_2d_tfe_nouse_V1:
1656 ; FIJI: ; %bb.0: ; %main_body
1657 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
1658 ; FIJI-NEXT: v_mov_b32_e32 v4, v3
1659 ; FIJI-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 unorm tfe
1660 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1661 ; FIJI-NEXT: v_mov_b32_e32 v0, v4
1662 ; FIJI-NEXT: ; return to shader part epilog
1664 ; GFX6789-LABEL: load_mip_2d_tfe_nouse_V1:
1665 ; GFX6789: ; %bb.0: ; %main_body
1666 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1667 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1668 ; GFX6789-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 unorm tfe
1669 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1670 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1671 ; GFX6789-NEXT: ; return to shader part epilog
1673 ; NOPRT-LABEL: load_mip_2d_tfe_nouse_V1:
1674 ; NOPRT: ; %bb.0: ; %main_body
1675 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1676 ; NOPRT-NEXT: image_load_mip v[2:3], v[0:2], s[0:7] dmask:0x2 unorm tfe
1677 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1678 ; NOPRT-NEXT: v_mov_b32_e32 v0, v3
1679 ; NOPRT-NEXT: ; return to shader part epilog
1681 ; GFX10-LABEL: load_mip_2d_tfe_nouse_V1:
1682 ; GFX10: ; %bb.0: ; %main_body
1683 ; GFX10-NEXT: v_mov_b32_e32 v3, 0 ; encoding: [0x80,0x02,0x06,0x7e]
1684 ; GFX10-NEXT: v_mov_b32_e32 v4, v3 ; encoding: [0x03,0x03,0x08,0x7e]
1685 ; GFX10-NEXT: image_load_mip v[3:4], v[0:2], s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_2D unorm tfe ; encoding: [0x08,0x12,0x05,0xf0,0x00,0x03,0x00,0x00]
1686 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1687 ; GFX10-NEXT: v_mov_b32_e32 v0, v4 ; encoding: [0x04,0x03,0x00,0x7e]
1688 ; GFX10-NEXT: ; return to shader part epilog
1690 %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)
1691 %v.err = extractvalue {float, i32} %v, 1
1692 %vv = bitcast i32 %v.err to float
1696 define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask3(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
1697 ; VERDE-LABEL: load_1d_tfe_V4_dmask3:
1698 ; VERDE: ; %bb.0: ; %main_body
1699 ; VERDE-NEXT: v_mov_b32_e32 v4, v0
1700 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1701 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1702 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1703 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1704 ; VERDE-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 unorm tfe
1705 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1706 ; VERDE-NEXT: s_mov_b32 s10, -1
1707 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1708 ; VERDE-NEXT: buffer_store_dword v3, off, s[8:11], 0
1709 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1710 ; VERDE-NEXT: ; return to shader part epilog
1712 ; FIJI-LABEL: load_1d_tfe_V4_dmask3:
1713 ; FIJI: ; %bb.0: ; %main_body
1714 ; FIJI-NEXT: v_mov_b32_e32 v4, v0
1715 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1716 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1717 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1718 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1719 ; FIJI-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 unorm tfe
1720 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1721 ; FIJI-NEXT: s_mov_b32 s10, -1
1722 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1723 ; FIJI-NEXT: buffer_store_dword v3, off, s[8:11], 0
1724 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1725 ; FIJI-NEXT: ; return to shader part epilog
1727 ; GFX6789-LABEL: load_1d_tfe_V4_dmask3:
1728 ; GFX6789: ; %bb.0: ; %main_body
1729 ; GFX6789-NEXT: v_mov_b32_e32 v5, 0
1730 ; GFX6789-NEXT: v_mov_b32_e32 v4, v0
1731 ; GFX6789-NEXT: v_mov_b32_e32 v6, v5
1732 ; GFX6789-NEXT: v_mov_b32_e32 v7, v5
1733 ; GFX6789-NEXT: v_mov_b32_e32 v8, v5
1734 ; GFX6789-NEXT: v_mov_b32_e32 v0, v5
1735 ; GFX6789-NEXT: v_mov_b32_e32 v1, v6
1736 ; GFX6789-NEXT: v_mov_b32_e32 v2, v7
1737 ; GFX6789-NEXT: v_mov_b32_e32 v3, v8
1738 ; GFX6789-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 unorm tfe
1739 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1740 ; GFX6789-NEXT: global_store_dword v5, v3, s[8:9]
1741 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1742 ; GFX6789-NEXT: ; return to shader part epilog
1744 ; NOPRT-LABEL: load_1d_tfe_V4_dmask3:
1745 ; NOPRT: ; %bb.0: ; %main_body
1746 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1747 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0x7 unorm tfe
1748 ; NOPRT-NEXT: v_mov_b32_e32 v4, 0
1749 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1750 ; NOPRT-NEXT: global_store_dword v4, v3, s[8:9]
1751 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1752 ; NOPRT-NEXT: ; return to shader part epilog
1754 ; GFX10-LABEL: load_1d_tfe_V4_dmask3:
1755 ; GFX10: ; %bb.0: ; %main_body
1756 ; GFX10-NEXT: v_mov_b32_e32 v5, 0 ; encoding: [0x80,0x02,0x0a,0x7e]
1757 ; GFX10-NEXT: v_mov_b32_e32 v4, v0 ; encoding: [0x00,0x03,0x08,0x7e]
1758 ; GFX10-NEXT: v_mov_b32_e32 v6, v5 ; encoding: [0x05,0x03,0x0c,0x7e]
1759 ; GFX10-NEXT: v_mov_b32_e32 v7, v5 ; encoding: [0x05,0x03,0x0e,0x7e]
1760 ; GFX10-NEXT: v_mov_b32_e32 v8, v5 ; encoding: [0x05,0x03,0x10,0x7e]
1761 ; GFX10-NEXT: v_mov_b32_e32 v0, v5 ; encoding: [0x05,0x03,0x00,0x7e]
1762 ; GFX10-NEXT: v_mov_b32_e32 v1, v6 ; encoding: [0x06,0x03,0x02,0x7e]
1763 ; GFX10-NEXT: v_mov_b32_e32 v2, v7 ; encoding: [0x07,0x03,0x04,0x7e]
1764 ; GFX10-NEXT: v_mov_b32_e32 v3, v8 ; encoding: [0x08,0x03,0x06,0x7e]
1765 ; GFX10-NEXT: image_load v[0:3], v4, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x17,0x01,0xf0,0x04,0x00,0x00,0x00]
1766 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1767 ; GFX10-NEXT: global_store_dword v5, v3, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x05,0x03,0x08,0x00]
1768 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1769 ; GFX10-NEXT: ; return to shader part epilog
1771 %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)
1772 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1773 %v.err = extractvalue {<4 x float>, i32} %v, 1
1774 store i32 %v.err, i32 addrspace(1)* %out, align 4
1775 ret <4 x float> %v.vec
1778 define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask2(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
1779 ; VERDE-LABEL: load_1d_tfe_V4_dmask2:
1780 ; VERDE: ; %bb.0: ; %main_body
1781 ; VERDE-NEXT: v_mov_b32_e32 v3, v0
1782 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1783 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1784 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1785 ; VERDE-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 unorm tfe
1786 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1787 ; VERDE-NEXT: s_mov_b32 s10, -1
1788 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1789 ; VERDE-NEXT: buffer_store_dword v2, off, s[8:11], 0
1790 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1791 ; VERDE-NEXT: ; return to shader part epilog
1793 ; FIJI-LABEL: load_1d_tfe_V4_dmask2:
1794 ; FIJI: ; %bb.0: ; %main_body
1795 ; FIJI-NEXT: v_mov_b32_e32 v3, v0
1796 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1797 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1798 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1799 ; FIJI-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 unorm tfe
1800 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1801 ; FIJI-NEXT: s_mov_b32 s10, -1
1802 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1803 ; FIJI-NEXT: buffer_store_dword v2, off, s[8:11], 0
1804 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1805 ; FIJI-NEXT: ; return to shader part epilog
1807 ; GFX6789-LABEL: load_1d_tfe_V4_dmask2:
1808 ; GFX6789: ; %bb.0: ; %main_body
1809 ; GFX6789-NEXT: v_mov_b32_e32 v4, 0
1810 ; GFX6789-NEXT: v_mov_b32_e32 v3, v0
1811 ; GFX6789-NEXT: v_mov_b32_e32 v5, v4
1812 ; GFX6789-NEXT: v_mov_b32_e32 v6, v4
1813 ; GFX6789-NEXT: v_mov_b32_e32 v0, v4
1814 ; GFX6789-NEXT: v_mov_b32_e32 v1, v5
1815 ; GFX6789-NEXT: v_mov_b32_e32 v2, v6
1816 ; GFX6789-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 unorm tfe
1817 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1818 ; GFX6789-NEXT: global_store_dword v4, v2, s[8:9]
1819 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1820 ; GFX6789-NEXT: ; return to shader part epilog
1822 ; NOPRT-LABEL: load_1d_tfe_V4_dmask2:
1823 ; NOPRT: ; %bb.0: ; %main_body
1824 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
1825 ; NOPRT-NEXT: image_load v[0:2], v0, s[0:7] dmask:0x6 unorm tfe
1826 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
1827 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1828 ; NOPRT-NEXT: global_store_dword v3, v2, s[8:9]
1829 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1830 ; NOPRT-NEXT: ; return to shader part epilog
1832 ; GFX10-LABEL: load_1d_tfe_V4_dmask2:
1833 ; GFX10: ; %bb.0: ; %main_body
1834 ; GFX10-NEXT: v_mov_b32_e32 v4, 0 ; encoding: [0x80,0x02,0x08,0x7e]
1835 ; GFX10-NEXT: v_mov_b32_e32 v3, v0 ; encoding: [0x00,0x03,0x06,0x7e]
1836 ; GFX10-NEXT: v_mov_b32_e32 v5, v4 ; encoding: [0x04,0x03,0x0a,0x7e]
1837 ; GFX10-NEXT: v_mov_b32_e32 v6, v4 ; encoding: [0x04,0x03,0x0c,0x7e]
1838 ; GFX10-NEXT: v_mov_b32_e32 v0, v4 ; encoding: [0x04,0x03,0x00,0x7e]
1839 ; GFX10-NEXT: v_mov_b32_e32 v1, v5 ; encoding: [0x05,0x03,0x02,0x7e]
1840 ; GFX10-NEXT: v_mov_b32_e32 v2, v6 ; encoding: [0x06,0x03,0x04,0x7e]
1841 ; GFX10-NEXT: image_load v[0:2], v3, s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x16,0x01,0xf0,0x03,0x00,0x00,0x00]
1842 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1843 ; GFX10-NEXT: global_store_dword v4, v2, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x04,0x02,0x08,0x00]
1844 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1845 ; GFX10-NEXT: ; return to shader part epilog
1847 %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)
1848 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1849 %v.err = extractvalue {<4 x float>, i32} %v, 1
1850 store i32 %v.err, i32 addrspace(1)* %out, align 4
1851 ret <4 x float> %v.vec
1854 define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask1(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
1855 ; VERDE-LABEL: load_1d_tfe_V4_dmask1:
1856 ; VERDE: ; %bb.0: ; %main_body
1857 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1858 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1859 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1860 ; VERDE-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
1861 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1862 ; VERDE-NEXT: s_mov_b32 s10, -1
1863 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1864 ; VERDE-NEXT: buffer_store_dword v1, off, s[8:11], 0
1865 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1866 ; VERDE-NEXT: ; return to shader part epilog
1868 ; FIJI-LABEL: load_1d_tfe_V4_dmask1:
1869 ; FIJI: ; %bb.0: ; %main_body
1870 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1871 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1872 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1873 ; FIJI-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
1874 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1875 ; FIJI-NEXT: s_mov_b32 s10, -1
1876 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1877 ; FIJI-NEXT: buffer_store_dword v1, off, s[8:11], 0
1878 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1879 ; FIJI-NEXT: ; return to shader part epilog
1881 ; GFX6789-LABEL: load_1d_tfe_V4_dmask1:
1882 ; GFX6789: ; %bb.0: ; %main_body
1883 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1884 ; GFX6789-NEXT: v_mov_b32_e32 v2, v0
1885 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1886 ; GFX6789-NEXT: v_mov_b32_e32 v0, v3
1887 ; GFX6789-NEXT: v_mov_b32_e32 v1, v4
1888 ; GFX6789-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
1889 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1890 ; GFX6789-NEXT: global_store_dword v3, v1, s[8:9]
1891 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1892 ; GFX6789-NEXT: ; return to shader part epilog
1894 ; NOPRT-LABEL: load_1d_tfe_V4_dmask1:
1895 ; NOPRT: ; %bb.0: ; %main_body
1896 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
1897 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x8 unorm tfe
1898 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
1899 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1900 ; NOPRT-NEXT: global_store_dword v2, v1, s[8:9]
1901 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1902 ; NOPRT-NEXT: ; return to shader part epilog
1904 ; GFX10-LABEL: load_1d_tfe_V4_dmask1:
1905 ; GFX10: ; %bb.0: ; %main_body
1906 ; GFX10-NEXT: v_mov_b32_e32 v3, 0 ; encoding: [0x80,0x02,0x06,0x7e]
1907 ; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e]
1908 ; GFX10-NEXT: v_mov_b32_e32 v4, v3 ; encoding: [0x03,0x03,0x08,0x7e]
1909 ; GFX10-NEXT: v_mov_b32_e32 v0, v3 ; encoding: [0x03,0x03,0x00,0x7e]
1910 ; GFX10-NEXT: v_mov_b32_e32 v1, v4 ; encoding: [0x04,0x03,0x02,0x7e]
1911 ; GFX10-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x18,0x01,0xf0,0x02,0x00,0x00,0x00]
1912 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1913 ; GFX10-NEXT: global_store_dword v3, v1, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x03,0x01,0x08,0x00]
1914 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1915 ; GFX10-NEXT: ; return to shader part epilog
1917 %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)
1918 %v.vec = extractvalue {<4 x float>, i32} %v, 0
1919 %v.err = extractvalue {<4 x float>, i32} %v, 1
1920 store i32 %v.err, i32 addrspace(1)* %out, align 4
1921 ret <4 x float> %v.vec
1924 define amdgpu_ps <2 x float> @load_1d_tfe_V2_dmask1(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
1925 ; VERDE-LABEL: load_1d_tfe_V2_dmask1:
1926 ; VERDE: ; %bb.0: ; %main_body
1927 ; VERDE-NEXT: v_mov_b32_e32 v2, v0
1928 ; VERDE-NEXT: v_mov_b32_e32 v0, 0
1929 ; VERDE-NEXT: v_mov_b32_e32 v1, v0
1930 ; VERDE-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
1931 ; VERDE-NEXT: s_mov_b32 s11, 0xf000
1932 ; VERDE-NEXT: s_mov_b32 s10, -1
1933 ; VERDE-NEXT: s_waitcnt vmcnt(0)
1934 ; VERDE-NEXT: buffer_store_dword v1, off, s[8:11], 0
1935 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1936 ; VERDE-NEXT: ; return to shader part epilog
1938 ; FIJI-LABEL: load_1d_tfe_V2_dmask1:
1939 ; FIJI: ; %bb.0: ; %main_body
1940 ; FIJI-NEXT: v_mov_b32_e32 v2, v0
1941 ; FIJI-NEXT: v_mov_b32_e32 v0, 0
1942 ; FIJI-NEXT: v_mov_b32_e32 v1, v0
1943 ; FIJI-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
1944 ; FIJI-NEXT: s_mov_b32 s11, 0xf000
1945 ; FIJI-NEXT: s_mov_b32 s10, -1
1946 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1947 ; FIJI-NEXT: buffer_store_dword v1, off, s[8:11], 0
1948 ; FIJI-NEXT: s_waitcnt vmcnt(0)
1949 ; FIJI-NEXT: ; return to shader part epilog
1951 ; GFX6789-LABEL: load_1d_tfe_V2_dmask1:
1952 ; GFX6789: ; %bb.0: ; %main_body
1953 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
1954 ; GFX6789-NEXT: v_mov_b32_e32 v2, v0
1955 ; GFX6789-NEXT: v_mov_b32_e32 v4, v3
1956 ; GFX6789-NEXT: v_mov_b32_e32 v0, v3
1957 ; GFX6789-NEXT: v_mov_b32_e32 v1, v4
1958 ; GFX6789-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 unorm tfe
1959 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1960 ; GFX6789-NEXT: global_store_dword v3, v1, s[8:9]
1961 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
1962 ; GFX6789-NEXT: ; return to shader part epilog
1964 ; NOPRT-LABEL: load_1d_tfe_V2_dmask1:
1965 ; NOPRT: ; %bb.0: ; %main_body
1966 ; NOPRT-NEXT: v_mov_b32_e32 v1, 0
1967 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x8 unorm tfe
1968 ; NOPRT-NEXT: v_mov_b32_e32 v2, 0
1969 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1970 ; NOPRT-NEXT: global_store_dword v2, v1, s[8:9]
1971 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
1972 ; NOPRT-NEXT: ; return to shader part epilog
1974 ; GFX10-LABEL: load_1d_tfe_V2_dmask1:
1975 ; GFX10: ; %bb.0: ; %main_body
1976 ; GFX10-NEXT: v_mov_b32_e32 v3, 0 ; encoding: [0x80,0x02,0x06,0x7e]
1977 ; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e]
1978 ; GFX10-NEXT: v_mov_b32_e32 v4, v3 ; encoding: [0x03,0x03,0x08,0x7e]
1979 ; GFX10-NEXT: v_mov_b32_e32 v0, v3 ; encoding: [0x03,0x03,0x00,0x7e]
1980 ; GFX10-NEXT: v_mov_b32_e32 v1, v4 ; encoding: [0x04,0x03,0x02,0x7e]
1981 ; GFX10-NEXT: image_load v[0:1], v2, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe ; encoding: [0x00,0x18,0x01,0xf0,0x02,0x00,0x00,0x00]
1982 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1983 ; GFX10-NEXT: global_store_dword v3, v1, s[8:9] ; encoding: [0x00,0x80,0x70,0xdc,0x03,0x01,0x08,0x00]
1984 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb]
1985 ; GFX10-NEXT: ; return to shader part epilog
1987 %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)
1988 %v.vec = extractvalue {<2 x float>, i32} %v, 0
1989 %v.err = extractvalue {<2 x float>, i32} %v, 1
1990 store i32 %v.err, i32 addrspace(1)* %out, align 4
1991 ret <2 x float> %v.vec
1995 define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r, i32 %mip) {
1996 ; VERDE-LABEL: load_mip_3d:
1997 ; VERDE: ; %bb.0: ; %main_body
1998 ; VERDE-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
1999 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2000 ; VERDE-NEXT: ; return to shader part epilog
2002 ; FIJI-LABEL: load_mip_3d:
2003 ; FIJI: ; %bb.0: ; %main_body
2004 ; FIJI-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2005 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2006 ; FIJI-NEXT: ; return to shader part epilog
2008 ; GFX6789-LABEL: load_mip_3d:
2009 ; GFX6789: ; %bb.0: ; %main_body
2010 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2011 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2012 ; GFX6789-NEXT: ; return to shader part epilog
2014 ; NOPRT-LABEL: load_mip_3d:
2015 ; NOPRT: ; %bb.0: ; %main_body
2016 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm
2017 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2018 ; NOPRT-NEXT: ; return to shader part epilog
2020 ; GFX10-LABEL: load_mip_3d:
2021 ; GFX10: ; %bb.0: ; %main_body
2022 ; GFX10-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ; encoding: [0x10,0x1f,0x04,0xf0,0x00,0x00,0x00,0x00]
2023 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2024 ; GFX10-NEXT: ; return to shader part epilog
2026 %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)
2030 define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
2031 ; VERDE-LABEL: load_mip_cube:
2032 ; VERDE: ; %bb.0: ; %main_body
2033 ; VERDE-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2034 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2035 ; VERDE-NEXT: ; return to shader part epilog
2037 ; FIJI-LABEL: load_mip_cube:
2038 ; FIJI: ; %bb.0: ; %main_body
2039 ; FIJI-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2040 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2041 ; FIJI-NEXT: ; return to shader part epilog
2043 ; GFX6789-LABEL: load_mip_cube:
2044 ; GFX6789: ; %bb.0: ; %main_body
2045 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2046 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2047 ; GFX6789-NEXT: ; return to shader part epilog
2049 ; NOPRT-LABEL: load_mip_cube:
2050 ; NOPRT: ; %bb.0: ; %main_body
2051 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2052 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2053 ; NOPRT-NEXT: ; return to shader part epilog
2055 ; GFX10-LABEL: load_mip_cube:
2056 ; GFX10: ; %bb.0: ; %main_body
2057 ; GFX10-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ; encoding: [0x18,0x1f,0x04,0xf0,0x00,0x00,0x00,0x00]
2058 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2059 ; GFX10-NEXT: ; return to shader part epilog
2061 %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)
2065 define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice, i32 %mip) {
2066 ; VERDE-LABEL: load_mip_1darray:
2067 ; VERDE: ; %bb.0: ; %main_body
2068 ; VERDE-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2069 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2070 ; VERDE-NEXT: ; return to shader part epilog
2072 ; FIJI-LABEL: load_mip_1darray:
2073 ; FIJI: ; %bb.0: ; %main_body
2074 ; FIJI-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2075 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2076 ; FIJI-NEXT: ; return to shader part epilog
2078 ; GFX6789-LABEL: load_mip_1darray:
2079 ; GFX6789: ; %bb.0: ; %main_body
2080 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2081 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2082 ; GFX6789-NEXT: ; return to shader part epilog
2084 ; NOPRT-LABEL: load_mip_1darray:
2085 ; NOPRT: ; %bb.0: ; %main_body
2086 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf unorm da
2087 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2088 ; NOPRT-NEXT: ; return to shader part epilog
2090 ; GFX10-LABEL: load_mip_1darray:
2091 ; GFX10: ; %bb.0: ; %main_body
2092 ; GFX10-NEXT: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ; encoding: [0x20,0x1f,0x04,0xf0,0x00,0x00,0x00,0x00]
2093 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2094 ; GFX10-NEXT: ; return to shader part epilog
2096 %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)
2100 define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
2101 ; VERDE-LABEL: load_mip_2darray:
2102 ; VERDE: ; %bb.0: ; %main_body
2103 ; VERDE-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2104 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2105 ; VERDE-NEXT: ; return to shader part epilog
2107 ; FIJI-LABEL: load_mip_2darray:
2108 ; FIJI: ; %bb.0: ; %main_body
2109 ; FIJI-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2110 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2111 ; FIJI-NEXT: ; return to shader part epilog
2113 ; GFX6789-LABEL: load_mip_2darray:
2114 ; GFX6789: ; %bb.0: ; %main_body
2115 ; GFX6789-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2116 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2117 ; GFX6789-NEXT: ; return to shader part epilog
2119 ; NOPRT-LABEL: load_mip_2darray:
2120 ; NOPRT: ; %bb.0: ; %main_body
2121 ; NOPRT-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da
2122 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2123 ; NOPRT-NEXT: ; return to shader part epilog
2125 ; GFX10-LABEL: load_mip_2darray:
2126 ; GFX10: ; %bb.0: ; %main_body
2127 ; GFX10-NEXT: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ; encoding: [0x28,0x1f,0x04,0xf0,0x00,0x00,0x00,0x00]
2128 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2129 ; GFX10-NEXT: ; return to shader part epilog
2131 %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)
2135 define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
2136 ; VERDE-LABEL: store_1d:
2137 ; VERDE: ; %bb.0: ; %main_body
2138 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2139 ; VERDE-NEXT: s_endpgm
2141 ; FIJI-LABEL: store_1d:
2142 ; FIJI: ; %bb.0: ; %main_body
2143 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2144 ; FIJI-NEXT: s_endpgm
2146 ; GFX6789-LABEL: store_1d:
2147 ; GFX6789: ; %bb.0: ; %main_body
2148 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2149 ; GFX6789-NEXT: s_endpgm
2151 ; NOPRT-LABEL: store_1d:
2152 ; NOPRT: ; %bb.0: ; %main_body
2153 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
2154 ; NOPRT-NEXT: s_endpgm
2156 ; GFX10-LABEL: store_1d:
2157 ; GFX10: ; %bb.0: ; %main_body
2158 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2159 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2161 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)
2165 define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t) {
2166 ; VERDE-LABEL: store_2d:
2167 ; VERDE: ; %bb.0: ; %main_body
2168 ; VERDE-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2169 ; VERDE-NEXT: s_endpgm
2171 ; FIJI-LABEL: store_2d:
2172 ; FIJI: ; %bb.0: ; %main_body
2173 ; FIJI-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2174 ; FIJI-NEXT: s_endpgm
2176 ; GFX6789-LABEL: store_2d:
2177 ; GFX6789: ; %bb.0: ; %main_body
2178 ; GFX6789-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2179 ; GFX6789-NEXT: s_endpgm
2181 ; NOPRT-LABEL: store_2d:
2182 ; NOPRT: ; %bb.0: ; %main_body
2183 ; NOPRT-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2184 ; NOPRT-NEXT: s_endpgm
2186 ; GFX10-LABEL: store_2d:
2187 ; GFX10: ; %bb.0: ; %main_body
2188 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2189 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2191 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)
2195 define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r) {
2196 ; VERDE-LABEL: store_3d:
2197 ; VERDE: ; %bb.0: ; %main_body
2198 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2199 ; VERDE-NEXT: s_endpgm
2201 ; FIJI-LABEL: store_3d:
2202 ; FIJI: ; %bb.0: ; %main_body
2203 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2204 ; FIJI-NEXT: s_endpgm
2206 ; GFX6789-LABEL: store_3d:
2207 ; GFX6789: ; %bb.0: ; %main_body
2208 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2209 ; GFX6789-NEXT: s_endpgm
2211 ; NOPRT-LABEL: store_3d:
2212 ; NOPRT: ; %bb.0: ; %main_body
2213 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2214 ; NOPRT-NEXT: s_endpgm
2216 ; GFX10-LABEL: store_3d:
2217 ; GFX10: ; %bb.0: ; %main_body
2218 ; GFX10-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ; encoding: [0x10,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2219 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2221 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)
2225 define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
2226 ; VERDE-LABEL: store_cube:
2227 ; VERDE: ; %bb.0: ; %main_body
2228 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2229 ; VERDE-NEXT: s_endpgm
2231 ; FIJI-LABEL: store_cube:
2232 ; FIJI: ; %bb.0: ; %main_body
2233 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2234 ; FIJI-NEXT: s_endpgm
2236 ; GFX6789-LABEL: store_cube:
2237 ; GFX6789: ; %bb.0: ; %main_body
2238 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2239 ; GFX6789-NEXT: s_endpgm
2241 ; NOPRT-LABEL: store_cube:
2242 ; NOPRT: ; %bb.0: ; %main_body
2243 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2244 ; NOPRT-NEXT: s_endpgm
2246 ; GFX10-LABEL: store_cube:
2247 ; GFX10: ; %bb.0: ; %main_body
2248 ; GFX10-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ; encoding: [0x18,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2249 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2251 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)
2255 define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice) {
2256 ; VERDE-LABEL: store_1darray:
2257 ; VERDE: ; %bb.0: ; %main_body
2258 ; VERDE-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2259 ; VERDE-NEXT: s_endpgm
2261 ; FIJI-LABEL: store_1darray:
2262 ; FIJI: ; %bb.0: ; %main_body
2263 ; FIJI-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2264 ; FIJI-NEXT: s_endpgm
2266 ; GFX6789-LABEL: store_1darray:
2267 ; GFX6789: ; %bb.0: ; %main_body
2268 ; GFX6789-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2269 ; GFX6789-NEXT: s_endpgm
2271 ; NOPRT-LABEL: store_1darray:
2272 ; NOPRT: ; %bb.0: ; %main_body
2273 ; NOPRT-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da
2274 ; NOPRT-NEXT: s_endpgm
2276 ; GFX10-LABEL: store_1darray:
2277 ; GFX10: ; %bb.0: ; %main_body
2278 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ; encoding: [0x20,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2279 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2281 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)
2285 define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
2286 ; VERDE-LABEL: store_2darray:
2287 ; VERDE: ; %bb.0: ; %main_body
2288 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2289 ; VERDE-NEXT: s_endpgm
2291 ; FIJI-LABEL: store_2darray:
2292 ; FIJI: ; %bb.0: ; %main_body
2293 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2294 ; FIJI-NEXT: s_endpgm
2296 ; GFX6789-LABEL: store_2darray:
2297 ; GFX6789: ; %bb.0: ; %main_body
2298 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2299 ; GFX6789-NEXT: s_endpgm
2301 ; NOPRT-LABEL: store_2darray:
2302 ; NOPRT: ; %bb.0: ; %main_body
2303 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2304 ; NOPRT-NEXT: s_endpgm
2306 ; GFX10-LABEL: store_2darray:
2307 ; GFX10: ; %bb.0: ; %main_body
2308 ; GFX10-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ; encoding: [0x28,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2309 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2311 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)
2315 define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %fragid) {
2316 ; VERDE-LABEL: store_2dmsaa:
2317 ; VERDE: ; %bb.0: ; %main_body
2318 ; VERDE-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2319 ; VERDE-NEXT: s_endpgm
2321 ; FIJI-LABEL: store_2dmsaa:
2322 ; FIJI: ; %bb.0: ; %main_body
2323 ; FIJI-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2324 ; FIJI-NEXT: s_endpgm
2326 ; GFX6789-LABEL: store_2dmsaa:
2327 ; GFX6789: ; %bb.0: ; %main_body
2328 ; GFX6789-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2329 ; GFX6789-NEXT: s_endpgm
2331 ; NOPRT-LABEL: store_2dmsaa:
2332 ; NOPRT: ; %bb.0: ; %main_body
2333 ; NOPRT-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2334 ; NOPRT-NEXT: s_endpgm
2336 ; GFX10-LABEL: store_2dmsaa:
2337 ; GFX10: ; %bb.0: ; %main_body
2338 ; GFX10-NEXT: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm ; encoding: [0x30,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2339 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2341 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)
2345 define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
2346 ; VERDE-LABEL: store_2darraymsaa:
2347 ; VERDE: ; %bb.0: ; %main_body
2348 ; VERDE-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2349 ; VERDE-NEXT: s_endpgm
2351 ; FIJI-LABEL: store_2darraymsaa:
2352 ; FIJI: ; %bb.0: ; %main_body
2353 ; FIJI-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2354 ; FIJI-NEXT: s_endpgm
2356 ; GFX6789-LABEL: store_2darraymsaa:
2357 ; GFX6789: ; %bb.0: ; %main_body
2358 ; GFX6789-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2359 ; GFX6789-NEXT: s_endpgm
2361 ; NOPRT-LABEL: store_2darraymsaa:
2362 ; NOPRT: ; %bb.0: ; %main_body
2363 ; NOPRT-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2364 ; NOPRT-NEXT: s_endpgm
2366 ; GFX10-LABEL: store_2darraymsaa:
2367 ; GFX10: ; %bb.0: ; %main_body
2368 ; GFX10-NEXT: image_store v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm ; encoding: [0x38,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
2369 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2371 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)
2375 define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %mip) {
2376 ; VERDE-LABEL: store_mip_1d:
2377 ; VERDE: ; %bb.0: ; %main_body
2378 ; VERDE-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2379 ; VERDE-NEXT: s_endpgm
2381 ; FIJI-LABEL: store_mip_1d:
2382 ; FIJI: ; %bb.0: ; %main_body
2383 ; FIJI-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2384 ; FIJI-NEXT: s_endpgm
2386 ; GFX6789-LABEL: store_mip_1d:
2387 ; GFX6789: ; %bb.0: ; %main_body
2388 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2389 ; GFX6789-NEXT: s_endpgm
2391 ; NOPRT-LABEL: store_mip_1d:
2392 ; NOPRT: ; %bb.0: ; %main_body
2393 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm
2394 ; NOPRT-NEXT: s_endpgm
2396 ; GFX10-LABEL: store_mip_1d:
2397 ; GFX10: ; %bb.0: ; %main_body
2398 ; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x24,0xf0,0x04,0x00,0x00,0x00]
2399 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2401 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)
2405 define amdgpu_ps void @store_mip_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %mip) {
2406 ; VERDE-LABEL: store_mip_2d:
2407 ; VERDE: ; %bb.0: ; %main_body
2408 ; VERDE-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2409 ; VERDE-NEXT: s_endpgm
2411 ; FIJI-LABEL: store_mip_2d:
2412 ; FIJI: ; %bb.0: ; %main_body
2413 ; FIJI-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2414 ; FIJI-NEXT: s_endpgm
2416 ; GFX6789-LABEL: store_mip_2d:
2417 ; GFX6789: ; %bb.0: ; %main_body
2418 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2419 ; GFX6789-NEXT: s_endpgm
2421 ; NOPRT-LABEL: store_mip_2d:
2422 ; NOPRT: ; %bb.0: ; %main_body
2423 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm
2424 ; NOPRT-NEXT: s_endpgm
2426 ; GFX10-LABEL: store_mip_2d:
2427 ; GFX10: ; %bb.0: ; %main_body
2428 ; GFX10-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x1f,0x24,0xf0,0x04,0x00,0x00,0x00]
2429 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2431 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)
2435 define amdgpu_ps void @store_mip_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r, i32 %mip) {
2436 ; VERDE-LABEL: store_mip_3d:
2437 ; VERDE: ; %bb.0: ; %main_body
2438 ; VERDE-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
2439 ; VERDE-NEXT: s_endpgm
2441 ; FIJI-LABEL: store_mip_3d:
2442 ; FIJI: ; %bb.0: ; %main_body
2443 ; FIJI-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
2444 ; FIJI-NEXT: s_endpgm
2446 ; GFX6789-LABEL: store_mip_3d:
2447 ; GFX6789: ; %bb.0: ; %main_body
2448 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
2449 ; GFX6789-NEXT: s_endpgm
2451 ; NOPRT-LABEL: store_mip_3d:
2452 ; NOPRT: ; %bb.0: ; %main_body
2453 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm
2454 ; NOPRT-NEXT: s_endpgm
2456 ; GFX10-LABEL: store_mip_3d:
2457 ; GFX10: ; %bb.0: ; %main_body
2458 ; GFX10-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ; encoding: [0x10,0x1f,0x24,0xf0,0x04,0x00,0x00,0x00]
2459 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2461 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)
2465 define amdgpu_ps void @store_mip_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
2466 ; VERDE-LABEL: store_mip_cube:
2467 ; VERDE: ; %bb.0: ; %main_body
2468 ; VERDE-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2469 ; VERDE-NEXT: s_endpgm
2471 ; FIJI-LABEL: store_mip_cube:
2472 ; FIJI: ; %bb.0: ; %main_body
2473 ; FIJI-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2474 ; FIJI-NEXT: s_endpgm
2476 ; GFX6789-LABEL: store_mip_cube:
2477 ; GFX6789: ; %bb.0: ; %main_body
2478 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2479 ; GFX6789-NEXT: s_endpgm
2481 ; NOPRT-LABEL: store_mip_cube:
2482 ; NOPRT: ; %bb.0: ; %main_body
2483 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2484 ; NOPRT-NEXT: s_endpgm
2486 ; GFX10-LABEL: store_mip_cube:
2487 ; GFX10: ; %bb.0: ; %main_body
2488 ; GFX10-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ; encoding: [0x18,0x1f,0x24,0xf0,0x04,0x00,0x00,0x00]
2489 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2491 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)
2495 define amdgpu_ps void @store_mip_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice, i32 %mip) {
2496 ; VERDE-LABEL: store_mip_1darray:
2497 ; VERDE: ; %bb.0: ; %main_body
2498 ; VERDE-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2499 ; VERDE-NEXT: s_endpgm
2501 ; FIJI-LABEL: store_mip_1darray:
2502 ; FIJI: ; %bb.0: ; %main_body
2503 ; FIJI-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2504 ; FIJI-NEXT: s_endpgm
2506 ; GFX6789-LABEL: store_mip_1darray:
2507 ; GFX6789: ; %bb.0: ; %main_body
2508 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2509 ; GFX6789-NEXT: s_endpgm
2511 ; NOPRT-LABEL: store_mip_1darray:
2512 ; NOPRT: ; %bb.0: ; %main_body
2513 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf unorm da
2514 ; NOPRT-NEXT: s_endpgm
2516 ; GFX10-LABEL: store_mip_1darray:
2517 ; GFX10: ; %bb.0: ; %main_body
2518 ; GFX10-NEXT: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ; encoding: [0x20,0x1f,0x24,0xf0,0x04,0x00,0x00,0x00]
2519 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2521 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)
2525 define amdgpu_ps void @store_mip_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
2526 ; VERDE-LABEL: store_mip_2darray:
2527 ; VERDE: ; %bb.0: ; %main_body
2528 ; VERDE-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2529 ; VERDE-NEXT: s_endpgm
2531 ; FIJI-LABEL: store_mip_2darray:
2532 ; FIJI: ; %bb.0: ; %main_body
2533 ; FIJI-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2534 ; FIJI-NEXT: s_endpgm
2536 ; GFX6789-LABEL: store_mip_2darray:
2537 ; GFX6789: ; %bb.0: ; %main_body
2538 ; GFX6789-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2539 ; GFX6789-NEXT: s_endpgm
2541 ; NOPRT-LABEL: store_mip_2darray:
2542 ; NOPRT: ; %bb.0: ; %main_body
2543 ; NOPRT-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da
2544 ; NOPRT-NEXT: s_endpgm
2546 ; GFX10-LABEL: store_mip_2darray:
2547 ; GFX10: ; %bb.0: ; %main_body
2548 ; GFX10-NEXT: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ; encoding: [0x28,0x1f,0x24,0xf0,0x04,0x00,0x00,0x00]
2549 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2551 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)
2555 define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, i32 %mip) {
2556 ; VERDE-LABEL: getresinfo_1d:
2557 ; VERDE: ; %bb.0: ; %main_body
2558 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2559 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2560 ; VERDE-NEXT: ; return to shader part epilog
2562 ; FIJI-LABEL: getresinfo_1d:
2563 ; FIJI: ; %bb.0: ; %main_body
2564 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2565 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2566 ; FIJI-NEXT: ; return to shader part epilog
2568 ; GFX6789-LABEL: getresinfo_1d:
2569 ; GFX6789: ; %bb.0: ; %main_body
2570 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2571 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2572 ; GFX6789-NEXT: ; return to shader part epilog
2574 ; NOPRT-LABEL: getresinfo_1d:
2575 ; NOPRT: ; %bb.0: ; %main_body
2576 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2577 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2578 ; NOPRT-NEXT: ; return to shader part epilog
2580 ; GFX10-LABEL: getresinfo_1d:
2581 ; GFX10: ; %bb.0: ; %main_body
2582 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2583 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2584 ; GFX10-NEXT: ; return to shader part epilog
2586 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2590 define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, i32 %mip) {
2591 ; VERDE-LABEL: getresinfo_2d:
2592 ; VERDE: ; %bb.0: ; %main_body
2593 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2594 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2595 ; VERDE-NEXT: ; return to shader part epilog
2597 ; FIJI-LABEL: getresinfo_2d:
2598 ; FIJI: ; %bb.0: ; %main_body
2599 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2600 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2601 ; FIJI-NEXT: ; return to shader part epilog
2603 ; GFX6789-LABEL: getresinfo_2d:
2604 ; GFX6789: ; %bb.0: ; %main_body
2605 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2606 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2607 ; GFX6789-NEXT: ; return to shader part epilog
2609 ; NOPRT-LABEL: getresinfo_2d:
2610 ; NOPRT: ; %bb.0: ; %main_body
2611 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2612 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2613 ; NOPRT-NEXT: ; return to shader part epilog
2615 ; GFX10-LABEL: getresinfo_2d:
2616 ; GFX10: ; %bb.0: ; %main_body
2617 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2618 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2619 ; GFX10-NEXT: ; return to shader part epilog
2621 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2625 define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, i32 %mip) {
2626 ; VERDE-LABEL: getresinfo_3d:
2627 ; VERDE: ; %bb.0: ; %main_body
2628 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2629 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2630 ; VERDE-NEXT: ; return to shader part epilog
2632 ; FIJI-LABEL: getresinfo_3d:
2633 ; FIJI: ; %bb.0: ; %main_body
2634 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2635 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2636 ; FIJI-NEXT: ; return to shader part epilog
2638 ; GFX6789-LABEL: getresinfo_3d:
2639 ; GFX6789: ; %bb.0: ; %main_body
2640 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2641 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2642 ; GFX6789-NEXT: ; return to shader part epilog
2644 ; NOPRT-LABEL: getresinfo_3d:
2645 ; NOPRT: ; %bb.0: ; %main_body
2646 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2647 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2648 ; NOPRT-NEXT: ; return to shader part epilog
2650 ; GFX10-LABEL: getresinfo_3d:
2651 ; GFX10: ; %bb.0: ; %main_body
2652 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ; encoding: [0x10,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2653 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2654 ; GFX10-NEXT: ; return to shader part epilog
2656 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2660 define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, i32 %mip) {
2661 ; VERDE-LABEL: getresinfo_cube:
2662 ; VERDE: ; %bb.0: ; %main_body
2663 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2664 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2665 ; VERDE-NEXT: ; return to shader part epilog
2667 ; FIJI-LABEL: getresinfo_cube:
2668 ; FIJI: ; %bb.0: ; %main_body
2669 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2670 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2671 ; FIJI-NEXT: ; return to shader part epilog
2673 ; GFX6789-LABEL: getresinfo_cube:
2674 ; GFX6789: ; %bb.0: ; %main_body
2675 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2676 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2677 ; GFX6789-NEXT: ; return to shader part epilog
2679 ; NOPRT-LABEL: getresinfo_cube:
2680 ; NOPRT: ; %bb.0: ; %main_body
2681 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2682 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2683 ; NOPRT-NEXT: ; return to shader part epilog
2685 ; GFX10-LABEL: getresinfo_cube:
2686 ; GFX10: ; %bb.0: ; %main_body
2687 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ; encoding: [0x18,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2688 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2689 ; GFX10-NEXT: ; return to shader part epilog
2691 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2695 define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, i32 %mip) {
2696 ; VERDE-LABEL: getresinfo_1darray:
2697 ; VERDE: ; %bb.0: ; %main_body
2698 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2699 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2700 ; VERDE-NEXT: ; return to shader part epilog
2702 ; FIJI-LABEL: getresinfo_1darray:
2703 ; FIJI: ; %bb.0: ; %main_body
2704 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2705 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2706 ; FIJI-NEXT: ; return to shader part epilog
2708 ; GFX6789-LABEL: getresinfo_1darray:
2709 ; GFX6789: ; %bb.0: ; %main_body
2710 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2711 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2712 ; GFX6789-NEXT: ; return to shader part epilog
2714 ; NOPRT-LABEL: getresinfo_1darray:
2715 ; NOPRT: ; %bb.0: ; %main_body
2716 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2717 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2718 ; NOPRT-NEXT: ; return to shader part epilog
2720 ; GFX10-LABEL: getresinfo_1darray:
2721 ; GFX10: ; %bb.0: ; %main_body
2722 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ; encoding: [0x20,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2723 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2724 ; GFX10-NEXT: ; return to shader part epilog
2726 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2730 define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, i32 %mip) {
2731 ; VERDE-LABEL: getresinfo_2darray:
2732 ; VERDE: ; %bb.0: ; %main_body
2733 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2734 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2735 ; VERDE-NEXT: ; return to shader part epilog
2737 ; FIJI-LABEL: getresinfo_2darray:
2738 ; FIJI: ; %bb.0: ; %main_body
2739 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2740 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2741 ; FIJI-NEXT: ; return to shader part epilog
2743 ; GFX6789-LABEL: getresinfo_2darray:
2744 ; GFX6789: ; %bb.0: ; %main_body
2745 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2746 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2747 ; GFX6789-NEXT: ; return to shader part epilog
2749 ; NOPRT-LABEL: getresinfo_2darray:
2750 ; NOPRT: ; %bb.0: ; %main_body
2751 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2752 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2753 ; NOPRT-NEXT: ; return to shader part epilog
2755 ; GFX10-LABEL: getresinfo_2darray:
2756 ; GFX10: ; %bb.0: ; %main_body
2757 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ; encoding: [0x28,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2758 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2759 ; GFX10-NEXT: ; return to shader part epilog
2761 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2765 define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, i32 %mip) {
2766 ; VERDE-LABEL: getresinfo_2dmsaa:
2767 ; VERDE: ; %bb.0: ; %main_body
2768 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2769 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2770 ; VERDE-NEXT: ; return to shader part epilog
2772 ; FIJI-LABEL: getresinfo_2dmsaa:
2773 ; FIJI: ; %bb.0: ; %main_body
2774 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2775 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2776 ; FIJI-NEXT: ; return to shader part epilog
2778 ; GFX6789-LABEL: getresinfo_2dmsaa:
2779 ; GFX6789: ; %bb.0: ; %main_body
2780 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2781 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2782 ; GFX6789-NEXT: ; return to shader part epilog
2784 ; NOPRT-LABEL: getresinfo_2dmsaa:
2785 ; NOPRT: ; %bb.0: ; %main_body
2786 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm
2787 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2788 ; NOPRT-NEXT: ; return to shader part epilog
2790 ; GFX10-LABEL: getresinfo_2dmsaa:
2791 ; GFX10: ; %bb.0: ; %main_body
2792 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm ; encoding: [0x30,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2793 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2794 ; GFX10-NEXT: ; return to shader part epilog
2796 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2800 define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, i32 %mip) {
2801 ; VERDE-LABEL: getresinfo_2darraymsaa:
2802 ; VERDE: ; %bb.0: ; %main_body
2803 ; VERDE-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2804 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2805 ; VERDE-NEXT: ; return to shader part epilog
2807 ; FIJI-LABEL: getresinfo_2darraymsaa:
2808 ; FIJI: ; %bb.0: ; %main_body
2809 ; FIJI-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2810 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2811 ; FIJI-NEXT: ; return to shader part epilog
2813 ; GFX6789-LABEL: getresinfo_2darraymsaa:
2814 ; GFX6789: ; %bb.0: ; %main_body
2815 ; GFX6789-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2816 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2817 ; GFX6789-NEXT: ; return to shader part epilog
2819 ; NOPRT-LABEL: getresinfo_2darraymsaa:
2820 ; NOPRT: ; %bb.0: ; %main_body
2821 ; NOPRT-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da
2822 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2823 ; NOPRT-NEXT: ; return to shader part epilog
2825 ; GFX10-LABEL: getresinfo_2darraymsaa:
2826 ; GFX10: ; %bb.0: ; %main_body
2827 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm ; encoding: [0x38,0x1f,0x38,0xf0,0x00,0x00,0x00,0x00]
2828 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2829 ; GFX10-NEXT: ; return to shader part epilog
2831 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
2835 define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, i32 %s) {
2836 ; VERDE-LABEL: load_1d_V1:
2837 ; VERDE: ; %bb.0: ; %main_body
2838 ; VERDE-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
2839 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2840 ; VERDE-NEXT: ; return to shader part epilog
2842 ; FIJI-LABEL: load_1d_V1:
2843 ; FIJI: ; %bb.0: ; %main_body
2844 ; FIJI-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
2845 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2846 ; FIJI-NEXT: ; return to shader part epilog
2848 ; GFX6789-LABEL: load_1d_V1:
2849 ; GFX6789: ; %bb.0: ; %main_body
2850 ; GFX6789-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
2851 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2852 ; GFX6789-NEXT: ; return to shader part epilog
2854 ; NOPRT-LABEL: load_1d_V1:
2855 ; NOPRT: ; %bb.0: ; %main_body
2856 ; NOPRT-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm
2857 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2858 ; NOPRT-NEXT: ; return to shader part epilog
2860 ; GFX10-LABEL: load_1d_V1:
2861 ; GFX10: ; %bb.0: ; %main_body
2862 ; GFX10-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x18,0x00,0xf0,0x00,0x00,0x00,0x00]
2863 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2864 ; GFX10-NEXT: ; return to shader part epilog
2866 %v = call float @llvm.amdgcn.image.load.1d.f32.i32(i32 8, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
2870 define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, i32 %s) {
2871 ; VERDE-LABEL: load_1d_V2:
2872 ; VERDE: ; %bb.0: ; %main_body
2873 ; VERDE-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
2874 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2875 ; VERDE-NEXT: ; return to shader part epilog
2877 ; FIJI-LABEL: load_1d_V2:
2878 ; FIJI: ; %bb.0: ; %main_body
2879 ; FIJI-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
2880 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2881 ; FIJI-NEXT: ; return to shader part epilog
2883 ; GFX6789-LABEL: load_1d_V2:
2884 ; GFX6789: ; %bb.0: ; %main_body
2885 ; GFX6789-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
2886 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2887 ; GFX6789-NEXT: ; return to shader part epilog
2889 ; NOPRT-LABEL: load_1d_V2:
2890 ; NOPRT: ; %bb.0: ; %main_body
2891 ; NOPRT-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm
2892 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2893 ; NOPRT-NEXT: ; return to shader part epilog
2895 ; GFX10-LABEL: load_1d_V2:
2896 ; GFX10: ; %bb.0: ; %main_body
2897 ; GFX10-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x19,0x00,0xf0,0x00,0x00,0x00,0x00]
2898 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2899 ; GFX10-NEXT: ; return to shader part epilog
2901 %v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i32(i32 9, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
2905 define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, i32 %s) {
2906 ; VERDE-LABEL: store_1d_V1:
2907 ; VERDE: ; %bb.0: ; %main_body
2908 ; VERDE-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
2909 ; VERDE-NEXT: s_endpgm
2911 ; FIJI-LABEL: store_1d_V1:
2912 ; FIJI: ; %bb.0: ; %main_body
2913 ; FIJI-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
2914 ; FIJI-NEXT: s_endpgm
2916 ; GFX6789-LABEL: store_1d_V1:
2917 ; GFX6789: ; %bb.0: ; %main_body
2918 ; GFX6789-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
2919 ; GFX6789-NEXT: s_endpgm
2921 ; NOPRT-LABEL: store_1d_V1:
2922 ; NOPRT: ; %bb.0: ; %main_body
2923 ; NOPRT-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm
2924 ; NOPRT-NEXT: s_endpgm
2926 ; GFX10-LABEL: store_1d_V1:
2927 ; GFX10: ; %bb.0: ; %main_body
2928 ; GFX10-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x12,0x20,0xf0,0x01,0x00,0x00,0x00]
2929 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2931 call void @llvm.amdgcn.image.store.1d.f32.i32(float %vdata, i32 2, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
2935 define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, i32 %s) {
2936 ; VERDE-LABEL: store_1d_V2:
2937 ; VERDE: ; %bb.0: ; %main_body
2938 ; VERDE-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
2939 ; VERDE-NEXT: s_endpgm
2941 ; FIJI-LABEL: store_1d_V2:
2942 ; FIJI: ; %bb.0: ; %main_body
2943 ; FIJI-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
2944 ; FIJI-NEXT: s_endpgm
2946 ; GFX6789-LABEL: store_1d_V2:
2947 ; GFX6789: ; %bb.0: ; %main_body
2948 ; GFX6789-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
2949 ; GFX6789-NEXT: s_endpgm
2951 ; NOPRT-LABEL: store_1d_V2:
2952 ; NOPRT: ; %bb.0: ; %main_body
2953 ; NOPRT-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm
2954 ; NOPRT-NEXT: s_endpgm
2956 ; GFX10-LABEL: store_1d_V2:
2957 ; GFX10: ; %bb.0: ; %main_body
2958 ; GFX10-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1c,0x20,0xf0,0x02,0x00,0x00,0x00]
2959 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
2961 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)
2965 define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, i32 %s) {
2966 ; VERDE-LABEL: load_1d_glc:
2967 ; VERDE: ; %bb.0: ; %main_body
2968 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
2969 ; VERDE-NEXT: s_waitcnt vmcnt(0)
2970 ; VERDE-NEXT: ; return to shader part epilog
2972 ; FIJI-LABEL: load_1d_glc:
2973 ; FIJI: ; %bb.0: ; %main_body
2974 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
2975 ; FIJI-NEXT: s_waitcnt vmcnt(0)
2976 ; FIJI-NEXT: ; return to shader part epilog
2978 ; GFX6789-LABEL: load_1d_glc:
2979 ; GFX6789: ; %bb.0: ; %main_body
2980 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
2981 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
2982 ; GFX6789-NEXT: ; return to shader part epilog
2984 ; NOPRT-LABEL: load_1d_glc:
2985 ; NOPRT: ; %bb.0: ; %main_body
2986 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc
2987 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
2988 ; NOPRT-NEXT: ; return to shader part epilog
2990 ; GFX10-LABEL: load_1d_glc:
2991 ; GFX10: ; %bb.0: ; %main_body
2992 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc ; encoding: [0x00,0x3f,0x00,0xf0,0x00,0x00,0x00,0x00]
2993 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
2994 ; GFX10-NEXT: ; return to shader part epilog
2996 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
3000 define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, i32 %s) {
3001 ; VERDE-LABEL: load_1d_slc:
3002 ; VERDE: ; %bb.0: ; %main_body
3003 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3004 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3005 ; VERDE-NEXT: ; return to shader part epilog
3007 ; FIJI-LABEL: load_1d_slc:
3008 ; FIJI: ; %bb.0: ; %main_body
3009 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3010 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3011 ; FIJI-NEXT: ; return to shader part epilog
3013 ; GFX6789-LABEL: load_1d_slc:
3014 ; GFX6789: ; %bb.0: ; %main_body
3015 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3016 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3017 ; GFX6789-NEXT: ; return to shader part epilog
3019 ; NOPRT-LABEL: load_1d_slc:
3020 ; NOPRT: ; %bb.0: ; %main_body
3021 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc
3022 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3023 ; NOPRT-NEXT: ; return to shader part epilog
3025 ; GFX10-LABEL: load_1d_slc:
3026 ; GFX10: ; %bb.0: ; %main_body
3027 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc ; encoding: [0x00,0x1f,0x00,0xf2,0x00,0x00,0x00,0x00]
3028 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3029 ; GFX10-NEXT: ; return to shader part epilog
3031 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
3035 define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, i32 %s) {
3036 ; VERDE-LABEL: load_1d_glc_slc:
3037 ; VERDE: ; %bb.0: ; %main_body
3038 ; VERDE-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3039 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3040 ; VERDE-NEXT: ; return to shader part epilog
3042 ; FIJI-LABEL: load_1d_glc_slc:
3043 ; FIJI: ; %bb.0: ; %main_body
3044 ; FIJI-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3045 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3046 ; FIJI-NEXT: ; return to shader part epilog
3048 ; GFX6789-LABEL: load_1d_glc_slc:
3049 ; GFX6789: ; %bb.0: ; %main_body
3050 ; GFX6789-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3051 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3052 ; GFX6789-NEXT: ; return to shader part epilog
3054 ; NOPRT-LABEL: load_1d_glc_slc:
3055 ; NOPRT: ; %bb.0: ; %main_body
3056 ; NOPRT-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc
3057 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3058 ; NOPRT-NEXT: ; return to shader part epilog
3060 ; GFX10-LABEL: load_1d_glc_slc:
3061 ; GFX10: ; %bb.0: ; %main_body
3062 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc ; encoding: [0x00,0x3f,0x00,0xf2,0x00,0x00,0x00,0x00]
3063 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3064 ; GFX10-NEXT: ; return to shader part epilog
3066 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
3070 define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
3071 ; VERDE-LABEL: store_1d_glc:
3072 ; VERDE: ; %bb.0: ; %main_body
3073 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3074 ; VERDE-NEXT: s_endpgm
3076 ; FIJI-LABEL: store_1d_glc:
3077 ; FIJI: ; %bb.0: ; %main_body
3078 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3079 ; FIJI-NEXT: s_endpgm
3081 ; GFX6789-LABEL: store_1d_glc:
3082 ; GFX6789: ; %bb.0: ; %main_body
3083 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3084 ; GFX6789-NEXT: s_endpgm
3086 ; NOPRT-LABEL: store_1d_glc:
3087 ; NOPRT: ; %bb.0: ; %main_body
3088 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc
3089 ; NOPRT-NEXT: s_endpgm
3091 ; GFX10-LABEL: store_1d_glc:
3092 ; GFX10: ; %bb.0: ; %main_body
3093 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc ; encoding: [0x00,0x3f,0x20,0xf0,0x04,0x00,0x00,0x00]
3094 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
3096 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)
3100 define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
3101 ; VERDE-LABEL: store_1d_slc:
3102 ; VERDE: ; %bb.0: ; %main_body
3103 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3104 ; VERDE-NEXT: s_endpgm
3106 ; FIJI-LABEL: store_1d_slc:
3107 ; FIJI: ; %bb.0: ; %main_body
3108 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3109 ; FIJI-NEXT: s_endpgm
3111 ; GFX6789-LABEL: store_1d_slc:
3112 ; GFX6789: ; %bb.0: ; %main_body
3113 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3114 ; GFX6789-NEXT: s_endpgm
3116 ; NOPRT-LABEL: store_1d_slc:
3117 ; NOPRT: ; %bb.0: ; %main_body
3118 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc
3119 ; NOPRT-NEXT: s_endpgm
3121 ; GFX10-LABEL: store_1d_slc:
3122 ; GFX10: ; %bb.0: ; %main_body
3123 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc ; encoding: [0x00,0x1f,0x20,0xf2,0x04,0x00,0x00,0x00]
3124 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
3126 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)
3130 define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
3131 ; VERDE-LABEL: store_1d_glc_slc:
3132 ; VERDE: ; %bb.0: ; %main_body
3133 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3134 ; VERDE-NEXT: s_endpgm
3136 ; FIJI-LABEL: store_1d_glc_slc:
3137 ; FIJI: ; %bb.0: ; %main_body
3138 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3139 ; FIJI-NEXT: s_endpgm
3141 ; GFX6789-LABEL: store_1d_glc_slc:
3142 ; GFX6789: ; %bb.0: ; %main_body
3143 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3144 ; GFX6789-NEXT: s_endpgm
3146 ; NOPRT-LABEL: store_1d_glc_slc:
3147 ; NOPRT: ; %bb.0: ; %main_body
3148 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc
3149 ; NOPRT-NEXT: s_endpgm
3151 ; GFX10-LABEL: store_1d_glc_slc:
3152 ; GFX10: ; %bb.0: ; %main_body
3153 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc ; encoding: [0x00,0x3f,0x20,0xf2,0x04,0x00,0x00,0x00]
3154 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
3156 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)
3160 define amdgpu_ps <3 x float> @getresinfo_dmask7(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) {
3161 ; GFX6-LABEL: getresinfo_dmask7:
3162 ; GFX6: ; %bb.0: ; %main_body
3163 ; GFX6-NEXT: s_mov_b32 s0, s2
3164 ; GFX6-NEXT: s_mov_b32 s1, s3
3165 ; GFX6-NEXT: s_mov_b32 s2, s4
3166 ; GFX6-NEXT: s_mov_b32 s3, s5
3167 ; GFX6-NEXT: s_mov_b32 s4, s6
3168 ; GFX6-NEXT: s_mov_b32 s5, s7
3169 ; GFX6-NEXT: s_mov_b32 s6, s8
3170 ; GFX6-NEXT: s_mov_b32 s7, s9
3171 ; GFX6-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3172 ; GFX6-NEXT: s_waitcnt vmcnt(0)
3173 ; GFX6-NEXT: ; return to shader part epilog
3175 ; GFX8-LABEL: getresinfo_dmask7:
3176 ; GFX8: ; %bb.0: ; %main_body
3177 ; GFX8-NEXT: s_mov_b32 s0, s2
3178 ; GFX8-NEXT: s_mov_b32 s1, s3
3179 ; GFX8-NEXT: s_mov_b32 s2, s4
3180 ; GFX8-NEXT: s_mov_b32 s3, s5
3181 ; GFX8-NEXT: s_mov_b32 s4, s6
3182 ; GFX8-NEXT: s_mov_b32 s5, s7
3183 ; GFX8-NEXT: s_mov_b32 s6, s8
3184 ; GFX8-NEXT: s_mov_b32 s7, s9
3185 ; GFX8-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3186 ; GFX8-NEXT: s_waitcnt vmcnt(0)
3187 ; GFX8-NEXT: ; return to shader part epilog
3189 ; VERDE-LABEL: getresinfo_dmask7:
3190 ; VERDE: ; %bb.0: ; %main_body
3191 ; VERDE-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3192 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3193 ; VERDE-NEXT: ; return to shader part epilog
3195 ; FIJI-LABEL: getresinfo_dmask7:
3196 ; FIJI: ; %bb.0: ; %main_body
3197 ; FIJI-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3198 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3199 ; FIJI-NEXT: ; return to shader part epilog
3201 ; GFX6789-LABEL: getresinfo_dmask7:
3202 ; GFX6789: ; %bb.0: ; %main_body
3203 ; GFX6789-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3204 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3205 ; GFX6789-NEXT: ; return to shader part epilog
3207 ; NOPRT-LABEL: getresinfo_dmask7:
3208 ; NOPRT: ; %bb.0: ; %main_body
3209 ; NOPRT-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 unorm
3210 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3211 ; NOPRT-NEXT: ; return to shader part epilog
3213 ; GFX10-LABEL: getresinfo_dmask7:
3214 ; GFX10: ; %bb.0: ; %main_body
3215 ; GFX10-NEXT: image_get_resinfo v[0:2], v0, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x17,0x38,0xf0,0x00,0x00,0x00,0x00]
3216 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3217 ; GFX10-NEXT: ; return to shader part epilog
3219 %r = call <3 x float> @llvm.amdgcn.image.getresinfo.1d.v3f32.i32(i32 7, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3223 define amdgpu_ps <2 x float> @getresinfo_dmask3(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) {
3224 ; GFX6-LABEL: getresinfo_dmask3:
3225 ; GFX6: ; %bb.0: ; %main_body
3226 ; GFX6-NEXT: s_mov_b32 s0, s2
3227 ; GFX6-NEXT: s_mov_b32 s1, s3
3228 ; GFX6-NEXT: s_mov_b32 s2, s4
3229 ; GFX6-NEXT: s_mov_b32 s3, s5
3230 ; GFX6-NEXT: s_mov_b32 s4, s6
3231 ; GFX6-NEXT: s_mov_b32 s5, s7
3232 ; GFX6-NEXT: s_mov_b32 s6, s8
3233 ; GFX6-NEXT: s_mov_b32 s7, s9
3234 ; GFX6-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3235 ; GFX6-NEXT: s_waitcnt vmcnt(0)
3236 ; GFX6-NEXT: ; return to shader part epilog
3238 ; GFX8-LABEL: getresinfo_dmask3:
3239 ; GFX8: ; %bb.0: ; %main_body
3240 ; GFX8-NEXT: s_mov_b32 s0, s2
3241 ; GFX8-NEXT: s_mov_b32 s1, s3
3242 ; GFX8-NEXT: s_mov_b32 s2, s4
3243 ; GFX8-NEXT: s_mov_b32 s3, s5
3244 ; GFX8-NEXT: s_mov_b32 s4, s6
3245 ; GFX8-NEXT: s_mov_b32 s5, s7
3246 ; GFX8-NEXT: s_mov_b32 s6, s8
3247 ; GFX8-NEXT: s_mov_b32 s7, s9
3248 ; GFX8-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3249 ; GFX8-NEXT: s_waitcnt vmcnt(0)
3250 ; GFX8-NEXT: ; return to shader part epilog
3252 ; VERDE-LABEL: getresinfo_dmask3:
3253 ; VERDE: ; %bb.0: ; %main_body
3254 ; VERDE-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3255 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3256 ; VERDE-NEXT: ; return to shader part epilog
3258 ; FIJI-LABEL: getresinfo_dmask3:
3259 ; FIJI: ; %bb.0: ; %main_body
3260 ; FIJI-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3261 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3262 ; FIJI-NEXT: ; return to shader part epilog
3264 ; GFX6789-LABEL: getresinfo_dmask3:
3265 ; GFX6789: ; %bb.0: ; %main_body
3266 ; GFX6789-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3267 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3268 ; GFX6789-NEXT: ; return to shader part epilog
3270 ; NOPRT-LABEL: getresinfo_dmask3:
3271 ; NOPRT: ; %bb.0: ; %main_body
3272 ; NOPRT-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 unorm
3273 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3274 ; NOPRT-NEXT: ; return to shader part epilog
3276 ; GFX10-LABEL: getresinfo_dmask3:
3277 ; GFX10: ; %bb.0: ; %main_body
3278 ; GFX10-NEXT: image_get_resinfo v[0:1], v0, s[0:7] dmask:0x3 dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x13,0x38,0xf0,0x00,0x00,0x00,0x00]
3279 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3280 ; GFX10-NEXT: ; return to shader part epilog
3282 %r = call <2 x float> @llvm.amdgcn.image.getresinfo.1d.v2f32.i32(i32 3, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3286 define amdgpu_ps float @getresinfo_dmask1(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) {
3287 ; GFX6-LABEL: getresinfo_dmask1:
3288 ; GFX6: ; %bb.0: ; %main_body
3289 ; GFX6-NEXT: s_mov_b32 s0, s2
3290 ; GFX6-NEXT: s_mov_b32 s1, s3
3291 ; GFX6-NEXT: s_mov_b32 s2, s4
3292 ; GFX6-NEXT: s_mov_b32 s3, s5
3293 ; GFX6-NEXT: s_mov_b32 s4, s6
3294 ; GFX6-NEXT: s_mov_b32 s5, s7
3295 ; GFX6-NEXT: s_mov_b32 s6, s8
3296 ; GFX6-NEXT: s_mov_b32 s7, s9
3297 ; GFX6-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3298 ; GFX6-NEXT: s_waitcnt vmcnt(0)
3299 ; GFX6-NEXT: ; return to shader part epilog
3301 ; GFX8-LABEL: getresinfo_dmask1:
3302 ; GFX8: ; %bb.0: ; %main_body
3303 ; GFX8-NEXT: s_mov_b32 s0, s2
3304 ; GFX8-NEXT: s_mov_b32 s1, s3
3305 ; GFX8-NEXT: s_mov_b32 s2, s4
3306 ; GFX8-NEXT: s_mov_b32 s3, s5
3307 ; GFX8-NEXT: s_mov_b32 s4, s6
3308 ; GFX8-NEXT: s_mov_b32 s5, s7
3309 ; GFX8-NEXT: s_mov_b32 s6, s8
3310 ; GFX8-NEXT: s_mov_b32 s7, s9
3311 ; GFX8-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3312 ; GFX8-NEXT: s_waitcnt vmcnt(0)
3313 ; GFX8-NEXT: ; return to shader part epilog
3315 ; VERDE-LABEL: getresinfo_dmask1:
3316 ; VERDE: ; %bb.0: ; %main_body
3317 ; VERDE-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3318 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3319 ; VERDE-NEXT: ; return to shader part epilog
3321 ; FIJI-LABEL: getresinfo_dmask1:
3322 ; FIJI: ; %bb.0: ; %main_body
3323 ; FIJI-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3324 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3325 ; FIJI-NEXT: ; return to shader part epilog
3327 ; GFX6789-LABEL: getresinfo_dmask1:
3328 ; GFX6789: ; %bb.0: ; %main_body
3329 ; GFX6789-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3330 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3331 ; GFX6789-NEXT: ; return to shader part epilog
3333 ; NOPRT-LABEL: getresinfo_dmask1:
3334 ; NOPRT: ; %bb.0: ; %main_body
3335 ; NOPRT-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 unorm
3336 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3337 ; NOPRT-NEXT: ; return to shader part epilog
3339 ; GFX10-LABEL: getresinfo_dmask1:
3340 ; GFX10: ; %bb.0: ; %main_body
3341 ; GFX10-NEXT: image_get_resinfo v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x11,0x38,0xf0,0x00,0x00,0x00,0x00]
3342 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3343 ; GFX10-NEXT: ; return to shader part epilog
3345 %r = call float @llvm.amdgcn.image.getresinfo.1d.f32.i32(i32 1, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3349 define amdgpu_ps <4 x float> @getresinfo_dmask0(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %mip) #0 {
3350 ; VERDE-LABEL: getresinfo_dmask0:
3351 ; VERDE: ; %bb.0: ; %main_body
3352 ; VERDE-NEXT: ; return to shader part epilog
3354 ; FIJI-LABEL: getresinfo_dmask0:
3355 ; FIJI: ; %bb.0: ; %main_body
3356 ; FIJI-NEXT: ; return to shader part epilog
3358 ; GFX6789-LABEL: getresinfo_dmask0:
3359 ; GFX6789: ; %bb.0: ; %main_body
3360 ; GFX6789-NEXT: ; return to shader part epilog
3362 ; NOPRT-LABEL: getresinfo_dmask0:
3363 ; NOPRT: ; %bb.0: ; %main_body
3364 ; NOPRT-NEXT: ; return to shader part epilog
3366 ; GFX10-LABEL: getresinfo_dmask0:
3367 ; GFX10: ; %bb.0: ; %main_body
3368 ; GFX10-NEXT: ; return to shader part epilog
3370 %r = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32 0, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
3375 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 {
3376 ; VERDE-LABEL: image_store_wait:
3377 ; VERDE: ; %bb.0: ; %main_body
3378 ; VERDE-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
3379 ; VERDE-NEXT: s_waitcnt expcnt(0)
3380 ; VERDE-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
3381 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3382 ; VERDE-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
3383 ; VERDE-NEXT: s_endpgm
3385 ; FIJI-LABEL: image_store_wait:
3386 ; FIJI: ; %bb.0: ; %main_body
3387 ; FIJI-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
3388 ; FIJI-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
3389 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3390 ; FIJI-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
3391 ; FIJI-NEXT: s_endpgm
3393 ; GFX6789-LABEL: image_store_wait:
3394 ; GFX6789: ; %bb.0: ; %main_body
3395 ; GFX6789-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
3396 ; GFX6789-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
3397 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3398 ; GFX6789-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
3399 ; GFX6789-NEXT: s_endpgm
3401 ; NOPRT-LABEL: image_store_wait:
3402 ; NOPRT: ; %bb.0: ; %main_body
3403 ; NOPRT-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
3404 ; NOPRT-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
3405 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3406 ; NOPRT-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
3407 ; NOPRT-NEXT: s_endpgm
3409 ; GFX10-LABEL: image_store_wait:
3410 ; GFX10: ; %bb.0: ; %main_body
3411 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x20,0xf0,0x04,0x00,0x00,0x00]
3412 ; GFX10-NEXT: image_load v[0:3], v4, s[8:15] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x00,0xf0,0x04,0x00,0x02,0x00]
3413 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3414 ; GFX10-NEXT: image_store v[0:3], v4, s[16:23] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x20,0xf0,0x04,0x00,0x04,0x00]
3415 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
3417 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)
3418 %data = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %arg4, <8 x i32> %arg1, i32 0, i32 0)
3419 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)
3423 define amdgpu_ps float @image_load_mmo(<8 x i32> inreg %rsrc, float addrspace(3)* %lds, <2 x i32> %c) #0 {
3424 ; VERDE-LABEL: image_load_mmo:
3426 ; VERDE-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
3427 ; VERDE-NEXT: v_mov_b32_e32 v3, 0
3428 ; VERDE-NEXT: s_mov_b32 m0, -1
3429 ; VERDE-NEXT: ds_write_b32 v0, v3
3430 ; VERDE-NEXT: v_add_i32_e32 v0, vcc, 16, v0
3431 ; VERDE-NEXT: ds_write_b32 v0, v3
3432 ; VERDE-NEXT: s_waitcnt vmcnt(0)
3433 ; VERDE-NEXT: v_mov_b32_e32 v0, v1
3434 ; VERDE-NEXT: s_waitcnt lgkmcnt(0)
3435 ; VERDE-NEXT: ; return to shader part epilog
3437 ; FIJI-LABEL: image_load_mmo:
3439 ; FIJI-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
3440 ; FIJI-NEXT: v_mov_b32_e32 v3, 0
3441 ; FIJI-NEXT: s_mov_b32 m0, -1
3442 ; FIJI-NEXT: ds_write2_b32 v0, v3, v3 offset1:4
3443 ; FIJI-NEXT: s_waitcnt vmcnt(0)
3444 ; FIJI-NEXT: v_mov_b32_e32 v0, v1
3445 ; FIJI-NEXT: s_waitcnt lgkmcnt(0)
3446 ; FIJI-NEXT: ; return to shader part epilog
3448 ; GFX6789-LABEL: image_load_mmo:
3450 ; GFX6789-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
3451 ; GFX6789-NEXT: v_mov_b32_e32 v3, 0
3452 ; GFX6789-NEXT: ds_write2_b32 v0, v3, v3 offset1:4
3453 ; GFX6789-NEXT: s_waitcnt vmcnt(0)
3454 ; GFX6789-NEXT: v_mov_b32_e32 v0, v1
3455 ; GFX6789-NEXT: s_waitcnt lgkmcnt(0)
3456 ; GFX6789-NEXT: ; return to shader part epilog
3458 ; NOPRT-LABEL: image_load_mmo:
3460 ; NOPRT-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 unorm
3461 ; NOPRT-NEXT: v_mov_b32_e32 v3, 0
3462 ; NOPRT-NEXT: ds_write2_b32 v0, v3, v3 offset1:4
3463 ; NOPRT-NEXT: s_waitcnt vmcnt(0)
3464 ; NOPRT-NEXT: v_mov_b32_e32 v0, v1
3465 ; NOPRT-NEXT: s_waitcnt lgkmcnt(0)
3466 ; NOPRT-NEXT: ; return to shader part epilog
3468 ; GFX10-LABEL: image_load_mmo:
3470 ; GFX10-NEXT: image_load v1, v[1:2], s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x11,0x00,0xf0,0x01,0x01,0x00,0x00]
3471 ; GFX10-NEXT: v_mov_b32_e32 v2, 0 ; encoding: [0x80,0x02,0x04,0x7e]
3472 ; GFX10-NEXT: ds_write2_b32 v0, v2, v2 offset1:4 ; encoding: [0x00,0x04,0x38,0xd8,0x00,0x02,0x02,0x00]
3473 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
3474 ; GFX10-NEXT: v_mov_b32_e32 v0, v1 ; encoding: [0x01,0x03,0x00,0x7e]
3475 ; GFX10-NEXT: s_waitcnt lgkmcnt(0) ; encoding: [0x7f,0xc0,0x8c,0xbf]
3476 ; GFX10-NEXT: ; return to shader part epilog
3477 store float 0.000000e+00, float addrspace(3)* %lds
3478 %c0 = extractelement <2 x i32> %c, i32 0
3479 %c1 = extractelement <2 x i32> %c, i32 1
3480 %tex = call float @llvm.amdgcn.image.load.2d.f32.i32(i32 1, i32 %c0, i32 %c1, <8 x i32> %rsrc, i32 0, i32 0)
3481 %tmp2 = getelementptr float, float addrspace(3)* %lds, i32 4
3482 store float 0.000000e+00, float addrspace(3)* %tmp2
3486 declare <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #1
3487 declare {float,i32} @llvm.amdgcn.image.load.1d.f32i32.i32(i32, i32, <8 x i32>, i32, i32) #1
3488 declare {<2 x float>,i32} @llvm.amdgcn.image.load.1d.v2f32i32.i32(i32, i32, <8 x i32>, i32, i32) #1
3489 declare {<4 x float>,i32} @llvm.amdgcn.image.load.1d.v4f32i32.i32(i32, i32, <8 x i32>, i32, i32) #1
3490 declare <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3491 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2d.v4f32i32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3492 declare <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3493 declare {<4 x float>,i32} @llvm.amdgcn.image.load.3d.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3494 declare <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3495 declare {<4 x float>,i32} @llvm.amdgcn.image.load.cube.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3496 declare <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3497 declare {<4 x float>,i32} @llvm.amdgcn.image.load.1darray.v4f32i32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3498 declare <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3499 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2darray.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3500 declare <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3501 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2dmsaa.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3502 declare <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3503 declare {<4 x float>,i32} @llvm.amdgcn.image.load.2darraymsaa.v4f32i32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3505 declare <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3506 declare <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3507 declare {<4 x float>,i32} @llvm.amdgcn.image.load.mip.1d.v4f32i32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3508 declare {<4 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v4f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3509 declare {<2 x float>,i32} @llvm.amdgcn.image.load.mip.2d.v2f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3510 declare {float,i32} @llvm.amdgcn.image.load.mip.2d.f32i32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3511 declare <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3512 declare <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3513 declare <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i32(i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3514 declare <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i32(i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #1
3516 declare void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float>, i32, i32, <8 x i32>, i32, i32) #0
3517 declare void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float>, i32, i32, i32, <8 x i32>, i32, i32) #0
3518 declare void @llvm.amdgcn.image.store.3d.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3519 declare void @llvm.amdgcn.image.store.cube.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3520 declare void @llvm.amdgcn.image.store.1darray.v4f32.i32(<4 x float>, i32, i32, i32, <8 x i32>, i32, i32) #0
3521 declare void @llvm.amdgcn.image.store.2darray.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3522 declare void @llvm.amdgcn.image.store.2dmsaa.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3523 declare void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3525 declare void @llvm.amdgcn.image.store.mip.1d.v4f32.i32(<4 x float>, i32, i32, i32, <8 x i32>, i32, i32) #0
3526 declare void @llvm.amdgcn.image.store.mip.2d.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3527 declare void @llvm.amdgcn.image.store.mip.3d.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3528 declare void @llvm.amdgcn.image.store.mip.cube.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3529 declare void @llvm.amdgcn.image.store.mip.1darray.v4f32.i32(<4 x float>, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3530 declare void @llvm.amdgcn.image.store.mip.2darray.v4f32.i32(<4 x float>, i32, i32, i32, i32, i32, <8 x i32>, i32, i32) #0
3532 declare <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3533 declare <3 x float> @llvm.amdgcn.image.getresinfo.1d.v3f32.i32(i32 immarg, i32, <8 x i32>, i32 immarg, i32 immarg) #1
3534 declare <2 x float> @llvm.amdgcn.image.getresinfo.1d.v2f32.i32(i32 immarg, i32, <8 x i32>, i32 immarg, i32 immarg) #1
3535 declare float @llvm.amdgcn.image.getresinfo.1d.f32.i32(i32 immarg, i32, <8 x i32>, i32 immarg, i32 immarg) #1
3536 declare <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3537 declare <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3538 declare <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3539 declare <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3540 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3541 declare <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3542 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i32(i32, i32, <8 x i32>, i32, i32) #2
3544 declare float @llvm.amdgcn.image.load.1d.f32.i32(i32, i32, <8 x i32>, i32, i32) #1
3545 declare float @llvm.amdgcn.image.load.2d.f32.i32(i32, i32, i32, <8 x i32>, i32, i32) #1
3546 declare <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i32(i32, i32, <8 x i32>, i32, i32) #1
3547 declare void @llvm.amdgcn.image.store.1d.f32.i32(float, i32, i32, <8 x i32>, i32, i32) #0
3548 declare void @llvm.amdgcn.image.store.1d.v2f32.i32(<2 x float>, i32, i32, <8 x i32>, i32, i32) #0
3550 attributes #0 = { nounwind }
3551 attributes #1 = { nounwind readonly }
3552 attributes #2 = { nounwind readnone }