1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX9 %s
3 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX10 %s
4 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX11 %s
5 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX12 %s
7 define amdgpu_ps <4 x float> @load_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
9 ; GFX9: ; %bb.0: ; %main_body
10 ; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00]
11 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
12 ; GFX9-NEXT: ; return to shader part epilog
14 ; GFX10-LABEL: load_1d:
15 ; GFX10: ; %bb.0: ; %main_body
16 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
17 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
18 ; GFX10-NEXT: ; return to shader part epilog
20 ; GFX11-LABEL: load_1d:
21 ; GFX11: ; %bb.0: ; %main_body
22 ; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
23 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
24 ; GFX11-NEXT: ; return to shader part epilog
26 ; GFX12-LABEL: load_1d:
27 ; GFX12: ; %bb.0: ; %main_body
28 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
29 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
30 ; GFX12-NEXT: ; return to shader part epilog
32 %s = extractelement <2 x i16> %coords, i32 0
33 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
37 define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
38 ; GFX9-LABEL: load_2d:
39 ; GFX9: ; %bb.0: ; %main_body
40 ; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00]
41 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
42 ; GFX9-NEXT: ; return to shader part epilog
44 ; GFX10-LABEL: load_2d:
45 ; GFX10: ; %bb.0: ; %main_body
46 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
47 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
48 ; GFX10-NEXT: ; return to shader part epilog
50 ; GFX11-LABEL: load_2d:
51 ; GFX11: ; %bb.0: ; %main_body
52 ; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
53 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
54 ; GFX11-NEXT: ; return to shader part epilog
56 ; GFX12-LABEL: load_2d:
57 ; GFX12: ; %bb.0: ; %main_body
58 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
59 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
60 ; GFX12-NEXT: ; return to shader part epilog
62 %s = extractelement <2 x i16> %coords, i32 0
63 %t = extractelement <2 x i16> %coords, i32 1
64 %v = call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16(i32 15, i16 %s, i16 %t, <8 x i32> %rsrc, i32 0, i32 0)
68 define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
69 ; GFX9-LABEL: load_3d:
70 ; GFX9: ; %bb.0: ; %main_body
71 ; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00]
72 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
73 ; GFX9-NEXT: ; return to shader part epilog
75 ; GFX10-LABEL: load_3d:
76 ; GFX10: ; %bb.0: ; %main_body
77 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
78 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
79 ; GFX10-NEXT: ; return to shader part epilog
81 ; GFX11-LABEL: load_3d:
82 ; GFX11: ; %bb.0: ; %main_body
83 ; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
84 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
85 ; GFX11-NEXT: ; return to shader part epilog
87 ; GFX12-LABEL: load_3d:
88 ; GFX12: ; %bb.0: ; %main_body
89 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
90 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
91 ; GFX12-NEXT: ; return to shader part epilog
93 %s = extractelement <2 x i16> %coords_lo, i32 0
94 %t = extractelement <2 x i16> %coords_lo, i32 1
95 %r = extractelement <2 x i16> %coords_hi, i32 0
96 %v = call <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %r, <8 x i32> %rsrc, i32 0, i32 0)
100 define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
101 ; GFX9-LABEL: load_cube:
102 ; GFX9: ; %bb.0: ; %main_body
103 ; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00]
104 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
105 ; GFX9-NEXT: ; return to shader part epilog
107 ; GFX10-LABEL: load_cube:
108 ; GFX10: ; %bb.0: ; %main_body
109 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
110 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
111 ; GFX10-NEXT: ; return to shader part epilog
113 ; GFX11-LABEL: load_cube:
114 ; GFX11: ; %bb.0: ; %main_body
115 ; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
116 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
117 ; GFX11-NEXT: ; return to shader part epilog
119 ; GFX12-LABEL: load_cube:
120 ; GFX12: ; %bb.0: ; %main_body
121 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
122 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
123 ; GFX12-NEXT: ; return to shader part epilog
125 %s = extractelement <2 x i16> %coords_lo, i32 0
126 %t = extractelement <2 x i16> %coords_lo, i32 1
127 %slice = extractelement <2 x i16> %coords_hi, i32 0
128 %v = call <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0)
132 define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
133 ; GFX9-LABEL: load_1darray:
134 ; GFX9: ; %bb.0: ; %main_body
135 ; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00]
136 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
137 ; GFX9-NEXT: ; return to shader part epilog
139 ; GFX10-LABEL: load_1darray:
140 ; GFX10: ; %bb.0: ; %main_body
141 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
142 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
143 ; GFX10-NEXT: ; return to shader part epilog
145 ; GFX11-LABEL: load_1darray:
146 ; GFX11: ; %bb.0: ; %main_body
147 ; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
148 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
149 ; GFX11-NEXT: ; return to shader part epilog
151 ; GFX12-LABEL: load_1darray:
152 ; GFX12: ; %bb.0: ; %main_body
153 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
154 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
155 ; GFX12-NEXT: ; return to shader part epilog
157 %s = extractelement <2 x i16> %coords, i32 0
158 %slice = extractelement <2 x i16> %coords, i32 1
159 %v = call <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i16(i32 15, i16 %s, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0)
163 define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
164 ; GFX9-LABEL: load_2darray:
165 ; GFX9: ; %bb.0: ; %main_body
166 ; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00]
167 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
168 ; GFX9-NEXT: ; return to shader part epilog
170 ; GFX10-LABEL: load_2darray:
171 ; GFX10: ; %bb.0: ; %main_body
172 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
173 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
174 ; GFX10-NEXT: ; return to shader part epilog
176 ; GFX11-LABEL: load_2darray:
177 ; GFX11: ; %bb.0: ; %main_body
178 ; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
179 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
180 ; GFX11-NEXT: ; return to shader part epilog
182 ; GFX12-LABEL: load_2darray:
183 ; GFX12: ; %bb.0: ; %main_body
184 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
185 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
186 ; GFX12-NEXT: ; return to shader part epilog
188 %s = extractelement <2 x i16> %coords_lo, i32 0
189 %t = extractelement <2 x i16> %coords_lo, i32 1
190 %slice = extractelement <2 x i16> %coords_hi, i32 0
191 %v = call <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0)
195 define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
196 ; GFX9-LABEL: load_2dmsaa:
197 ; GFX9: ; %bb.0: ; %main_body
198 ; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00]
199 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
200 ; GFX9-NEXT: ; return to shader part epilog
202 ; GFX10-LABEL: load_2dmsaa:
203 ; GFX10: ; %bb.0: ; %main_body
204 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x30,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
205 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
206 ; GFX10-NEXT: ; return to shader part epilog
208 ; GFX11-LABEL: load_2dmsaa:
209 ; GFX11: ; %bb.0: ; %main_body
210 ; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x98,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
211 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
212 ; GFX11-NEXT: ; return to shader part epilog
214 ; GFX12-LABEL: load_2dmsaa:
215 ; GFX12: ; %bb.0: ; %main_body
216 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16 ; encoding: [0x46,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
217 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
218 ; GFX12-NEXT: ; return to shader part epilog
220 %s = extractelement <2 x i16> %coords_lo, i32 0
221 %t = extractelement <2 x i16> %coords_lo, i32 1
222 %fragid = extractelement <2 x i16> %coords_hi, i32 0
223 %v = call <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
227 define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
228 ; GFX9-LABEL: load_2darraymsaa:
229 ; GFX9: ; %bb.0: ; %main_body
230 ; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00]
231 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
232 ; GFX9-NEXT: ; return to shader part epilog
234 ; GFX10-LABEL: load_2darraymsaa:
235 ; GFX10: ; %bb.0: ; %main_body
236 ; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x38,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40]
237 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
238 ; GFX10-NEXT: ; return to shader part epilog
240 ; GFX11-LABEL: load_2darraymsaa:
241 ; GFX11: ; %bb.0: ; %main_body
242 ; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x9c,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00]
243 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
244 ; GFX11-NEXT: ; return to shader part epilog
246 ; GFX12-LABEL: load_2darraymsaa:
247 ; GFX12: ; %bb.0: ; %main_body
248 ; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16 ; encoding: [0x47,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
249 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
250 ; GFX12-NEXT: ; return to shader part epilog
252 %s = extractelement <2 x i16> %coords_lo, i32 0
253 %t = extractelement <2 x i16> %coords_lo, i32 1
254 %slice = extractelement <2 x i16> %coords_hi, i32 0
255 %fragid = extractelement <2 x i16> %coords_hi, i32 1
256 %v = call <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
260 define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
261 ; GFX9-LABEL: load_mip_1d:
262 ; GFX9: ; %bb.0: ; %main_body
263 ; GFX9-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x04,0xf0,0x00,0x00,0x00,0x00]
264 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
265 ; GFX9-NEXT: ; return to shader part epilog
267 ; GFX10-LABEL: load_mip_1d:
268 ; GFX10: ; %bb.0: ; %main_body
269 ; GFX10-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40]
270 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
271 ; GFX10-NEXT: ; return to shader part epilog
273 ; GFX11-LABEL: load_mip_1d:
274 ; GFX11: ; %bb.0: ; %main_body
275 ; GFX11-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00]
276 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
277 ; GFX11-NEXT: ; return to shader part epilog
279 ; GFX12-LABEL: load_mip_1d:
280 ; GFX12: ; %bb.0: ; %main_body
281 ; GFX12-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
282 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
283 ; GFX12-NEXT: ; return to shader part epilog
285 %s = extractelement <2 x i16> %coords, i32 0
286 %mip = extractelement <2 x i16> %coords, i32 1
287 %v = call <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16(i32 15, i16 %s, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
291 define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
292 ; GFX9-LABEL: load_mip_2d:
293 ; GFX9: ; %bb.0: ; %main_body
294 ; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x04,0xf0,0x00,0x00,0x00,0x00]
295 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
296 ; GFX9-NEXT: ; return to shader part epilog
298 ; GFX10-LABEL: load_mip_2d:
299 ; GFX10: ; %bb.0: ; %main_body
300 ; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40]
301 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
302 ; GFX10-NEXT: ; return to shader part epilog
304 ; GFX11-LABEL: load_mip_2d:
305 ; GFX11: ; %bb.0: ; %main_body
306 ; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00]
307 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
308 ; GFX11-NEXT: ; return to shader part epilog
310 ; GFX12-LABEL: load_mip_2d:
311 ; GFX12: ; %bb.0: ; %main_body
312 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
313 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
314 ; GFX12-NEXT: ; return to shader part epilog
316 %s = extractelement <2 x i16> %coords_lo, i32 0
317 %t = extractelement <2 x i16> %coords_lo, i32 1
318 %mip = extractelement <2 x i16> %coords_hi, i32 0
319 %v = call <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
323 define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
324 ; GFX9-LABEL: load_mip_3d:
325 ; GFX9: ; %bb.0: ; %main_body
326 ; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x04,0xf0,0x00,0x00,0x00,0x00]
327 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
328 ; GFX9-NEXT: ; return to shader part epilog
330 ; GFX10-LABEL: load_mip_3d:
331 ; GFX10: ; %bb.0: ; %main_body
332 ; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40]
333 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
334 ; GFX10-NEXT: ; return to shader part epilog
336 ; GFX11-LABEL: load_mip_3d:
337 ; GFX11: ; %bb.0: ; %main_body
338 ; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00]
339 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
340 ; GFX11-NEXT: ; return to shader part epilog
342 ; GFX12-LABEL: load_mip_3d:
343 ; GFX12: ; %bb.0: ; %main_body
344 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
345 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
346 ; GFX12-NEXT: ; return to shader part epilog
348 %s = extractelement <2 x i16> %coords_lo, i32 0
349 %t = extractelement <2 x i16> %coords_lo, i32 1
350 %r = extractelement <2 x i16> %coords_hi, i32 0
351 %mip = extractelement <2 x i16> %coords_hi, i32 1
352 %v = call <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %r, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
356 define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
357 ; GFX9-LABEL: load_mip_cube:
358 ; GFX9: ; %bb.0: ; %main_body
359 ; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x04,0xf0,0x00,0x00,0x00,0x00]
360 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
361 ; GFX9-NEXT: ; return to shader part epilog
363 ; GFX10-LABEL: load_mip_cube:
364 ; GFX10: ; %bb.0: ; %main_body
365 ; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40]
366 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
367 ; GFX10-NEXT: ; return to shader part epilog
369 ; GFX11-LABEL: load_mip_cube:
370 ; GFX11: ; %bb.0: ; %main_body
371 ; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00]
372 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
373 ; GFX11-NEXT: ; return to shader part epilog
375 ; GFX12-LABEL: load_mip_cube:
376 ; GFX12: ; %bb.0: ; %main_body
377 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
378 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
379 ; GFX12-NEXT: ; return to shader part epilog
381 %s = extractelement <2 x i16> %coords_lo, i32 0
382 %t = extractelement <2 x i16> %coords_lo, i32 1
383 %slice = extractelement <2 x i16> %coords_hi, i32 0
384 %mip = extractelement <2 x i16> %coords_hi, i32 1
385 %v = call <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
389 define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
390 ; GFX9-LABEL: load_mip_1darray:
391 ; GFX9: ; %bb.0: ; %main_body
392 ; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x04,0xf0,0x00,0x00,0x00,0x00]
393 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
394 ; GFX9-NEXT: ; return to shader part epilog
396 ; GFX10-LABEL: load_mip_1darray:
397 ; GFX10: ; %bb.0: ; %main_body
398 ; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40]
399 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
400 ; GFX10-NEXT: ; return to shader part epilog
402 ; GFX11-LABEL: load_mip_1darray:
403 ; GFX11: ; %bb.0: ; %main_body
404 ; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00]
405 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
406 ; GFX11-NEXT: ; return to shader part epilog
408 ; GFX12-LABEL: load_mip_1darray:
409 ; GFX12: ; %bb.0: ; %main_body
410 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
411 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
412 ; GFX12-NEXT: ; return to shader part epilog
414 %s = extractelement <2 x i16> %coords_lo, i32 0
415 %slice = extractelement <2 x i16> %coords_lo, i32 1
416 %mip = extractelement <2 x i16> %coords_hi, i32 0
417 %v = call <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i16(i32 15, i16 %s, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
421 define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
422 ; GFX9-LABEL: load_mip_2darray:
423 ; GFX9: ; %bb.0: ; %main_body
424 ; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x04,0xf0,0x00,0x00,0x00,0x00]
425 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
426 ; GFX9-NEXT: ; return to shader part epilog
428 ; GFX10-LABEL: load_mip_2darray:
429 ; GFX10: ; %bb.0: ; %main_body
430 ; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40]
431 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
432 ; GFX10-NEXT: ; return to shader part epilog
434 ; GFX11-LABEL: load_mip_2darray:
435 ; GFX11: ; %bb.0: ; %main_body
436 ; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00]
437 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
438 ; GFX11-NEXT: ; return to shader part epilog
440 ; GFX12-LABEL: load_mip_2darray:
441 ; GFX12: ; %bb.0: ; %main_body
442 ; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00]
443 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
444 ; GFX12-NEXT: ; return to shader part epilog
446 %s = extractelement <2 x i16> %coords_lo, i32 0
447 %t = extractelement <2 x i16> %coords_lo, i32 1
448 %slice = extractelement <2 x i16> %coords_hi, i32 0
449 %mip = extractelement <2 x i16> %coords_hi, i32 1
450 %v = call <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
454 define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
455 ; GFX9-LABEL: store_1d:
456 ; GFX9: ; %bb.0: ; %main_body
457 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00]
458 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
460 ; GFX10-LABEL: store_1d:
461 ; GFX10: ; %bb.0: ; %main_body
462 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
463 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
465 ; GFX11-LABEL: store_1d:
466 ; GFX11: ; %bb.0: ; %main_body
467 ; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
468 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
470 ; GFX12-LABEL: store_1d:
471 ; GFX12: ; %bb.0: ; %main_body
472 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00]
473 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
475 %s = extractelement <2 x i16> %coords, i32 0
476 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
480 define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
481 ; GFX9-LABEL: store_2d:
482 ; GFX9: ; %bb.0: ; %main_body
483 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00]
484 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
486 ; GFX10-LABEL: store_2d:
487 ; GFX10: ; %bb.0: ; %main_body
488 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
489 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
491 ; GFX11-LABEL: store_2d:
492 ; GFX11: ; %bb.0: ; %main_body
493 ; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
494 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
496 ; GFX12-LABEL: store_2d:
497 ; GFX12: ; %bb.0: ; %main_body
498 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00]
499 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
501 %s = extractelement <2 x i16> %coords, i32 0
502 %t = extractelement <2 x i16> %coords, i32 1
503 call void @llvm.amdgcn.image.store.2d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, <8 x i32> %rsrc, i32 0, i32 0)
507 define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
508 ; GFX9-LABEL: store_3d:
509 ; GFX9: ; %bb.0: ; %main_body
510 ; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00]
511 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
513 ; GFX10-LABEL: store_3d:
514 ; GFX10: ; %bb.0: ; %main_body
515 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
516 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
518 ; GFX11-LABEL: store_3d:
519 ; GFX11: ; %bb.0: ; %main_body
520 ; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
521 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
523 ; GFX12-LABEL: store_3d:
524 ; GFX12: ; %bb.0: ; %main_body
525 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
526 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
528 %s = extractelement <2 x i16> %coords_lo, i32 0
529 %t = extractelement <2 x i16> %coords_lo, i32 1
530 %r = extractelement <2 x i16> %coords_hi, i32 0
531 call void @llvm.amdgcn.image.store.3d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %r, <8 x i32> %rsrc, i32 0, i32 0)
535 define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
536 ; GFX9-LABEL: store_cube:
537 ; GFX9: ; %bb.0: ; %main_body
538 ; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00]
539 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
541 ; GFX10-LABEL: store_cube:
542 ; GFX10: ; %bb.0: ; %main_body
543 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
544 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
546 ; GFX11-LABEL: store_cube:
547 ; GFX11: ; %bb.0: ; %main_body
548 ; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
549 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
551 ; GFX12-LABEL: store_cube:
552 ; GFX12: ; %bb.0: ; %main_body
553 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
554 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
556 %s = extractelement <2 x i16> %coords_lo, i32 0
557 %t = extractelement <2 x i16> %coords_lo, i32 1
558 %slice = extractelement <2 x i16> %coords_hi, i32 0
559 call void @llvm.amdgcn.image.store.cube.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0)
563 define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
564 ; GFX9-LABEL: store_1darray:
565 ; GFX9: ; %bb.0: ; %main_body
566 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00]
567 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
569 ; GFX10-LABEL: store_1darray:
570 ; GFX10: ; %bb.0: ; %main_body
571 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
572 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
574 ; GFX11-LABEL: store_1darray:
575 ; GFX11: ; %bb.0: ; %main_body
576 ; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
577 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
579 ; GFX12-LABEL: store_1darray:
580 ; GFX12: ; %bb.0: ; %main_body
581 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00]
582 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
584 %s = extractelement <2 x i16> %coords, i32 0
585 %slice = extractelement <2 x i16> %coords, i32 1
586 call void @llvm.amdgcn.image.store.1darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0)
590 define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
591 ; GFX9-LABEL: store_2darray:
592 ; GFX9: ; %bb.0: ; %main_body
593 ; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00]
594 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
596 ; GFX10-LABEL: store_2darray:
597 ; GFX10: ; %bb.0: ; %main_body
598 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
599 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
601 ; GFX11-LABEL: store_2darray:
602 ; GFX11: ; %bb.0: ; %main_body
603 ; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
604 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
606 ; GFX12-LABEL: store_2darray:
607 ; GFX12: ; %bb.0: ; %main_body
608 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
609 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
611 %s = extractelement <2 x i16> %coords_lo, i32 0
612 %t = extractelement <2 x i16> %coords_lo, i32 1
613 %slice = extractelement <2 x i16> %coords_hi, i32 0
614 call void @llvm.amdgcn.image.store.2darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0)
618 define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
619 ; GFX9-LABEL: store_2dmsaa:
620 ; GFX9: ; %bb.0: ; %main_body
621 ; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00]
622 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
624 ; GFX10-LABEL: store_2dmsaa:
625 ; GFX10: ; %bb.0: ; %main_body
626 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x30,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
627 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
629 ; GFX11-LABEL: store_2dmsaa:
630 ; GFX11: ; %bb.0: ; %main_body
631 ; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x98,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
632 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
634 ; GFX12-LABEL: store_2dmsaa:
635 ; GFX12: ; %bb.0: ; %main_body
636 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16 ; encoding: [0x46,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
637 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
639 %s = extractelement <2 x i16> %coords_lo, i32 0
640 %t = extractelement <2 x i16> %coords_lo, i32 1
641 %fragid = extractelement <2 x i16> %coords_hi, i32 0
642 call void @llvm.amdgcn.image.store.2dmsaa.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
646 define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
647 ; GFX9-LABEL: store_2darraymsaa:
648 ; GFX9: ; %bb.0: ; %main_body
649 ; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00]
650 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
652 ; GFX10-LABEL: store_2darraymsaa:
653 ; GFX10: ; %bb.0: ; %main_body
654 ; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x38,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40]
655 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
657 ; GFX11-LABEL: store_2darraymsaa:
658 ; GFX11: ; %bb.0: ; %main_body
659 ; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x9c,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00]
660 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
662 ; GFX12-LABEL: store_2darraymsaa:
663 ; GFX12: ; %bb.0: ; %main_body
664 ; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16 ; encoding: [0x47,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
665 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
667 %s = extractelement <2 x i16> %coords_lo, i32 0
668 %t = extractelement <2 x i16> %coords_lo, i32 1
669 %slice = extractelement <2 x i16> %coords_hi, i32 0
670 %fragid = extractelement <2 x i16> %coords_hi, i32 1
671 call void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
675 define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
676 ; GFX9-LABEL: store_mip_1d:
677 ; GFX9: ; %bb.0: ; %main_body
678 ; GFX9-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x24,0xf0,0x04,0x00,0x00,0x00]
679 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
681 ; GFX10-LABEL: store_mip_1d:
682 ; GFX10: ; %bb.0: ; %main_body
683 ; GFX10-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40]
684 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
686 ; GFX11-LABEL: store_mip_1d:
687 ; GFX11: ; %bb.0: ; %main_body
688 ; GFX11-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00]
689 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
691 ; GFX12-LABEL: store_mip_1d:
692 ; GFX12: ; %bb.0: ; %main_body
693 ; GFX12-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00]
694 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
696 %s = extractelement <2 x i16> %coords, i32 0
697 %mip = extractelement <2 x i16> %coords, i32 1
698 call void @llvm.amdgcn.image.store.mip.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
702 define amdgpu_ps void @store_mip_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
703 ; GFX9-LABEL: store_mip_2d:
704 ; GFX9: ; %bb.0: ; %main_body
705 ; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x24,0xf0,0x04,0x00,0x00,0x00]
706 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
708 ; GFX10-LABEL: store_mip_2d:
709 ; GFX10: ; %bb.0: ; %main_body
710 ; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40]
711 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
713 ; GFX11-LABEL: store_mip_2d:
714 ; GFX11: ; %bb.0: ; %main_body
715 ; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00]
716 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
718 ; GFX12-LABEL: store_mip_2d:
719 ; GFX12: ; %bb.0: ; %main_body
720 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
721 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
723 %s = extractelement <2 x i16> %coords_lo, i32 0
724 %t = extractelement <2 x i16> %coords_lo, i32 1
725 %mip = extractelement <2 x i16> %coords_hi, i32 0
726 call void @llvm.amdgcn.image.store.mip.2d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
730 define amdgpu_ps void @store_mip_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
731 ; GFX9-LABEL: store_mip_3d:
732 ; GFX9: ; %bb.0: ; %main_body
733 ; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x24,0xf0,0x04,0x00,0x00,0x00]
734 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
736 ; GFX10-LABEL: store_mip_3d:
737 ; GFX10: ; %bb.0: ; %main_body
738 ; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40]
739 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
741 ; GFX11-LABEL: store_mip_3d:
742 ; GFX11: ; %bb.0: ; %main_body
743 ; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00]
744 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
746 ; GFX12-LABEL: store_mip_3d:
747 ; GFX12: ; %bb.0: ; %main_body
748 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
749 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
751 %s = extractelement <2 x i16> %coords_lo, i32 0
752 %t = extractelement <2 x i16> %coords_lo, i32 1
753 %r = extractelement <2 x i16> %coords_hi, i32 0
754 %mip = extractelement <2 x i16> %coords_hi, i32 1
755 call void @llvm.amdgcn.image.store.mip.3d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %r, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
759 define amdgpu_ps void @store_mip_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
760 ; GFX9-LABEL: store_mip_cube:
761 ; GFX9: ; %bb.0: ; %main_body
762 ; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x24,0xf0,0x04,0x00,0x00,0x00]
763 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
765 ; GFX10-LABEL: store_mip_cube:
766 ; GFX10: ; %bb.0: ; %main_body
767 ; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40]
768 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
770 ; GFX11-LABEL: store_mip_cube:
771 ; GFX11: ; %bb.0: ; %main_body
772 ; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00]
773 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
775 ; GFX12-LABEL: store_mip_cube:
776 ; GFX12: ; %bb.0: ; %main_body
777 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
778 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
780 %s = extractelement <2 x i16> %coords_lo, i32 0
781 %t = extractelement <2 x i16> %coords_lo, i32 1
782 %slice = extractelement <2 x i16> %coords_hi, i32 0
783 %mip = extractelement <2 x i16> %coords_hi, i32 1
784 call void @llvm.amdgcn.image.store.mip.cube.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
788 define amdgpu_ps void @store_mip_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
789 ; GFX9-LABEL: store_mip_1darray:
790 ; GFX9: ; %bb.0: ; %main_body
791 ; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x24,0xf0,0x04,0x00,0x00,0x00]
792 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
794 ; GFX10-LABEL: store_mip_1darray:
795 ; GFX10: ; %bb.0: ; %main_body
796 ; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40]
797 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
799 ; GFX11-LABEL: store_mip_1darray:
800 ; GFX11: ; %bb.0: ; %main_body
801 ; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00]
802 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
804 ; GFX12-LABEL: store_mip_1darray:
805 ; GFX12: ; %bb.0: ; %main_body
806 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
807 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
809 %s = extractelement <2 x i16> %coords_lo, i32 0
810 %slice = extractelement <2 x i16> %coords_lo, i32 1
811 %mip = extractelement <2 x i16> %coords_hi, i32 0
812 call void @llvm.amdgcn.image.store.mip.1darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
816 define amdgpu_ps void @store_mip_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {
817 ; GFX9-LABEL: store_mip_2darray:
818 ; GFX9: ; %bb.0: ; %main_body
819 ; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x24,0xf0,0x04,0x00,0x00,0x00]
820 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
822 ; GFX10-LABEL: store_mip_2darray:
823 ; GFX10: ; %bb.0: ; %main_body
824 ; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40]
825 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
827 ; GFX11-LABEL: store_mip_2darray:
828 ; GFX11: ; %bb.0: ; %main_body
829 ; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00]
830 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
832 ; GFX12-LABEL: store_mip_2darray:
833 ; GFX12: ; %bb.0: ; %main_body
834 ; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00]
835 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
837 %s = extractelement <2 x i16> %coords_lo, i32 0
838 %t = extractelement <2 x i16> %coords_lo, i32 1
839 %slice = extractelement <2 x i16> %coords_hi, i32 0
840 %mip = extractelement <2 x i16> %coords_hi, i32 1
841 call void @llvm.amdgcn.image.store.mip.2darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
845 define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
846 ; GFX9-LABEL: getresinfo_1d:
847 ; GFX9: ; %bb.0: ; %main_body
848 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00]
849 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
850 ; GFX9-NEXT: ; return to shader part epilog
852 ; GFX10-LABEL: getresinfo_1d:
853 ; GFX10: ; %bb.0: ; %main_body
854 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
855 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
856 ; GFX10-NEXT: ; return to shader part epilog
858 ; GFX11-LABEL: getresinfo_1d:
859 ; GFX11: ; %bb.0: ; %main_body
860 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
861 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
862 ; GFX11-NEXT: ; return to shader part epilog
864 ; GFX12-LABEL: getresinfo_1d:
865 ; GFX12: ; %bb.0: ; %main_body
866 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
867 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
868 ; GFX12-NEXT: ; return to shader part epilog
870 %mip = extractelement <2 x i16> %coords, i32 0
871 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
875 define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
876 ; GFX9-LABEL: getresinfo_2d:
877 ; GFX9: ; %bb.0: ; %main_body
878 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00]
879 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
880 ; GFX9-NEXT: ; return to shader part epilog
882 ; GFX10-LABEL: getresinfo_2d:
883 ; GFX10: ; %bb.0: ; %main_body
884 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
885 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
886 ; GFX10-NEXT: ; return to shader part epilog
888 ; GFX11-LABEL: getresinfo_2d:
889 ; GFX11: ; %bb.0: ; %main_body
890 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
891 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
892 ; GFX11-NEXT: ; return to shader part epilog
894 ; GFX12-LABEL: getresinfo_2d:
895 ; GFX12: ; %bb.0: ; %main_body
896 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
897 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
898 ; GFX12-NEXT: ; return to shader part epilog
900 %mip = extractelement <2 x i16> %coords, i32 0
901 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
905 define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
906 ; GFX9-LABEL: getresinfo_3d:
907 ; GFX9: ; %bb.0: ; %main_body
908 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00]
909 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
910 ; GFX9-NEXT: ; return to shader part epilog
912 ; GFX10-LABEL: getresinfo_3d:
913 ; GFX10: ; %bb.0: ; %main_body
914 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
915 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
916 ; GFX10-NEXT: ; return to shader part epilog
918 ; GFX11-LABEL: getresinfo_3d:
919 ; GFX11: ; %bb.0: ; %main_body
920 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
921 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
922 ; GFX11-NEXT: ; return to shader part epilog
924 ; GFX12-LABEL: getresinfo_3d:
925 ; GFX12: ; %bb.0: ; %main_body
926 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
927 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
928 ; GFX12-NEXT: ; return to shader part epilog
930 %mip = extractelement <2 x i16> %coords, i32 0
931 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
935 define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
936 ; GFX9-LABEL: getresinfo_cube:
937 ; GFX9: ; %bb.0: ; %main_body
938 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00]
939 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
940 ; GFX9-NEXT: ; return to shader part epilog
942 ; GFX10-LABEL: getresinfo_cube:
943 ; GFX10: ; %bb.0: ; %main_body
944 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
945 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
946 ; GFX10-NEXT: ; return to shader part epilog
948 ; GFX11-LABEL: getresinfo_cube:
949 ; GFX11: ; %bb.0: ; %main_body
950 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
951 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
952 ; GFX11-NEXT: ; return to shader part epilog
954 ; GFX12-LABEL: getresinfo_cube:
955 ; GFX12: ; %bb.0: ; %main_body
956 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
957 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
958 ; GFX12-NEXT: ; return to shader part epilog
960 %mip = extractelement <2 x i16> %coords, i32 0
961 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
965 define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
966 ; GFX9-LABEL: getresinfo_1darray:
967 ; GFX9: ; %bb.0: ; %main_body
968 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00]
969 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
970 ; GFX9-NEXT: ; return to shader part epilog
972 ; GFX10-LABEL: getresinfo_1darray:
973 ; GFX10: ; %bb.0: ; %main_body
974 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
975 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
976 ; GFX10-NEXT: ; return to shader part epilog
978 ; GFX11-LABEL: getresinfo_1darray:
979 ; GFX11: ; %bb.0: ; %main_body
980 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
981 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
982 ; GFX11-NEXT: ; return to shader part epilog
984 ; GFX12-LABEL: getresinfo_1darray:
985 ; GFX12: ; %bb.0: ; %main_body
986 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
987 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
988 ; GFX12-NEXT: ; return to shader part epilog
990 %mip = extractelement <2 x i16> %coords, i32 0
991 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
995 define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
996 ; GFX9-LABEL: getresinfo_2darray:
997 ; GFX9: ; %bb.0: ; %main_body
998 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00]
999 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1000 ; GFX9-NEXT: ; return to shader part epilog
1002 ; GFX10-LABEL: getresinfo_2darray:
1003 ; GFX10: ; %bb.0: ; %main_body
1004 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
1005 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1006 ; GFX10-NEXT: ; return to shader part epilog
1008 ; GFX11-LABEL: getresinfo_2darray:
1009 ; GFX11: ; %bb.0: ; %main_body
1010 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
1011 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1012 ; GFX11-NEXT: ; return to shader part epilog
1014 ; GFX12-LABEL: getresinfo_2darray:
1015 ; GFX12: ; %bb.0: ; %main_body
1016 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
1017 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1018 ; GFX12-NEXT: ; return to shader part epilog
1020 %mip = extractelement <2 x i16> %coords, i32 0
1021 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1025 define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1026 ; GFX9-LABEL: getresinfo_2dmsaa:
1027 ; GFX9: ; %bb.0: ; %main_body
1028 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00]
1029 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1030 ; GFX9-NEXT: ; return to shader part epilog
1032 ; GFX10-LABEL: getresinfo_2dmsaa:
1033 ; GFX10: ; %bb.0: ; %main_body
1034 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x30,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
1035 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1036 ; GFX10-NEXT: ; return to shader part epilog
1038 ; GFX11-LABEL: getresinfo_2dmsaa:
1039 ; GFX11: ; %bb.0: ; %main_body
1040 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x98,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
1041 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1042 ; GFX11-NEXT: ; return to shader part epilog
1044 ; GFX12-LABEL: getresinfo_2dmsaa:
1045 ; GFX12: ; %bb.0: ; %main_body
1046 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16 ; encoding: [0x46,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
1047 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1048 ; GFX12-NEXT: ; return to shader part epilog
1050 %mip = extractelement <2 x i16> %coords, i32 0
1051 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1055 define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1056 ; GFX9-LABEL: getresinfo_2darraymsaa:
1057 ; GFX9: ; %bb.0: ; %main_body
1058 ; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00]
1059 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1060 ; GFX9-NEXT: ; return to shader part epilog
1062 ; GFX10-LABEL: getresinfo_2darraymsaa:
1063 ; GFX10: ; %bb.0: ; %main_body
1064 ; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x38,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40]
1065 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1066 ; GFX10-NEXT: ; return to shader part epilog
1068 ; GFX11-LABEL: getresinfo_2darraymsaa:
1069 ; GFX11: ; %bb.0: ; %main_body
1070 ; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x9c,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00]
1071 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1072 ; GFX11-NEXT: ; return to shader part epilog
1074 ; GFX12-LABEL: getresinfo_2darraymsaa:
1075 ; GFX12: ; %bb.0: ; %main_body
1076 ; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16 ; encoding: [0x47,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
1077 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1078 ; GFX12-NEXT: ; return to shader part epilog
1080 %mip = extractelement <2 x i16> %coords, i32 0
1081 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1085 define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1086 ; GFX9-LABEL: load_1d_V1:
1087 ; GFX9: ; %bb.0: ; %main_body
1088 ; GFX9-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm a16 ; encoding: [0x00,0x98,0x00,0xf0,0x00,0x00,0x00,0x00]
1089 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1090 ; GFX9-NEXT: ; return to shader part epilog
1092 ; GFX10-LABEL: load_1d_V1:
1093 ; GFX10: ; %bb.0: ; %main_body
1094 ; GFX10-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x18,0x00,0xf0,0x00,0x00,0x00,0x40]
1095 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1096 ; GFX10-NEXT: ; return to shader part epilog
1098 ; GFX11-LABEL: load_1d_V1:
1099 ; GFX11: ; %bb.0: ; %main_body
1100 ; GFX11-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x08,0x01,0xf0,0x00,0x00,0x00,0x00]
1101 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1102 ; GFX11-NEXT: ; return to shader part epilog
1104 ; GFX12-LABEL: load_1d_V1:
1105 ; GFX12: ; %bb.0: ; %main_body
1106 ; GFX12-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x00,0x00,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
1107 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1108 ; GFX12-NEXT: ; return to shader part epilog
1110 %s = extractelement <2 x i16> %coords, i32 0
1111 %v = call float @llvm.amdgcn.image.load.1d.f32.i16(i32 8, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1115 define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1116 ; GFX9-LABEL: load_1d_V2:
1117 ; GFX9: ; %bb.0: ; %main_body
1118 ; GFX9-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm a16 ; encoding: [0x00,0x99,0x00,0xf0,0x00,0x00,0x00,0x00]
1119 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1120 ; GFX9-NEXT: ; return to shader part epilog
1122 ; GFX10-LABEL: load_1d_V2:
1123 ; GFX10: ; %bb.0: ; %main_body
1124 ; GFX10-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x19,0x00,0xf0,0x00,0x00,0x00,0x40]
1125 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1126 ; GFX10-NEXT: ; return to shader part epilog
1128 ; GFX11-LABEL: load_1d_V2:
1129 ; GFX11: ; %bb.0: ; %main_body
1130 ; GFX11-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x09,0x01,0xf0,0x00,0x00,0x00,0x00]
1131 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1132 ; GFX11-NEXT: ; return to shader part epilog
1134 ; GFX12-LABEL: load_1d_V2:
1135 ; GFX12: ; %bb.0: ; %main_body
1136 ; GFX12-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x00,0x40,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
1137 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1138 ; GFX12-NEXT: ; return to shader part epilog
1140 %s = extractelement <2 x i16> %coords, i32 0
1141 %v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32 9, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1145 define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, <2 x i16> %coords) {
1146 ; GFX9-LABEL: store_1d_V1:
1147 ; GFX9: ; %bb.0: ; %main_body
1148 ; GFX9-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm a16 ; encoding: [0x00,0x92,0x20,0xf0,0x01,0x00,0x00,0x00]
1149 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1151 ; GFX10-LABEL: store_1d_V1:
1152 ; GFX10: ; %bb.0: ; %main_body
1153 ; GFX10-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x12,0x20,0xf0,0x01,0x00,0x00,0x40]
1154 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1156 ; GFX11-LABEL: store_1d_V1:
1157 ; GFX11: ; %bb.0: ; %main_body
1158 ; GFX11-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x02,0x19,0xf0,0x01,0x00,0x00,0x00]
1159 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1161 ; GFX12-LABEL: store_1d_V1:
1162 ; GFX12: ; %bb.0: ; %main_body
1163 ; GFX12-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x80,0x81,0xd0,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00]
1164 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1166 %s = extractelement <2 x i16> %coords, i32 0
1167 call void @llvm.amdgcn.image.store.1d.f32.i16(float %vdata, i32 2, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1171 define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, <2 x i16> %coords) {
1172 ; GFX9-LABEL: store_1d_V2:
1173 ; GFX9: ; %bb.0: ; %main_body
1174 ; GFX9-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm a16 ; encoding: [0x00,0x9c,0x20,0xf0,0x02,0x00,0x00,0x00]
1175 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1177 ; GFX10-LABEL: store_1d_V2:
1178 ; GFX10: ; %bb.0: ; %main_body
1179 ; GFX10-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1c,0x20,0xf0,0x02,0x00,0x00,0x40]
1180 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1182 ; GFX11-LABEL: store_1d_V2:
1183 ; GFX11: ; %bb.0: ; %main_body
1184 ; GFX11-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0c,0x19,0xf0,0x02,0x00,0x00,0x00]
1185 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1187 ; GFX12-LABEL: store_1d_V2:
1188 ; GFX12: ; %bb.0: ; %main_body
1189 ; GFX12-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x80,0x01,0xd3,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00]
1190 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1192 %s = extractelement <2 x i16> %coords, i32 0
1193 call void @llvm.amdgcn.image.store.1d.v2f32.i16(<2 x float> %vdata, i32 12, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1197 define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1198 ; GFX9-LABEL: load_1d_glc:
1199 ; GFX9: ; %bb.0: ; %main_body
1200 ; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc a16 ; encoding: [0x00,0xbf,0x00,0xf0,0x00,0x00,0x00,0x00]
1201 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1202 ; GFX9-NEXT: ; return to shader part epilog
1204 ; GFX10-LABEL: load_1d_glc:
1205 ; GFX10: ; %bb.0: ; %main_body
1206 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x00,0x3f,0x00,0xf0,0x00,0x00,0x00,0x40]
1207 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1208 ; GFX10-NEXT: ; return to shader part epilog
1210 ; GFX11-LABEL: load_1d_glc:
1211 ; GFX11: ; %bb.0: ; %main_body
1212 ; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x80,0x4f,0x01,0xf0,0x00,0x00,0x00,0x00]
1213 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1214 ; GFX11-NEXT: ; return to shader part epilog
1216 ; GFX12-LABEL: load_1d_glc:
1217 ; GFX12: ; %bb.0: ; %main_body
1218 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_NT a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00]
1219 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1220 ; GFX12-NEXT: ; return to shader part epilog
1222 %s = extractelement <2 x i16> %coords, i32 0
1223 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 1)
1227 define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1228 ; GFX9-LABEL: load_1d_slc:
1229 ; GFX9: ; %bb.0: ; %main_body
1230 ; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc a16 ; encoding: [0x00,0x9f,0x00,0xf2,0x00,0x00,0x00,0x00]
1231 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1232 ; GFX9-NEXT: ; return to shader part epilog
1234 ; GFX10-LABEL: load_1d_slc:
1235 ; GFX10: ; %bb.0: ; %main_body
1236 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x00,0x1f,0x00,0xf2,0x00,0x00,0x00,0x40]
1237 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1238 ; GFX10-NEXT: ; return to shader part epilog
1240 ; GFX11-LABEL: load_1d_slc:
1241 ; GFX11: ; %bb.0: ; %main_body
1242 ; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x80,0x1f,0x01,0xf0,0x00,0x00,0x00,0x00]
1243 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1244 ; GFX11-NEXT: ; return to shader part epilog
1246 ; GFX12-LABEL: load_1d_slc:
1247 ; GFX12: ; %bb.0: ; %main_body
1248 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_HT a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00]
1249 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1250 ; GFX12-NEXT: ; return to shader part epilog
1252 %s = extractelement <2 x i16> %coords, i32 0
1253 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 2)
1257 define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1258 ; GFX9-LABEL: load_1d_glc_slc:
1259 ; GFX9: ; %bb.0: ; %main_body
1260 ; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc a16 ; encoding: [0x00,0xbf,0x00,0xf2,0x00,0x00,0x00,0x00]
1261 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1262 ; GFX9-NEXT: ; return to shader part epilog
1264 ; GFX10-LABEL: load_1d_glc_slc:
1265 ; GFX10: ; %bb.0: ; %main_body
1266 ; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x00,0x3f,0x00,0xf2,0x00,0x00,0x00,0x40]
1267 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1268 ; GFX10-NEXT: ; return to shader part epilog
1270 ; GFX11-LABEL: load_1d_glc_slc:
1271 ; GFX11: ; %bb.0: ; %main_body
1272 ; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x80,0x5f,0x01,0xf0,0x00,0x00,0x00,0x00]
1273 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1274 ; GFX11-NEXT: ; return to shader part epilog
1276 ; GFX12-LABEL: load_1d_glc_slc:
1277 ; GFX12: ; %bb.0: ; %main_body
1278 ; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_LU a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00]
1279 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1280 ; GFX12-NEXT: ; return to shader part epilog
1282 %s = extractelement <2 x i16> %coords, i32 0
1283 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 3)
1287 define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
1288 ; GFX9-LABEL: store_1d_glc:
1289 ; GFX9: ; %bb.0: ; %main_body
1290 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc a16 ; encoding: [0x00,0xbf,0x20,0xf0,0x04,0x00,0x00,0x00]
1291 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1293 ; GFX10-LABEL: store_1d_glc:
1294 ; GFX10: ; %bb.0: ; %main_body
1295 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x00,0x3f,0x20,0xf0,0x04,0x00,0x00,0x40]
1296 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1298 ; GFX11-LABEL: store_1d_glc:
1299 ; GFX11: ; %bb.0: ; %main_body
1300 ; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x80,0x4f,0x19,0xf0,0x04,0x00,0x00,0x00]
1301 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1303 ; GFX12-LABEL: store_1d_glc:
1304 ; GFX12: ; %bb.0: ; %main_body
1305 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_NT a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x10,0x00,0x04,0x00,0x00,0x00]
1306 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1308 %s = extractelement <2 x i16> %coords, i32 0
1309 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 1)
1313 define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
1314 ; GFX9-LABEL: store_1d_slc:
1315 ; GFX9: ; %bb.0: ; %main_body
1316 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc a16 ; encoding: [0x00,0x9f,0x20,0xf2,0x04,0x00,0x00,0x00]
1317 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1319 ; GFX10-LABEL: store_1d_slc:
1320 ; GFX10: ; %bb.0: ; %main_body
1321 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x00,0x1f,0x20,0xf2,0x04,0x00,0x00,0x40]
1322 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1324 ; GFX11-LABEL: store_1d_slc:
1325 ; GFX11: ; %bb.0: ; %main_body
1326 ; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x80,0x1f,0x19,0xf0,0x04,0x00,0x00,0x00]
1327 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1329 ; GFX12-LABEL: store_1d_slc:
1330 ; GFX12: ; %bb.0: ; %main_body
1331 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_HT a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x20,0x00,0x04,0x00,0x00,0x00]
1332 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1334 %s = extractelement <2 x i16> %coords, i32 0
1335 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 2)
1339 define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
1340 ; GFX9-LABEL: store_1d_glc_slc:
1341 ; GFX9: ; %bb.0: ; %main_body
1342 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc a16 ; encoding: [0x00,0xbf,0x20,0xf2,0x04,0x00,0x00,0x00]
1343 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1345 ; GFX10-LABEL: store_1d_glc_slc:
1346 ; GFX10: ; %bb.0: ; %main_body
1347 ; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x00,0x3f,0x20,0xf2,0x04,0x00,0x00,0x40]
1348 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1350 ; GFX11-LABEL: store_1d_glc_slc:
1351 ; GFX11: ; %bb.0: ; %main_body
1352 ; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x80,0x5f,0x19,0xf0,0x04,0x00,0x00,0x00]
1353 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1355 ; GFX12-LABEL: store_1d_glc_slc:
1356 ; GFX12: ; %bb.0: ; %main_body
1357 ; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x30,0x00,0x04,0x00,0x00,0x00]
1358 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1360 %s = extractelement <2 x i16> %coords, i32 0
1361 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 3)
1365 define amdgpu_ps <4 x float> @getresinfo_dmask0(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) #0 {
1366 ; GFX9-LABEL: getresinfo_dmask0:
1367 ; GFX9: ; %bb.0: ; %main_body
1368 ; GFX9-NEXT: ; return to shader part epilog
1370 ; GFX10-LABEL: getresinfo_dmask0:
1371 ; GFX10: ; %bb.0: ; %main_body
1372 ; GFX10-NEXT: ; return to shader part epilog
1374 ; GFX11-LABEL: getresinfo_dmask0:
1375 ; GFX11: ; %bb.0: ; %main_body
1376 ; GFX11-NEXT: ; return to shader part epilog
1378 ; GFX12-LABEL: getresinfo_dmask0:
1379 ; GFX12: ; %bb.0: ; %main_body
1380 ; GFX12-NEXT: ; return to shader part epilog
1382 %mip = extractelement <2 x i16> %coords, i32 0
1383 %r = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 0, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1387 declare <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #1
1388 declare <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1389 declare <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1390 declare <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1391 declare <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1392 declare <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1393 declare <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1394 declare <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1396 declare <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1397 declare <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1398 declare <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1399 declare <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1400 declare <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1401 declare <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1403 declare void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float>, i32, i16, <8 x i32>, i32, i32) #0
1404 declare void @llvm.amdgcn.image.store.2d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0
1405 declare void @llvm.amdgcn.image.store.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1406 declare void @llvm.amdgcn.image.store.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1407 declare void @llvm.amdgcn.image.store.1darray.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0
1408 declare void @llvm.amdgcn.image.store.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1409 declare void @llvm.amdgcn.image.store.2dmsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1410 declare void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1412 declare void @llvm.amdgcn.image.store.mip.1d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0
1413 declare void @llvm.amdgcn.image.store.mip.2d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1414 declare void @llvm.amdgcn.image.store.mip.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1415 declare void @llvm.amdgcn.image.store.mip.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1416 declare void @llvm.amdgcn.image.store.mip.1darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1417 declare void @llvm.amdgcn.image.store.mip.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1419 declare <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1420 declare <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1421 declare <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1422 declare <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1423 declare <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1424 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1425 declare <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1426 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1428 declare float @llvm.amdgcn.image.load.1d.f32.i16(i32, i16, <8 x i32>, i32, i32) #1
1429 declare float @llvm.amdgcn.image.load.2d.f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1430 declare <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32, i16, <8 x i32>, i32, i32) #1
1431 declare void @llvm.amdgcn.image.store.1d.f32.i16(float, i32, i16, <8 x i32>, i32, i32) #0
1432 declare void @llvm.amdgcn.image.store.1d.v2f32.i16(<2 x float>, i32, i16, <8 x i32>, i32, i32) #0
1434 attributes #0 = { nounwind }
1435 attributes #1 = { nounwind readonly }
1436 attributes #2 = { nounwind readnone }