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_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
469 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
470 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
472 ; GFX12-LABEL: store_1d:
473 ; GFX12: ; %bb.0: ; %main_body
474 ; 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]
475 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
476 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
477 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
479 %s = extractelement <2 x i16> %coords, i32 0
480 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)
484 define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
485 ; GFX9-LABEL: store_2d:
486 ; GFX9: ; %bb.0: ; %main_body
487 ; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00]
488 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
490 ; GFX10-LABEL: store_2d:
491 ; GFX10: ; %bb.0: ; %main_body
492 ; 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]
493 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
495 ; GFX11-LABEL: store_2d:
496 ; GFX11: ; %bb.0: ; %main_body
497 ; 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]
498 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
499 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
500 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
502 ; GFX12-LABEL: store_2d:
503 ; GFX12: ; %bb.0: ; %main_body
504 ; 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]
505 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
506 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
507 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
509 %s = extractelement <2 x i16> %coords, i32 0
510 %t = extractelement <2 x i16> %coords, i32 1
511 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)
515 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) {
516 ; GFX9-LABEL: store_3d:
517 ; GFX9: ; %bb.0: ; %main_body
518 ; 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]
519 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
521 ; GFX10-LABEL: store_3d:
522 ; GFX10: ; %bb.0: ; %main_body
523 ; 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]
524 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
526 ; GFX11-LABEL: store_3d:
527 ; GFX11: ; %bb.0: ; %main_body
528 ; 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]
529 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
530 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
531 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
533 ; GFX12-LABEL: store_3d:
534 ; GFX12: ; %bb.0: ; %main_body
535 ; 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]
536 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
537 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
538 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
540 %s = extractelement <2 x i16> %coords_lo, i32 0
541 %t = extractelement <2 x i16> %coords_lo, i32 1
542 %r = extractelement <2 x i16> %coords_hi, i32 0
543 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)
547 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) {
548 ; GFX9-LABEL: store_cube:
549 ; GFX9: ; %bb.0: ; %main_body
550 ; 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]
551 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
553 ; GFX10-LABEL: store_cube:
554 ; GFX10: ; %bb.0: ; %main_body
555 ; 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]
556 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
558 ; GFX11-LABEL: store_cube:
559 ; GFX11: ; %bb.0: ; %main_body
560 ; 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]
561 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
562 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
563 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
565 ; GFX12-LABEL: store_cube:
566 ; GFX12: ; %bb.0: ; %main_body
567 ; 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]
568 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
569 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
570 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
572 %s = extractelement <2 x i16> %coords_lo, i32 0
573 %t = extractelement <2 x i16> %coords_lo, i32 1
574 %slice = extractelement <2 x i16> %coords_hi, i32 0
575 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)
579 define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
580 ; GFX9-LABEL: store_1darray:
581 ; GFX9: ; %bb.0: ; %main_body
582 ; 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]
583 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
585 ; GFX10-LABEL: store_1darray:
586 ; GFX10: ; %bb.0: ; %main_body
587 ; 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]
588 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
590 ; GFX11-LABEL: store_1darray:
591 ; GFX11: ; %bb.0: ; %main_body
592 ; 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]
593 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
594 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
595 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
597 ; GFX12-LABEL: store_1darray:
598 ; GFX12: ; %bb.0: ; %main_body
599 ; 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]
600 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
601 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
602 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
604 %s = extractelement <2 x i16> %coords, i32 0
605 %slice = extractelement <2 x i16> %coords, i32 1
606 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)
610 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) {
611 ; GFX9-LABEL: store_2darray:
612 ; GFX9: ; %bb.0: ; %main_body
613 ; 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]
614 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
616 ; GFX10-LABEL: store_2darray:
617 ; GFX10: ; %bb.0: ; %main_body
618 ; 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]
619 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
621 ; GFX11-LABEL: store_2darray:
622 ; GFX11: ; %bb.0: ; %main_body
623 ; 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]
624 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
625 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
626 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
628 ; GFX12-LABEL: store_2darray:
629 ; GFX12: ; %bb.0: ; %main_body
630 ; 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]
631 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
632 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
633 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
635 %s = extractelement <2 x i16> %coords_lo, i32 0
636 %t = extractelement <2 x i16> %coords_lo, i32 1
637 %slice = extractelement <2 x i16> %coords_hi, i32 0
638 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)
642 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) {
643 ; GFX9-LABEL: store_2dmsaa:
644 ; GFX9: ; %bb.0: ; %main_body
645 ; 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]
646 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
648 ; GFX10-LABEL: store_2dmsaa:
649 ; GFX10: ; %bb.0: ; %main_body
650 ; 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]
651 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
653 ; GFX11-LABEL: store_2dmsaa:
654 ; GFX11: ; %bb.0: ; %main_body
655 ; 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]
656 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
657 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
658 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
660 ; GFX12-LABEL: store_2dmsaa:
661 ; GFX12: ; %bb.0: ; %main_body
662 ; 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]
663 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
664 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
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 %fragid = extractelement <2 x i16> %coords_hi, i32 0
670 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)
674 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) {
675 ; GFX9-LABEL: store_2darraymsaa:
676 ; GFX9: ; %bb.0: ; %main_body
677 ; 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]
678 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
680 ; GFX10-LABEL: store_2darraymsaa:
681 ; GFX10: ; %bb.0: ; %main_body
682 ; 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]
683 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
685 ; GFX11-LABEL: store_2darraymsaa:
686 ; GFX11: ; %bb.0: ; %main_body
687 ; 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]
688 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
689 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
690 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
692 ; GFX12-LABEL: store_2darraymsaa:
693 ; GFX12: ; %bb.0: ; %main_body
694 ; 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]
695 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
696 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
697 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
699 %s = extractelement <2 x i16> %coords_lo, i32 0
700 %t = extractelement <2 x i16> %coords_lo, i32 1
701 %slice = extractelement <2 x i16> %coords_hi, i32 0
702 %fragid = extractelement <2 x i16> %coords_hi, i32 1
703 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)
707 define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
708 ; GFX9-LABEL: store_mip_1d:
709 ; GFX9: ; %bb.0: ; %main_body
710 ; 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]
711 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
713 ; GFX10-LABEL: store_mip_1d:
714 ; GFX10: ; %bb.0: ; %main_body
715 ; 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]
716 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
718 ; GFX11-LABEL: store_mip_1d:
719 ; GFX11: ; %bb.0: ; %main_body
720 ; 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]
721 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
722 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
723 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
725 ; GFX12-LABEL: store_mip_1d:
726 ; GFX12: ; %bb.0: ; %main_body
727 ; 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]
728 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
729 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
730 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
732 %s = extractelement <2 x i16> %coords, i32 0
733 %mip = extractelement <2 x i16> %coords, i32 1
734 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)
738 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) {
739 ; GFX9-LABEL: store_mip_2d:
740 ; GFX9: ; %bb.0: ; %main_body
741 ; 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]
742 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
744 ; GFX10-LABEL: store_mip_2d:
745 ; GFX10: ; %bb.0: ; %main_body
746 ; 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]
747 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
749 ; GFX11-LABEL: store_mip_2d:
750 ; GFX11: ; %bb.0: ; %main_body
751 ; 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]
752 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
753 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
754 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
756 ; GFX12-LABEL: store_mip_2d:
757 ; GFX12: ; %bb.0: ; %main_body
758 ; 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]
759 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
760 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
761 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
763 %s = extractelement <2 x i16> %coords_lo, i32 0
764 %t = extractelement <2 x i16> %coords_lo, i32 1
765 %mip = extractelement <2 x i16> %coords_hi, i32 0
766 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)
770 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) {
771 ; GFX9-LABEL: store_mip_3d:
772 ; GFX9: ; %bb.0: ; %main_body
773 ; 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]
774 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
776 ; GFX10-LABEL: store_mip_3d:
777 ; GFX10: ; %bb.0: ; %main_body
778 ; 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]
779 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
781 ; GFX11-LABEL: store_mip_3d:
782 ; GFX11: ; %bb.0: ; %main_body
783 ; 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]
784 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
785 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
786 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
788 ; GFX12-LABEL: store_mip_3d:
789 ; GFX12: ; %bb.0: ; %main_body
790 ; 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]
791 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
792 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
793 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
795 %s = extractelement <2 x i16> %coords_lo, i32 0
796 %t = extractelement <2 x i16> %coords_lo, i32 1
797 %r = extractelement <2 x i16> %coords_hi, i32 0
798 %mip = extractelement <2 x i16> %coords_hi, i32 1
799 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)
803 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) {
804 ; GFX9-LABEL: store_mip_cube:
805 ; GFX9: ; %bb.0: ; %main_body
806 ; 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]
807 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
809 ; GFX10-LABEL: store_mip_cube:
810 ; GFX10: ; %bb.0: ; %main_body
811 ; 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]
812 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
814 ; GFX11-LABEL: store_mip_cube:
815 ; GFX11: ; %bb.0: ; %main_body
816 ; 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]
817 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
818 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
819 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
821 ; GFX12-LABEL: store_mip_cube:
822 ; GFX12: ; %bb.0: ; %main_body
823 ; 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]
824 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
825 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
826 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
828 %s = extractelement <2 x i16> %coords_lo, i32 0
829 %t = extractelement <2 x i16> %coords_lo, i32 1
830 %slice = extractelement <2 x i16> %coords_hi, i32 0
831 %mip = extractelement <2 x i16> %coords_hi, i32 1
832 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)
836 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) {
837 ; GFX9-LABEL: store_mip_1darray:
838 ; GFX9: ; %bb.0: ; %main_body
839 ; 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]
840 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
842 ; GFX10-LABEL: store_mip_1darray:
843 ; GFX10: ; %bb.0: ; %main_body
844 ; 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]
845 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
847 ; GFX11-LABEL: store_mip_1darray:
848 ; GFX11: ; %bb.0: ; %main_body
849 ; 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]
850 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
851 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
852 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
854 ; GFX12-LABEL: store_mip_1darray:
855 ; GFX12: ; %bb.0: ; %main_body
856 ; 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]
857 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
858 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
859 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
861 %s = extractelement <2 x i16> %coords_lo, i32 0
862 %slice = extractelement <2 x i16> %coords_lo, i32 1
863 %mip = extractelement <2 x i16> %coords_hi, i32 0
864 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)
868 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) {
869 ; GFX9-LABEL: store_mip_2darray:
870 ; GFX9: ; %bb.0: ; %main_body
871 ; 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]
872 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
874 ; GFX10-LABEL: store_mip_2darray:
875 ; GFX10: ; %bb.0: ; %main_body
876 ; 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]
877 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
879 ; GFX11-LABEL: store_mip_2darray:
880 ; GFX11: ; %bb.0: ; %main_body
881 ; 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]
882 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
883 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
884 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
886 ; GFX12-LABEL: store_mip_2darray:
887 ; GFX12: ; %bb.0: ; %main_body
888 ; 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]
889 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
890 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
891 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
893 %s = extractelement <2 x i16> %coords_lo, i32 0
894 %t = extractelement <2 x i16> %coords_lo, i32 1
895 %slice = extractelement <2 x i16> %coords_hi, i32 0
896 %mip = extractelement <2 x i16> %coords_hi, i32 1
897 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)
901 define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
902 ; GFX9-LABEL: getresinfo_1d:
903 ; GFX9: ; %bb.0: ; %main_body
904 ; 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]
905 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
906 ; GFX9-NEXT: ; return to shader part epilog
908 ; GFX10-LABEL: getresinfo_1d:
909 ; GFX10: ; %bb.0: ; %main_body
910 ; 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]
911 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
912 ; GFX10-NEXT: ; return to shader part epilog
914 ; GFX11-LABEL: getresinfo_1d:
915 ; GFX11: ; %bb.0: ; %main_body
916 ; 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]
917 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
918 ; GFX11-NEXT: ; return to shader part epilog
920 ; GFX12-LABEL: getresinfo_1d:
921 ; GFX12: ; %bb.0: ; %main_body
922 ; 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]
923 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
924 ; GFX12-NEXT: ; return to shader part epilog
926 %mip = extractelement <2 x i16> %coords, i32 0
927 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
931 define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
932 ; GFX9-LABEL: getresinfo_2d:
933 ; GFX9: ; %bb.0: ; %main_body
934 ; 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]
935 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
936 ; GFX9-NEXT: ; return to shader part epilog
938 ; GFX10-LABEL: getresinfo_2d:
939 ; GFX10: ; %bb.0: ; %main_body
940 ; 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]
941 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
942 ; GFX10-NEXT: ; return to shader part epilog
944 ; GFX11-LABEL: getresinfo_2d:
945 ; GFX11: ; %bb.0: ; %main_body
946 ; 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]
947 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
948 ; GFX11-NEXT: ; return to shader part epilog
950 ; GFX12-LABEL: getresinfo_2d:
951 ; GFX12: ; %bb.0: ; %main_body
952 ; 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]
953 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
954 ; GFX12-NEXT: ; return to shader part epilog
956 %mip = extractelement <2 x i16> %coords, i32 0
957 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
961 define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
962 ; GFX9-LABEL: getresinfo_3d:
963 ; GFX9: ; %bb.0: ; %main_body
964 ; 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]
965 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
966 ; GFX9-NEXT: ; return to shader part epilog
968 ; GFX10-LABEL: getresinfo_3d:
969 ; GFX10: ; %bb.0: ; %main_body
970 ; 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]
971 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
972 ; GFX10-NEXT: ; return to shader part epilog
974 ; GFX11-LABEL: getresinfo_3d:
975 ; GFX11: ; %bb.0: ; %main_body
976 ; 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]
977 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
978 ; GFX11-NEXT: ; return to shader part epilog
980 ; GFX12-LABEL: getresinfo_3d:
981 ; GFX12: ; %bb.0: ; %main_body
982 ; 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]
983 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
984 ; GFX12-NEXT: ; return to shader part epilog
986 %mip = extractelement <2 x i16> %coords, i32 0
987 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
991 define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
992 ; GFX9-LABEL: getresinfo_cube:
993 ; GFX9: ; %bb.0: ; %main_body
994 ; 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]
995 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
996 ; GFX9-NEXT: ; return to shader part epilog
998 ; GFX10-LABEL: getresinfo_cube:
999 ; GFX10: ; %bb.0: ; %main_body
1000 ; 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]
1001 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1002 ; GFX10-NEXT: ; return to shader part epilog
1004 ; GFX11-LABEL: getresinfo_cube:
1005 ; GFX11: ; %bb.0: ; %main_body
1006 ; 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]
1007 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1008 ; GFX11-NEXT: ; return to shader part epilog
1010 ; GFX12-LABEL: getresinfo_cube:
1011 ; GFX12: ; %bb.0: ; %main_body
1012 ; 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]
1013 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1014 ; GFX12-NEXT: ; return to shader part epilog
1016 %mip = extractelement <2 x i16> %coords, i32 0
1017 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1021 define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1022 ; GFX9-LABEL: getresinfo_1darray:
1023 ; GFX9: ; %bb.0: ; %main_body
1024 ; 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]
1025 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1026 ; GFX9-NEXT: ; return to shader part epilog
1028 ; GFX10-LABEL: getresinfo_1darray:
1029 ; GFX10: ; %bb.0: ; %main_body
1030 ; 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]
1031 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1032 ; GFX10-NEXT: ; return to shader part epilog
1034 ; GFX11-LABEL: getresinfo_1darray:
1035 ; GFX11: ; %bb.0: ; %main_body
1036 ; 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]
1037 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1038 ; GFX11-NEXT: ; return to shader part epilog
1040 ; GFX12-LABEL: getresinfo_1darray:
1041 ; GFX12: ; %bb.0: ; %main_body
1042 ; 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]
1043 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1044 ; GFX12-NEXT: ; return to shader part epilog
1046 %mip = extractelement <2 x i16> %coords, i32 0
1047 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1051 define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1052 ; GFX9-LABEL: getresinfo_2darray:
1053 ; GFX9: ; %bb.0: ; %main_body
1054 ; 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]
1055 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1056 ; GFX9-NEXT: ; return to shader part epilog
1058 ; GFX10-LABEL: getresinfo_2darray:
1059 ; GFX10: ; %bb.0: ; %main_body
1060 ; 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]
1061 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1062 ; GFX10-NEXT: ; return to shader part epilog
1064 ; GFX11-LABEL: getresinfo_2darray:
1065 ; GFX11: ; %bb.0: ; %main_body
1066 ; 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]
1067 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1068 ; GFX11-NEXT: ; return to shader part epilog
1070 ; GFX12-LABEL: getresinfo_2darray:
1071 ; GFX12: ; %bb.0: ; %main_body
1072 ; 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]
1073 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1074 ; GFX12-NEXT: ; return to shader part epilog
1076 %mip = extractelement <2 x i16> %coords, i32 0
1077 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1081 define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1082 ; GFX9-LABEL: getresinfo_2dmsaa:
1083 ; GFX9: ; %bb.0: ; %main_body
1084 ; 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]
1085 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1086 ; GFX9-NEXT: ; return to shader part epilog
1088 ; GFX10-LABEL: getresinfo_2dmsaa:
1089 ; GFX10: ; %bb.0: ; %main_body
1090 ; 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]
1091 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1092 ; GFX10-NEXT: ; return to shader part epilog
1094 ; GFX11-LABEL: getresinfo_2dmsaa:
1095 ; GFX11: ; %bb.0: ; %main_body
1096 ; 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]
1097 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1098 ; GFX11-NEXT: ; return to shader part epilog
1100 ; GFX12-LABEL: getresinfo_2dmsaa:
1101 ; GFX12: ; %bb.0: ; %main_body
1102 ; 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]
1103 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1104 ; GFX12-NEXT: ; return to shader part epilog
1106 %mip = extractelement <2 x i16> %coords, i32 0
1107 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1111 define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1112 ; GFX9-LABEL: getresinfo_2darraymsaa:
1113 ; GFX9: ; %bb.0: ; %main_body
1114 ; 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]
1115 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1116 ; GFX9-NEXT: ; return to shader part epilog
1118 ; GFX10-LABEL: getresinfo_2darraymsaa:
1119 ; GFX10: ; %bb.0: ; %main_body
1120 ; 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]
1121 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1122 ; GFX10-NEXT: ; return to shader part epilog
1124 ; GFX11-LABEL: getresinfo_2darraymsaa:
1125 ; GFX11: ; %bb.0: ; %main_body
1126 ; 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]
1127 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1128 ; GFX11-NEXT: ; return to shader part epilog
1130 ; GFX12-LABEL: getresinfo_2darraymsaa:
1131 ; GFX12: ; %bb.0: ; %main_body
1132 ; 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]
1133 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1134 ; GFX12-NEXT: ; return to shader part epilog
1136 %mip = extractelement <2 x i16> %coords, i32 0
1137 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1141 define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1142 ; GFX9-LABEL: load_1d_V1:
1143 ; GFX9: ; %bb.0: ; %main_body
1144 ; GFX9-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm a16 ; encoding: [0x00,0x98,0x00,0xf0,0x00,0x00,0x00,0x00]
1145 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1146 ; GFX9-NEXT: ; return to shader part epilog
1148 ; GFX10-LABEL: load_1d_V1:
1149 ; GFX10: ; %bb.0: ; %main_body
1150 ; 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]
1151 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1152 ; GFX10-NEXT: ; return to shader part epilog
1154 ; GFX11-LABEL: load_1d_V1:
1155 ; GFX11: ; %bb.0: ; %main_body
1156 ; 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]
1157 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1158 ; GFX11-NEXT: ; return to shader part epilog
1160 ; GFX12-LABEL: load_1d_V1:
1161 ; GFX12: ; %bb.0: ; %main_body
1162 ; 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]
1163 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1164 ; GFX12-NEXT: ; return to shader part epilog
1166 %s = extractelement <2 x i16> %coords, i32 0
1167 %v = call float @llvm.amdgcn.image.load.1d.f32.i16(i32 8, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1171 define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1172 ; GFX9-LABEL: load_1d_V2:
1173 ; GFX9: ; %bb.0: ; %main_body
1174 ; GFX9-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm a16 ; encoding: [0x00,0x99,0x00,0xf0,0x00,0x00,0x00,0x00]
1175 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1176 ; GFX9-NEXT: ; return to shader part epilog
1178 ; GFX10-LABEL: load_1d_V2:
1179 ; GFX10: ; %bb.0: ; %main_body
1180 ; 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]
1181 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1182 ; GFX10-NEXT: ; return to shader part epilog
1184 ; GFX11-LABEL: load_1d_V2:
1185 ; GFX11: ; %bb.0: ; %main_body
1186 ; 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]
1187 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1188 ; GFX11-NEXT: ; return to shader part epilog
1190 ; GFX12-LABEL: load_1d_V2:
1191 ; GFX12: ; %bb.0: ; %main_body
1192 ; 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]
1193 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1194 ; GFX12-NEXT: ; return to shader part epilog
1196 %s = extractelement <2 x i16> %coords, i32 0
1197 %v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32 9, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1201 define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, <2 x i16> %coords) {
1202 ; GFX9-LABEL: store_1d_V1:
1203 ; GFX9: ; %bb.0: ; %main_body
1204 ; GFX9-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm a16 ; encoding: [0x00,0x92,0x20,0xf0,0x01,0x00,0x00,0x00]
1205 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1207 ; GFX10-LABEL: store_1d_V1:
1208 ; GFX10: ; %bb.0: ; %main_body
1209 ; 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]
1210 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1212 ; GFX11-LABEL: store_1d_V1:
1213 ; GFX11: ; %bb.0: ; %main_body
1214 ; 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]
1215 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1216 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1217 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1219 ; GFX12-LABEL: store_1d_V1:
1220 ; GFX12: ; %bb.0: ; %main_body
1221 ; 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]
1222 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1223 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1224 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1226 %s = extractelement <2 x i16> %coords, i32 0
1227 call void @llvm.amdgcn.image.store.1d.f32.i16(float %vdata, i32 2, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)
1231 define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, <2 x i16> %coords) {
1232 ; GFX9-LABEL: store_1d_V2:
1233 ; GFX9: ; %bb.0: ; %main_body
1234 ; GFX9-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm a16 ; encoding: [0x00,0x9c,0x20,0xf0,0x02,0x00,0x00,0x00]
1235 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1237 ; GFX10-LABEL: store_1d_V2:
1238 ; GFX10: ; %bb.0: ; %main_body
1239 ; 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]
1240 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1242 ; GFX11-LABEL: store_1d_V2:
1243 ; GFX11: ; %bb.0: ; %main_body
1244 ; 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]
1245 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1246 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1247 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1249 ; GFX12-LABEL: store_1d_V2:
1250 ; GFX12: ; %bb.0: ; %main_body
1251 ; 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]
1252 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1253 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1254 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1256 %s = extractelement <2 x i16> %coords, i32 0
1257 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)
1261 define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1262 ; GFX9-LABEL: load_1d_glc:
1263 ; GFX9: ; %bb.0: ; %main_body
1264 ; 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]
1265 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1266 ; GFX9-NEXT: ; return to shader part epilog
1268 ; GFX10-LABEL: load_1d_glc:
1269 ; GFX10: ; %bb.0: ; %main_body
1270 ; 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]
1271 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1272 ; GFX10-NEXT: ; return to shader part epilog
1274 ; GFX11-LABEL: load_1d_glc:
1275 ; GFX11: ; %bb.0: ; %main_body
1276 ; 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]
1277 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1278 ; GFX11-NEXT: ; return to shader part epilog
1280 ; GFX12-LABEL: load_1d_glc:
1281 ; GFX12: ; %bb.0: ; %main_body
1282 ; 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]
1283 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1284 ; GFX12-NEXT: ; return to shader part epilog
1286 %s = extractelement <2 x i16> %coords, i32 0
1287 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 1)
1291 define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1292 ; GFX9-LABEL: load_1d_slc:
1293 ; GFX9: ; %bb.0: ; %main_body
1294 ; 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]
1295 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1296 ; GFX9-NEXT: ; return to shader part epilog
1298 ; GFX10-LABEL: load_1d_slc:
1299 ; GFX10: ; %bb.0: ; %main_body
1300 ; 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]
1301 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1302 ; GFX10-NEXT: ; return to shader part epilog
1304 ; GFX11-LABEL: load_1d_slc:
1305 ; GFX11: ; %bb.0: ; %main_body
1306 ; 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]
1307 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1308 ; GFX11-NEXT: ; return to shader part epilog
1310 ; GFX12-LABEL: load_1d_slc:
1311 ; GFX12: ; %bb.0: ; %main_body
1312 ; 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]
1313 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1314 ; GFX12-NEXT: ; return to shader part epilog
1316 %s = extractelement <2 x i16> %coords, i32 0
1317 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 2)
1321 define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {
1322 ; GFX9-LABEL: load_1d_glc_slc:
1323 ; GFX9: ; %bb.0: ; %main_body
1324 ; 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]
1325 ; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf]
1326 ; GFX9-NEXT: ; return to shader part epilog
1328 ; GFX10-LABEL: load_1d_glc_slc:
1329 ; GFX10: ; %bb.0: ; %main_body
1330 ; 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]
1331 ; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf]
1332 ; GFX10-NEXT: ; return to shader part epilog
1334 ; GFX11-LABEL: load_1d_glc_slc:
1335 ; GFX11: ; %bb.0: ; %main_body
1336 ; 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]
1337 ; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf]
1338 ; GFX11-NEXT: ; return to shader part epilog
1340 ; GFX12-LABEL: load_1d_glc_slc:
1341 ; GFX12: ; %bb.0: ; %main_body
1342 ; 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]
1343 ; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf]
1344 ; GFX12-NEXT: ; return to shader part epilog
1346 %s = extractelement <2 x i16> %coords, i32 0
1347 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 3)
1351 define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
1352 ; GFX9-LABEL: store_1d_glc:
1353 ; GFX9: ; %bb.0: ; %main_body
1354 ; 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]
1355 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1357 ; GFX10-LABEL: store_1d_glc:
1358 ; GFX10: ; %bb.0: ; %main_body
1359 ; 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]
1360 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1362 ; GFX11-LABEL: store_1d_glc:
1363 ; GFX11: ; %bb.0: ; %main_body
1364 ; 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]
1365 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1366 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1367 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1369 ; GFX12-LABEL: store_1d_glc:
1370 ; GFX12: ; %bb.0: ; %main_body
1371 ; 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]
1372 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1373 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1374 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1376 %s = extractelement <2 x i16> %coords, i32 0
1377 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)
1381 define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
1382 ; GFX9-LABEL: store_1d_slc:
1383 ; GFX9: ; %bb.0: ; %main_body
1384 ; 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]
1385 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1387 ; GFX10-LABEL: store_1d_slc:
1388 ; GFX10: ; %bb.0: ; %main_body
1389 ; 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]
1390 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1392 ; GFX11-LABEL: store_1d_slc:
1393 ; GFX11: ; %bb.0: ; %main_body
1394 ; 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]
1395 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1396 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1397 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1399 ; GFX12-LABEL: store_1d_slc:
1400 ; GFX12: ; %bb.0: ; %main_body
1401 ; 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]
1402 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1403 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1404 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1406 %s = extractelement <2 x i16> %coords, i32 0
1407 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)
1411 define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {
1412 ; GFX9-LABEL: store_1d_glc_slc:
1413 ; GFX9: ; %bb.0: ; %main_body
1414 ; 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]
1415 ; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1417 ; GFX10-LABEL: store_1d_glc_slc:
1418 ; GFX10: ; %bb.0: ; %main_body
1419 ; 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]
1420 ; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
1422 ; GFX11-LABEL: store_1d_glc_slc:
1423 ; GFX11: ; %bb.0: ; %main_body
1424 ; 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]
1425 ; GFX11-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1426 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1427 ; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1429 ; GFX12-LABEL: store_1d_glc_slc:
1430 ; GFX12: ; %bb.0: ; %main_body
1431 ; 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]
1432 ; GFX12-NEXT: s_nop 0 ; encoding: [0x00,0x00,0x80,0xbf]
1433 ; GFX12-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ; encoding: [0x03,0x00,0xb6,0xbf]
1434 ; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
1436 %s = extractelement <2 x i16> %coords, i32 0
1437 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)
1441 define amdgpu_ps <4 x float> @getresinfo_dmask0(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) #0 {
1442 ; GFX9-LABEL: getresinfo_dmask0:
1443 ; GFX9: ; %bb.0: ; %main_body
1444 ; GFX9-NEXT: ; return to shader part epilog
1446 ; GFX10-LABEL: getresinfo_dmask0:
1447 ; GFX10: ; %bb.0: ; %main_body
1448 ; GFX10-NEXT: ; return to shader part epilog
1450 ; GFX11-LABEL: getresinfo_dmask0:
1451 ; GFX11: ; %bb.0: ; %main_body
1452 ; GFX11-NEXT: ; return to shader part epilog
1454 ; GFX12-LABEL: getresinfo_dmask0:
1455 ; GFX12: ; %bb.0: ; %main_body
1456 ; GFX12-NEXT: ; return to shader part epilog
1458 %mip = extractelement <2 x i16> %coords, i32 0
1459 %r = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 0, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)
1463 declare <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #1
1464 declare <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1465 declare <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1466 declare <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1467 declare <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1468 declare <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1469 declare <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1470 declare <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1472 declare <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1473 declare <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1474 declare <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1475 declare <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1476 declare <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1
1477 declare <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1
1479 declare void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float>, i32, i16, <8 x i32>, i32, i32) #0
1480 declare void @llvm.amdgcn.image.store.2d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0
1481 declare void @llvm.amdgcn.image.store.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1482 declare void @llvm.amdgcn.image.store.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1483 declare void @llvm.amdgcn.image.store.1darray.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0
1484 declare void @llvm.amdgcn.image.store.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1485 declare void @llvm.amdgcn.image.store.2dmsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1486 declare void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1488 declare void @llvm.amdgcn.image.store.mip.1d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0
1489 declare void @llvm.amdgcn.image.store.mip.2d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1490 declare void @llvm.amdgcn.image.store.mip.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1491 declare void @llvm.amdgcn.image.store.mip.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1492 declare void @llvm.amdgcn.image.store.mip.1darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0
1493 declare void @llvm.amdgcn.image.store.mip.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0
1495 declare <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1496 declare <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1497 declare <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1498 declare <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1499 declare <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1500 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1501 declare <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1502 declare <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2
1504 declare float @llvm.amdgcn.image.load.1d.f32.i16(i32, i16, <8 x i32>, i32, i32) #1
1505 declare float @llvm.amdgcn.image.load.2d.f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1
1506 declare <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32, i16, <8 x i32>, i32, i32) #1
1507 declare void @llvm.amdgcn.image.store.1d.f32.i16(float, i32, i16, <8 x i32>, i32, i32) #0
1508 declare void @llvm.amdgcn.image.store.1d.v2f32.i16(<2 x float>, i32, i16, <8 x i32>, i32, i32) #0
1510 attributes #0 = { nounwind }
1511 attributes #1 = { nounwind readonly }
1512 attributes #2 = { nounwind readnone }