1 ;RUN: llc < %s -mtriple=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck -check-prefix=VERDE %s
2 ;RUN: llc < %s -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck %s
4 ;CHECK-LABEL: {{^}}buffer_store:
6 ;CHECK: buffer_store_dwordx4 v[0:3], off, s[0:3], 0
7 ;CHECK: buffer_store_dwordx4 v[4:7], off, s[0:3], 0 glc
8 ;CHECK: buffer_store_dwordx4 v[8:11], off, s[0:3], 0 slc
9 define amdgpu_ps void @buffer_store(ptr addrspace(8) inreg, <4 x float>, <4 x float>, <4 x float>) {
11 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %1, ptr addrspace(8) %0, i32 0, i32 0, i32 0)
12 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %2, ptr addrspace(8) %0, i32 0, i32 0, i32 1)
13 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %3, ptr addrspace(8) %0, i32 0, i32 0, i32 2)
17 ;CHECK-LABEL: {{^}}buffer_store_immoffs:
19 ;CHECK: buffer_store_dwordx4 v[0:3], off, s[0:3], 0 offset:42
20 define amdgpu_ps void @buffer_store_immoffs(ptr addrspace(8) inreg, <4 x float>) {
22 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %1, ptr addrspace(8) %0, i32 42, i32 0, i32 0)
26 ;CHECK-LABEL: {{^}}buffer_store_ofs:
28 ;CHECK: buffer_store_dwordx4 v[0:3], v4, s[0:3], 0 offen
29 define amdgpu_ps void @buffer_store_ofs(ptr addrspace(8) inreg, <4 x float>, i32) {
31 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %1, ptr addrspace(8) %0, i32 %2, i32 0, i32 0)
35 ; Ideally, the register allocator would avoid the wait here
37 ;CHECK-LABEL: {{^}}buffer_store_wait:
39 ;CHECK: buffer_store_dwordx4 v[0:3], v4, s[0:3], 0 offen
40 ;VERDE: s_waitcnt expcnt(0)
41 ;CHECK: buffer_load_dwordx4 v[0:3], v5, s[0:3], 0 offen
42 ;CHECK: s_waitcnt vmcnt(0)
43 ;CHECK: buffer_store_dwordx4 v[0:3], v6, s[0:3], 0 offen
44 define amdgpu_ps void @buffer_store_wait(ptr addrspace(8) inreg, <4 x float>, i32, i32, i32) {
46 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %1, ptr addrspace(8) %0, i32 %2, i32 0, i32 0)
47 %data = call <4 x float> @llvm.amdgcn.raw.ptr.buffer.load.v4f32(ptr addrspace(8) %0, i32 %3, i32 0, i32 0)
48 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float> %data, ptr addrspace(8) %0, i32 %4, i32 0, i32 0)
52 ;CHECK-LABEL: {{^}}buffer_store_x1:
54 ;CHECK: buffer_store_dword v0, v1, s[0:3], 0 offen
55 define amdgpu_ps void @buffer_store_x1(ptr addrspace(8) inreg %rsrc, float %data, i32 %offset) {
57 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
61 ;CHECK-LABEL: {{^}}buffer_store_x2:
63 ;CHECK: buffer_store_dwordx2 v[0:1], v2, s[0:3], 0 offen
64 define amdgpu_ps void @buffer_store_x2(ptr addrspace(8) inreg %rsrc, <2 x float> %data, i32 %offset) #0 {
66 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
70 ;CHECK-LABEL: {{^}}buffer_store_x1_offen_merged_and:
72 ;CHECK-DAG: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:4
73 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:28
74 define amdgpu_ps void @buffer_store_x1_offen_merged_and(ptr addrspace(8) inreg %rsrc, i32 %a, float %v1, float %v2, float %v3, float %v4, float %v5, float %v6) {
81 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v1, ptr addrspace(8) %rsrc, i32 %a1, i32 0, i32 0)
82 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v2, ptr addrspace(8) %rsrc, i32 %a2, i32 0, i32 0)
83 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v3, ptr addrspace(8) %rsrc, i32 %a3, i32 0, i32 0)
84 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v4, ptr addrspace(8) %rsrc, i32 %a4, i32 0, i32 0)
85 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v5, ptr addrspace(8) %rsrc, i32 %a5, i32 0, i32 0)
86 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v6, ptr addrspace(8) %rsrc, i32 %a6, i32 0, i32 0)
90 ;CHECK-LABEL: {{^}}buffer_store_x1_offen_merged_or:
92 ;CHECK-DAG: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v{{[0-9]}}, s[0:3], 0 offen offset:4
93 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v{{[0-9]}}, s[0:3], 0 offen offset:28
94 define amdgpu_ps void @buffer_store_x1_offen_merged_or(ptr addrspace(8) inreg %rsrc, i32 %inp, float %v1, float %v2, float %v3, float %v4, float %v5, float %v6) {
102 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v1, ptr addrspace(8) %rsrc, i32 %a1, i32 0, i32 0)
103 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v2, ptr addrspace(8) %rsrc, i32 %a2, i32 0, i32 0)
104 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v3, ptr addrspace(8) %rsrc, i32 %a3, i32 0, i32 0)
105 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v4, ptr addrspace(8) %rsrc, i32 %a4, i32 0, i32 0)
106 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v5, ptr addrspace(8) %rsrc, i32 %a5, i32 0, i32 0)
107 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v6, ptr addrspace(8) %rsrc, i32 %a6, i32 0, i32 0)
112 ;CHECK-LABEL: {{^}}buffer_store_x1_offen_merged_glc_slc:
113 ;CHECK-NOT: s_waitcnt
114 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:4{{$}}
115 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:12 glc{{$}}
116 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:28 glc slc{{$}}
117 define amdgpu_ps void @buffer_store_x1_offen_merged_glc_slc(ptr addrspace(8) inreg %rsrc, i32 %a, float %v1, float %v2, float %v3, float %v4, float %v5, float %v6) {
124 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v1, ptr addrspace(8) %rsrc, i32 %a1, i32 0, i32 0)
125 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v2, ptr addrspace(8) %rsrc, i32 %a2, i32 0, i32 0)
126 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v3, ptr addrspace(8) %rsrc, i32 %a3, i32 0, i32 1)
127 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v4, ptr addrspace(8) %rsrc, i32 %a4, i32 0, i32 1)
128 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v5, ptr addrspace(8) %rsrc, i32 %a5, i32 0, i32 3)
129 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v6, ptr addrspace(8) %rsrc, i32 %a6, i32 0, i32 3)
133 ;CHECK-LABEL: {{^}}buffer_store_x2_offen_merged_and:
134 ;CHECK-NOT: s_waitcnt
135 ;CHECK: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:4
136 define amdgpu_ps void @buffer_store_x2_offen_merged_and(ptr addrspace(8) inreg %rsrc, i32 %a, <2 x float> %v1, <2 x float> %v2) {
139 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %v1, ptr addrspace(8) %rsrc, i32 %a1, i32 0, i32 0)
140 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %v2, ptr addrspace(8) %rsrc, i32 %a2, i32 0, i32 0)
144 ;CHECK-LABEL: {{^}}buffer_store_x2_offen_merged_or:
145 ;CHECK-NOT: s_waitcnt
146 ;CHECK: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v{{[0-9]}}, s[0:3], 0 offen offset:4
147 define amdgpu_ps void @buffer_store_x2_offen_merged_or(ptr addrspace(8) inreg %rsrc, i32 %inp, <2 x float> %v1, <2 x float> %v2) {
151 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %v1, ptr addrspace(8) %rsrc, i32 %a1, i32 0, i32 0)
152 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %v2, ptr addrspace(8) %rsrc, i32 %a2, i32 0, i32 0)
156 ;CHECK-LABEL: {{^}}buffer_store_x1_offset_merged:
157 ;CHECK-NOT: s_waitcnt
158 ;CHECK-DAG: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:4
159 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:28
160 define amdgpu_ps void @buffer_store_x1_offset_merged(ptr addrspace(8) inreg %rsrc, float %v1, float %v2, float %v3, float %v4, float %v5, float %v6) {
161 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v1, ptr addrspace(8) %rsrc, i32 4, i32 0, i32 0)
162 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v2, ptr addrspace(8) %rsrc, i32 8, i32 0, i32 0)
163 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v3, ptr addrspace(8) %rsrc, i32 12, i32 0, i32 0)
164 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v4, ptr addrspace(8) %rsrc, i32 16, i32 0, i32 0)
165 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v5, ptr addrspace(8) %rsrc, i32 28, i32 0, i32 0)
166 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v6, ptr addrspace(8) %rsrc, i32 32, i32 0, i32 0)
170 ;CHECK-LABEL: {{^}}buffer_store_x2_offset_merged:
171 ;CHECK-NOT: s_waitcnt
172 ;CHECK: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:4
173 define amdgpu_ps void @buffer_store_x2_offset_merged(ptr addrspace(8) inreg %rsrc, <2 x float> %v1,<2 x float> %v2) {
174 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %v1, ptr addrspace(8) %rsrc, i32 4, i32 0, i32 0)
175 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float> %v2, ptr addrspace(8) %rsrc, i32 12, i32 0, i32 0)
179 ;CHECK-LABEL: {{^}}buffer_store_int:
180 ;CHECK-NOT: s_waitcnt
181 ;CHECK: buffer_store_dwordx4 v[0:3], off, s[0:3], 0
182 ;CHECK: buffer_store_dwordx2 v[4:5], off, s[0:3], 0 glc
183 ;CHECK: buffer_store_dword v6, off, s[0:3], 0 slc
184 define amdgpu_ps void @buffer_store_int(ptr addrspace(8) inreg, <4 x i32>, <2 x i32>, i32) {
186 call void @llvm.amdgcn.raw.ptr.buffer.store.v4i32(<4 x i32> %1, ptr addrspace(8) %0, i32 0, i32 0, i32 0)
187 call void @llvm.amdgcn.raw.ptr.buffer.store.v2i32(<2 x i32> %2, ptr addrspace(8) %0, i32 0, i32 0, i32 1)
188 call void @llvm.amdgcn.raw.ptr.buffer.store.i32(i32 %3, ptr addrspace(8) %0, i32 0, i32 0, i32 2)
192 ;CHECK-LABEL: {{^}}raw_ptr_buffer_store_byte:
194 ;CHECK-NEXT: v_cvt_u32_f32_e32 v{{[0-9]}}, v{{[0-9]}}
195 ;CHECK-NEXT: buffer_store_byte v{{[0-9]}}, off, s[0:3], 0
196 ;CHECK-NEXT: s_endpgm
197 define amdgpu_ps void @raw_ptr_buffer_store_byte(ptr addrspace(8) inreg %rsrc, float %v1) {
199 %v2 = fptoui float %v1 to i32
200 %v3 = trunc i32 %v2 to i8
201 call void @llvm.amdgcn.raw.ptr.buffer.store.i8(i8 %v3, ptr addrspace(8) %rsrc, i32 0, i32 0, i32 0)
205 ;CHECK-LABEL: {{^}}raw_ptr_buffer_store_short:
207 ;CHECK-NEXT: v_cvt_u32_f32_e32 v{{[0-9]}}, v{{[0-9]}}
208 ;CHECK-NEXT: buffer_store_short v{{[0-9]}}, off, s[0:3], 0
209 ;CHECK-NEXT: s_endpgm
210 define amdgpu_ps void @raw_ptr_buffer_store_short(ptr addrspace(8) inreg %rsrc, float %v1) {
212 %v2 = fptoui float %v1 to i32
213 %v3 = trunc i32 %v2 to i16
214 call void @llvm.amdgcn.raw.ptr.buffer.store.i16(i16 %v3, ptr addrspace(8) %rsrc, i32 0, i32 0, i32 0)
218 ;CHECK-LABEL: {{^}}raw_ptr_buffer_store_f16:
221 ;CHECK-NEXT: buffer_store_short v0, off, s[0:3], 0
222 ;CHECK-NEXT: s_endpgm
223 define amdgpu_ps void @raw_ptr_buffer_store_f16(ptr addrspace(8) inreg %rsrc, i32 %v1) {
225 %trunc = trunc i32 %v1 to i16
226 %cast = bitcast i16 %trunc to half
227 call void @llvm.amdgcn.raw.ptr.buffer.store.f16(half %cast, ptr addrspace(8) %rsrc, i32 0, i32 0, i32 0)
231 ;CHECK-LABEL: {{^}}buffer_store_v2f16:
232 ;CHECK-NOT: s_waitcnt
233 ;CHECK: buffer_store_dword v0, v1, s[0:3], 0 offen
234 define amdgpu_ps void @buffer_store_v2f16(ptr addrspace(8) inreg %rsrc, <2 x half> %data, i32 %offset) {
236 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f16(<2 x half> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
240 ;CHECK-LABEL: {{^}}buffer_store_v4f16:
241 ;CHECK-NOT: s_waitcnt
242 ;CHECK: buffer_store_dwordx2 v[0:1], v2, s[0:3], 0 offen
243 define amdgpu_ps void @buffer_store_v4f16(ptr addrspace(8) inreg %rsrc, <4 x half> %data, i32 %offset) #0 {
245 call void @llvm.amdgcn.raw.ptr.buffer.store.v4f16(<4 x half> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
249 ;CHECK-LABEL: {{^}}buffer_store_v8f16:
250 ;CHECK-NOT: s_waitcnt
251 ;CHECK: buffer_store_dwordx4 v[0:3], v4, s[0:3], 0 offen
252 define amdgpu_ps void @buffer_store_v8f16(ptr addrspace(8) inreg %rsrc, <8 x half> %data, i32 %offset) #0 {
254 call void @llvm.amdgcn.raw.ptr.buffer.store.v8f16(<8 x half> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
258 ;CHECK-LABEL: {{^}}buffer_store_v2bf16:
259 ;CHECK-NOT: s_waitcnt
260 ;CHECK: buffer_store_dword v0, v1, s[0:3], 0 offen
261 define amdgpu_ps void @buffer_store_v2bf16(ptr addrspace(8) inreg %rsrc, <2 x bfloat> %data, i32 %offset) {
262 call void @llvm.amdgcn.raw.ptr.buffer.store.v2bf16(<2 x bfloat> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
266 ;CHECK-LABEL: {{^}}buffer_store_v4bf16:
267 ;CHECK-NOT: s_waitcnt
268 ;CHECK: buffer_store_dwordx2 v[0:1], v2, s[0:3], 0 offen
269 define amdgpu_ps void @buffer_store_v4bf16(ptr addrspace(8) inreg %rsrc, <4 x bfloat> %data, i32 %offset) #0 {
270 call void @llvm.amdgcn.raw.ptr.buffer.store.v4bf16(<4 x bfloat> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
274 ;CHECK-LABEL: {{^}}raw_ptr_buffer_store_i16:
277 ;CHECK-NEXT: buffer_store_short v0, off, s[0:3], 0
278 ;CHECK-NEXT: s_endpgm
279 define amdgpu_ps void @raw_ptr_buffer_store_i16(ptr addrspace(8) inreg %rsrc, i32 %v1) {
281 %trunc = trunc i32 %v1 to i16
282 call void @llvm.amdgcn.raw.ptr.buffer.store.i16(i16 %trunc, ptr addrspace(8) %rsrc, i32 0, i32 0, i32 0)
286 ;CHECK-LABEL: {{^}}buffer_store_v2i16:
287 ;CHECK-NOT: s_waitcnt
288 ;CHECK: buffer_store_dword v0, v1, s[0:3], 0 offen
289 define amdgpu_ps void @buffer_store_v2i16(ptr addrspace(8) inreg %rsrc, <2 x i16> %data, i32 %offset) {
291 call void @llvm.amdgcn.raw.ptr.buffer.store.v2i16(<2 x i16> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
295 ;CHECK-LABEL: {{^}}buffer_store_v4i16:
296 ;CHECK-NOT: s_waitcnt
297 ;CHECK: buffer_store_dwordx2 v[0:1], v2, s[0:3], 0 offen
298 define amdgpu_ps void @buffer_store_v4i16(ptr addrspace(8) inreg %rsrc, <4 x i16> %data, i32 %offset) #0 {
300 call void @llvm.amdgcn.raw.ptr.buffer.store.v4i16(<4 x i16> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
305 ; define amdgpu_ps void @buffer_store_v6i16(ptr addrspace(8) inreg %rsrc, <6 x i16> %data, i32 %offset) #0 {
307 ; call void @llvm.amdgcn.raw.ptr.buffer.store.v6i16(<6 x i16> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
311 ;CHECK-LABEL: {{^}}buffer_store_v8i16:
312 ;CHECK-NOT: s_waitcnt
313 ;CHECK: buffer_store_dwordx4 v[0:3], v4, s[0:3], 0 offen
314 define amdgpu_ps void @buffer_store_v8i16(ptr addrspace(8) inreg %rsrc, <8 x i16> %data, i32 %offset) #0 {
316 call void @llvm.amdgcn.raw.ptr.buffer.store.v8i16(<8 x i16> %data, ptr addrspace(8) %rsrc, i32 %offset, i32 0, i32 0)
320 ;CHECK-LABEL: {{^}}raw_ptr_buffer_store_x1_offset_merged:
321 ;CHECK-NOT: s_waitcnt
322 ;CHECK-DAG: buffer_store_dwordx4 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:4
323 ;CHECK-DAG: buffer_store_dwordx2 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:28
324 define amdgpu_ps void @raw_ptr_buffer_store_x1_offset_merged(ptr addrspace(8) inreg %rsrc, float %v1, float %v2, float %v3, float %v4, float %v5, float %v6) {
325 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v1, ptr addrspace(8) %rsrc, i32 4, i32 0, i32 0)
326 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v2, ptr addrspace(8) %rsrc, i32 8, i32 0, i32 0)
327 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v3, ptr addrspace(8) %rsrc, i32 12, i32 0, i32 0)
328 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v4, ptr addrspace(8) %rsrc, i32 16, i32 0, i32 0)
329 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v5, ptr addrspace(8) %rsrc, i32 28, i32 0, i32 0)
330 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v6, ptr addrspace(8) %rsrc, i32 32, i32 0, i32 0)
334 ;CHECK-LABEL: {{^}}raw_ptr_buffer_store_x1_offset_swizzled_not_merged:
335 ;CHECK-DAG: buffer_store_dword v{{[0-9]}}, off, s[0:3], 0 offset:4
336 ;CHECK-DAG: buffer_store_dword v{{[0-9]}}, off, s[0:3], 0 offset:8
337 ;CHECK-DAG: buffer_store_dword v{{[0-9]}}, off, s[0:3], 0 offset:12
338 ;CHECK-DAG: buffer_store_dword v{{[0-9]}}, off, s[0:3], 0 offset:16
339 ;CHECK-DAG: buffer_store_dword v{{[0-9]}}, off, s[0:3], 0 offset:28
340 ;CHECK-DAG: buffer_store_dword v{{[0-9]}}, off, s[0:3], 0 offset:32
341 define amdgpu_ps void @raw_ptr_buffer_store_x1_offset_swizzled_not_merged(ptr addrspace(8) inreg %rsrc, float %v1, float %v2, float %v3, float %v4, float %v5, float %v6) {
342 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v1, ptr addrspace(8) %rsrc, i32 4, i32 0, i32 8)
343 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v2, ptr addrspace(8) %rsrc, i32 8, i32 0, i32 8)
344 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v3, ptr addrspace(8) %rsrc, i32 12, i32 0, i32 8)
345 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v4, ptr addrspace(8) %rsrc, i32 16, i32 0, i32 8)
346 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v5, ptr addrspace(8) %rsrc, i32 28, i32 0, i32 8)
347 call void @llvm.amdgcn.raw.ptr.buffer.store.f32(float %v6, ptr addrspace(8) %rsrc, i32 32, i32 0, i32 8)
351 define void @buffer_store_f64__voffset_add(ptr addrspace(8) inreg %rsrc, double %data, i32 %voffset) #0 {
352 ; VERDE-LABEL: buffer_store_f64__voffset_add:
354 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
355 ; VERDE-NEXT: s_mov_b32 s11, s17
356 ; VERDE-NEXT: s_mov_b32 s10, s16
357 ; VERDE-NEXT: s_mov_b32 s9, s7
358 ; VERDE-NEXT: s_mov_b32 s8, s6
359 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
360 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
361 ; VERDE-NEXT: s_setpc_b64 s[30:31]
363 ; CHECK-LABEL: buffer_store_f64__voffset_add:
365 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
366 ; CHECK-NEXT: s_mov_b32 s11, s17
367 ; CHECK-NEXT: s_mov_b32 s10, s16
368 ; CHECK-NEXT: s_mov_b32 s9, s7
369 ; CHECK-NEXT: s_mov_b32 s8, s6
370 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
371 ; CHECK-NEXT: s_waitcnt vmcnt(0)
372 ; CHECK-NEXT: s_setpc_b64 s[30:31]
373 %voffset.add = add i32 %voffset, 60
374 call void @llvm.amdgcn.raw.ptr.buffer.store.f64(double %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
378 define void @buffer_store_v2f64__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x double> %data, i32 %voffset) #0 {
379 ; VERDE-LABEL: buffer_store_v2f64__voffset_add:
381 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
382 ; VERDE-NEXT: s_mov_b32 s11, s17
383 ; VERDE-NEXT: s_mov_b32 s10, s16
384 ; VERDE-NEXT: s_mov_b32 s9, s7
385 ; VERDE-NEXT: s_mov_b32 s8, s6
386 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
387 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
388 ; VERDE-NEXT: s_setpc_b64 s[30:31]
390 ; CHECK-LABEL: buffer_store_v2f64__voffset_add:
392 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
393 ; CHECK-NEXT: s_mov_b32 s11, s17
394 ; CHECK-NEXT: s_mov_b32 s10, s16
395 ; CHECK-NEXT: s_mov_b32 s9, s7
396 ; CHECK-NEXT: s_mov_b32 s8, s6
397 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
398 ; CHECK-NEXT: s_waitcnt vmcnt(0)
399 ; CHECK-NEXT: s_setpc_b64 s[30:31]
400 %voffset.add = add i32 %voffset, 60
401 call void @llvm.amdgcn.raw.ptr.buffer.store.v2f64(<2 x double> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
405 define void @buffer_store_i64__voffset_add(ptr addrspace(8) inreg %rsrc, i64 %data, i32 %voffset) #0 {
406 ; VERDE-LABEL: buffer_store_i64__voffset_add:
408 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
409 ; VERDE-NEXT: s_mov_b32 s11, s17
410 ; VERDE-NEXT: s_mov_b32 s10, s16
411 ; VERDE-NEXT: s_mov_b32 s9, s7
412 ; VERDE-NEXT: s_mov_b32 s8, s6
413 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
414 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
415 ; VERDE-NEXT: s_setpc_b64 s[30:31]
417 ; CHECK-LABEL: buffer_store_i64__voffset_add:
419 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
420 ; CHECK-NEXT: s_mov_b32 s11, s17
421 ; CHECK-NEXT: s_mov_b32 s10, s16
422 ; CHECK-NEXT: s_mov_b32 s9, s7
423 ; CHECK-NEXT: s_mov_b32 s8, s6
424 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
425 ; CHECK-NEXT: s_waitcnt vmcnt(0)
426 ; CHECK-NEXT: s_setpc_b64 s[30:31]
427 %voffset.add = add i32 %voffset, 60
428 call void @llvm.amdgcn.raw.ptr.buffer.store.i64(i64 %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
432 define void @buffer_store_v2i64__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x i64> %data, i32 %voffset) #0 {
433 ; VERDE-LABEL: buffer_store_v2i64__voffset_add:
435 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
436 ; VERDE-NEXT: s_mov_b32 s11, s17
437 ; VERDE-NEXT: s_mov_b32 s10, s16
438 ; VERDE-NEXT: s_mov_b32 s9, s7
439 ; VERDE-NEXT: s_mov_b32 s8, s6
440 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
441 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
442 ; VERDE-NEXT: s_setpc_b64 s[30:31]
444 ; CHECK-LABEL: buffer_store_v2i64__voffset_add:
446 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
447 ; CHECK-NEXT: s_mov_b32 s11, s17
448 ; CHECK-NEXT: s_mov_b32 s10, s16
449 ; CHECK-NEXT: s_mov_b32 s9, s7
450 ; CHECK-NEXT: s_mov_b32 s8, s6
451 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
452 ; CHECK-NEXT: s_waitcnt vmcnt(0)
453 ; CHECK-NEXT: s_setpc_b64 s[30:31]
454 %voffset.add = add i32 %voffset, 60
455 call void @llvm.amdgcn.raw.ptr.buffer.store.v2i64(<2 x i64> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
459 define void @buffer_store_p0__voffset_add(ptr addrspace(8) inreg %rsrc, ptr %data, i32 %voffset) #0 {
460 ; VERDE-LABEL: buffer_store_p0__voffset_add:
462 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
463 ; VERDE-NEXT: s_mov_b32 s11, s17
464 ; VERDE-NEXT: s_mov_b32 s10, s16
465 ; VERDE-NEXT: s_mov_b32 s9, s7
466 ; VERDE-NEXT: s_mov_b32 s8, s6
467 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
468 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
469 ; VERDE-NEXT: s_setpc_b64 s[30:31]
471 ; CHECK-LABEL: buffer_store_p0__voffset_add:
473 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
474 ; CHECK-NEXT: s_mov_b32 s11, s17
475 ; CHECK-NEXT: s_mov_b32 s10, s16
476 ; CHECK-NEXT: s_mov_b32 s9, s7
477 ; CHECK-NEXT: s_mov_b32 s8, s6
478 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
479 ; CHECK-NEXT: s_waitcnt vmcnt(0)
480 ; CHECK-NEXT: s_setpc_b64 s[30:31]
481 %voffset.add = add i32 %voffset, 60
482 call void @llvm.amdgcn.raw.ptr.buffer.store.p0(ptr %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
486 define void @buffer_store_v2p0__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr> %data, i32 %voffset) #0 {
487 ; VERDE-LABEL: buffer_store_v2p0__voffset_add:
489 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
490 ; VERDE-NEXT: s_mov_b32 s11, s17
491 ; VERDE-NEXT: s_mov_b32 s10, s16
492 ; VERDE-NEXT: s_mov_b32 s9, s7
493 ; VERDE-NEXT: s_mov_b32 s8, s6
494 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
495 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
496 ; VERDE-NEXT: s_setpc_b64 s[30:31]
498 ; CHECK-LABEL: buffer_store_v2p0__voffset_add:
500 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
501 ; CHECK-NEXT: s_mov_b32 s11, s17
502 ; CHECK-NEXT: s_mov_b32 s10, s16
503 ; CHECK-NEXT: s_mov_b32 s9, s7
504 ; CHECK-NEXT: s_mov_b32 s8, s6
505 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
506 ; CHECK-NEXT: s_waitcnt vmcnt(0)
507 ; CHECK-NEXT: s_setpc_b64 s[30:31]
508 %voffset.add = add i32 %voffset, 60
509 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p0(<2 x ptr> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
513 define void @buffer_store_p1__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(1) %data, i32 %voffset) #0 {
514 ; VERDE-LABEL: buffer_store_p1__voffset_add:
516 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
517 ; VERDE-NEXT: s_mov_b32 s11, s17
518 ; VERDE-NEXT: s_mov_b32 s10, s16
519 ; VERDE-NEXT: s_mov_b32 s9, s7
520 ; VERDE-NEXT: s_mov_b32 s8, s6
521 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
522 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
523 ; VERDE-NEXT: s_setpc_b64 s[30:31]
525 ; CHECK-LABEL: buffer_store_p1__voffset_add:
527 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
528 ; CHECK-NEXT: s_mov_b32 s11, s17
529 ; CHECK-NEXT: s_mov_b32 s10, s16
530 ; CHECK-NEXT: s_mov_b32 s9, s7
531 ; CHECK-NEXT: s_mov_b32 s8, s6
532 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
533 ; CHECK-NEXT: s_waitcnt vmcnt(0)
534 ; CHECK-NEXT: s_setpc_b64 s[30:31]
535 %voffset.add = add i32 %voffset, 60
536 call void @llvm.amdgcn.raw.ptr.buffer.store.p1(ptr addrspace(1) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
540 define void @buffer_store_v2p1__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(1)> %data, i32 %voffset) #0 {
541 ; VERDE-LABEL: buffer_store_v2p1__voffset_add:
543 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
544 ; VERDE-NEXT: s_mov_b32 s11, s17
545 ; VERDE-NEXT: s_mov_b32 s10, s16
546 ; VERDE-NEXT: s_mov_b32 s9, s7
547 ; VERDE-NEXT: s_mov_b32 s8, s6
548 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
549 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
550 ; VERDE-NEXT: s_setpc_b64 s[30:31]
552 ; CHECK-LABEL: buffer_store_v2p1__voffset_add:
554 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
555 ; CHECK-NEXT: s_mov_b32 s11, s17
556 ; CHECK-NEXT: s_mov_b32 s10, s16
557 ; CHECK-NEXT: s_mov_b32 s9, s7
558 ; CHECK-NEXT: s_mov_b32 s8, s6
559 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
560 ; CHECK-NEXT: s_waitcnt vmcnt(0)
561 ; CHECK-NEXT: s_setpc_b64 s[30:31]
562 %voffset.add = add i32 %voffset, 60
563 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p1(<2 x ptr addrspace(1)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
567 define void @buffer_store_p4__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(4) %data, i32 %voffset) #0 {
568 ; VERDE-LABEL: buffer_store_p4__voffset_add:
570 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
571 ; VERDE-NEXT: s_mov_b32 s11, s17
572 ; VERDE-NEXT: s_mov_b32 s10, s16
573 ; VERDE-NEXT: s_mov_b32 s9, s7
574 ; VERDE-NEXT: s_mov_b32 s8, s6
575 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
576 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
577 ; VERDE-NEXT: s_setpc_b64 s[30:31]
579 ; CHECK-LABEL: buffer_store_p4__voffset_add:
581 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
582 ; CHECK-NEXT: s_mov_b32 s11, s17
583 ; CHECK-NEXT: s_mov_b32 s10, s16
584 ; CHECK-NEXT: s_mov_b32 s9, s7
585 ; CHECK-NEXT: s_mov_b32 s8, s6
586 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
587 ; CHECK-NEXT: s_waitcnt vmcnt(0)
588 ; CHECK-NEXT: s_setpc_b64 s[30:31]
589 %voffset.add = add i32 %voffset, 60
590 call void @llvm.amdgcn.raw.ptr.buffer.store.p4(ptr addrspace(4) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
594 define void @buffer_store_v2p4__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(4)> %data, i32 %voffset) #0 {
595 ; VERDE-LABEL: buffer_store_v2p4__voffset_add:
597 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
598 ; VERDE-NEXT: s_mov_b32 s11, s17
599 ; VERDE-NEXT: s_mov_b32 s10, s16
600 ; VERDE-NEXT: s_mov_b32 s9, s7
601 ; VERDE-NEXT: s_mov_b32 s8, s6
602 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
603 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
604 ; VERDE-NEXT: s_setpc_b64 s[30:31]
606 ; CHECK-LABEL: buffer_store_v2p4__voffset_add:
608 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
609 ; CHECK-NEXT: s_mov_b32 s11, s17
610 ; CHECK-NEXT: s_mov_b32 s10, s16
611 ; CHECK-NEXT: s_mov_b32 s9, s7
612 ; CHECK-NEXT: s_mov_b32 s8, s6
613 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
614 ; CHECK-NEXT: s_waitcnt vmcnt(0)
615 ; CHECK-NEXT: s_setpc_b64 s[30:31]
616 %voffset.add = add i32 %voffset, 60
617 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p4(<2 x ptr addrspace(4)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
621 define void @buffer_store_p999__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(999) %data, i32 %voffset) #0 {
622 ; VERDE-LABEL: buffer_store_p999__voffset_add:
624 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
625 ; VERDE-NEXT: s_mov_b32 s11, s17
626 ; VERDE-NEXT: s_mov_b32 s10, s16
627 ; VERDE-NEXT: s_mov_b32 s9, s7
628 ; VERDE-NEXT: s_mov_b32 s8, s6
629 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
630 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
631 ; VERDE-NEXT: s_setpc_b64 s[30:31]
633 ; CHECK-LABEL: buffer_store_p999__voffset_add:
635 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
636 ; CHECK-NEXT: s_mov_b32 s11, s17
637 ; CHECK-NEXT: s_mov_b32 s10, s16
638 ; CHECK-NEXT: s_mov_b32 s9, s7
639 ; CHECK-NEXT: s_mov_b32 s8, s6
640 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
641 ; CHECK-NEXT: s_waitcnt vmcnt(0)
642 ; CHECK-NEXT: s_setpc_b64 s[30:31]
643 %voffset.add = add i32 %voffset, 60
644 call void @llvm.amdgcn.raw.ptr.buffer.store.p999(ptr addrspace(999) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
648 define void @buffer_store_v2p999__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(999)> %data, i32 %voffset) #0 {
649 ; VERDE-LABEL: buffer_store_v2p999__voffset_add:
651 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
652 ; VERDE-NEXT: s_mov_b32 s11, s17
653 ; VERDE-NEXT: s_mov_b32 s10, s16
654 ; VERDE-NEXT: s_mov_b32 s9, s7
655 ; VERDE-NEXT: s_mov_b32 s8, s6
656 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
657 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
658 ; VERDE-NEXT: s_setpc_b64 s[30:31]
660 ; CHECK-LABEL: buffer_store_v2p999__voffset_add:
662 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
663 ; CHECK-NEXT: s_mov_b32 s11, s17
664 ; CHECK-NEXT: s_mov_b32 s10, s16
665 ; CHECK-NEXT: s_mov_b32 s9, s7
666 ; CHECK-NEXT: s_mov_b32 s8, s6
667 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
668 ; CHECK-NEXT: s_waitcnt vmcnt(0)
669 ; CHECK-NEXT: s_setpc_b64 s[30:31]
670 %voffset.add = add i32 %voffset, 60
671 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p999(<2 x ptr addrspace(999)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
675 define void @buffer_store_p2__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(2) %data, i32 %voffset) #0 {
676 ; VERDE-LABEL: buffer_store_p2__voffset_add:
678 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
679 ; VERDE-NEXT: s_mov_b32 s11, s17
680 ; VERDE-NEXT: s_mov_b32 s10, s16
681 ; VERDE-NEXT: s_mov_b32 s9, s7
682 ; VERDE-NEXT: s_mov_b32 s8, s6
683 ; VERDE-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
684 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
685 ; VERDE-NEXT: s_setpc_b64 s[30:31]
687 ; CHECK-LABEL: buffer_store_p2__voffset_add:
689 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
690 ; CHECK-NEXT: s_mov_b32 s11, s17
691 ; CHECK-NEXT: s_mov_b32 s10, s16
692 ; CHECK-NEXT: s_mov_b32 s9, s7
693 ; CHECK-NEXT: s_mov_b32 s8, s6
694 ; CHECK-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
695 ; CHECK-NEXT: s_waitcnt vmcnt(0)
696 ; CHECK-NEXT: s_setpc_b64 s[30:31]
697 %voffset.add = add i32 %voffset, 60
698 call void @llvm.amdgcn.raw.ptr.buffer.store.p2(ptr addrspace(2) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
702 define void @buffer_store_v2p2__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(2)> %data, i32 %voffset) #0 {
703 ; VERDE-LABEL: buffer_store_v2p2__voffset_add:
705 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
706 ; VERDE-NEXT: s_mov_b32 s11, s17
707 ; VERDE-NEXT: s_mov_b32 s10, s16
708 ; VERDE-NEXT: s_mov_b32 s9, s7
709 ; VERDE-NEXT: s_mov_b32 s8, s6
710 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
711 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
712 ; VERDE-NEXT: s_setpc_b64 s[30:31]
714 ; CHECK-LABEL: buffer_store_v2p2__voffset_add:
716 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
717 ; CHECK-NEXT: s_mov_b32 s11, s17
718 ; CHECK-NEXT: s_mov_b32 s10, s16
719 ; CHECK-NEXT: s_mov_b32 s9, s7
720 ; CHECK-NEXT: s_mov_b32 s8, s6
721 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
722 ; CHECK-NEXT: s_waitcnt vmcnt(0)
723 ; CHECK-NEXT: s_setpc_b64 s[30:31]
724 %voffset.add = add i32 %voffset, 60
725 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p2(<2 x ptr addrspace(2)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
729 define void @buffer_store_v3p2__voffset_add(ptr addrspace(8) inreg %rsrc, <3 x ptr addrspace(2)> %data, i32 %voffset) #0 {
730 ; VERDE-LABEL: buffer_store_v3p2__voffset_add:
732 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
733 ; VERDE-NEXT: s_mov_b32 s11, s17
734 ; VERDE-NEXT: s_mov_b32 s10, s16
735 ; VERDE-NEXT: s_mov_b32 s9, s7
736 ; VERDE-NEXT: s_mov_b32 s8, s6
737 ; VERDE-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
738 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
739 ; VERDE-NEXT: s_setpc_b64 s[30:31]
741 ; CHECK-LABEL: buffer_store_v3p2__voffset_add:
743 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
744 ; CHECK-NEXT: s_mov_b32 s11, s17
745 ; CHECK-NEXT: s_mov_b32 s10, s16
746 ; CHECK-NEXT: s_mov_b32 s9, s7
747 ; CHECK-NEXT: s_mov_b32 s8, s6
748 ; CHECK-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
749 ; CHECK-NEXT: s_waitcnt vmcnt(0)
750 ; CHECK-NEXT: s_setpc_b64 s[30:31]
751 %voffset.add = add i32 %voffset, 60
752 call void @llvm.amdgcn.raw.ptr.buffer.store.v3p2(<3 x ptr addrspace(2)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
756 define void @buffer_store_v4p2__voffset_add(ptr addrspace(8) inreg %rsrc, <4 x ptr addrspace(2)> %data, i32 %voffset) #0 {
757 ; VERDE-LABEL: buffer_store_v4p2__voffset_add:
759 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
760 ; VERDE-NEXT: s_mov_b32 s11, s17
761 ; VERDE-NEXT: s_mov_b32 s10, s16
762 ; VERDE-NEXT: s_mov_b32 s9, s7
763 ; VERDE-NEXT: s_mov_b32 s8, s6
764 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
765 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
766 ; VERDE-NEXT: s_setpc_b64 s[30:31]
768 ; CHECK-LABEL: buffer_store_v4p2__voffset_add:
770 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
771 ; CHECK-NEXT: s_mov_b32 s11, s17
772 ; CHECK-NEXT: s_mov_b32 s10, s16
773 ; CHECK-NEXT: s_mov_b32 s9, s7
774 ; CHECK-NEXT: s_mov_b32 s8, s6
775 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
776 ; CHECK-NEXT: s_waitcnt vmcnt(0)
777 ; CHECK-NEXT: s_setpc_b64 s[30:31]
778 %voffset.add = add i32 %voffset, 60
779 call void @llvm.amdgcn.raw.ptr.buffer.store.v4p2(<4 x ptr addrspace(2)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
783 define void @buffer_store_p3__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(3) %data, i32 %voffset) #0 {
784 ; VERDE-LABEL: buffer_store_p3__voffset_add:
786 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
787 ; VERDE-NEXT: s_mov_b32 s11, s17
788 ; VERDE-NEXT: s_mov_b32 s10, s16
789 ; VERDE-NEXT: s_mov_b32 s9, s7
790 ; VERDE-NEXT: s_mov_b32 s8, s6
791 ; VERDE-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
792 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
793 ; VERDE-NEXT: s_setpc_b64 s[30:31]
795 ; CHECK-LABEL: buffer_store_p3__voffset_add:
797 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
798 ; CHECK-NEXT: s_mov_b32 s11, s17
799 ; CHECK-NEXT: s_mov_b32 s10, s16
800 ; CHECK-NEXT: s_mov_b32 s9, s7
801 ; CHECK-NEXT: s_mov_b32 s8, s6
802 ; CHECK-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
803 ; CHECK-NEXT: s_waitcnt vmcnt(0)
804 ; CHECK-NEXT: s_setpc_b64 s[30:31]
805 %voffset.add = add i32 %voffset, 60
806 call void @llvm.amdgcn.raw.ptr.buffer.store.p3(ptr addrspace(3) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
810 define void @buffer_store_v2p3__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(3)> %data, i32 %voffset) #0 {
811 ; VERDE-LABEL: buffer_store_v2p3__voffset_add:
813 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
814 ; VERDE-NEXT: s_mov_b32 s11, s17
815 ; VERDE-NEXT: s_mov_b32 s10, s16
816 ; VERDE-NEXT: s_mov_b32 s9, s7
817 ; VERDE-NEXT: s_mov_b32 s8, s6
818 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
819 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
820 ; VERDE-NEXT: s_setpc_b64 s[30:31]
822 ; CHECK-LABEL: buffer_store_v2p3__voffset_add:
824 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
825 ; CHECK-NEXT: s_mov_b32 s11, s17
826 ; CHECK-NEXT: s_mov_b32 s10, s16
827 ; CHECK-NEXT: s_mov_b32 s9, s7
828 ; CHECK-NEXT: s_mov_b32 s8, s6
829 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
830 ; CHECK-NEXT: s_waitcnt vmcnt(0)
831 ; CHECK-NEXT: s_setpc_b64 s[30:31]
832 %voffset.add = add i32 %voffset, 60
833 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p3(<2 x ptr addrspace(3)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
837 define void @buffer_store_v3p3__voffset_add(ptr addrspace(8) inreg %rsrc, <3 x ptr addrspace(3)> %data, i32 %voffset) #0 {
838 ; VERDE-LABEL: buffer_store_v3p3__voffset_add:
840 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
841 ; VERDE-NEXT: s_mov_b32 s11, s17
842 ; VERDE-NEXT: s_mov_b32 s10, s16
843 ; VERDE-NEXT: s_mov_b32 s9, s7
844 ; VERDE-NEXT: s_mov_b32 s8, s6
845 ; VERDE-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
846 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
847 ; VERDE-NEXT: s_setpc_b64 s[30:31]
849 ; CHECK-LABEL: buffer_store_v3p3__voffset_add:
851 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
852 ; CHECK-NEXT: s_mov_b32 s11, s17
853 ; CHECK-NEXT: s_mov_b32 s10, s16
854 ; CHECK-NEXT: s_mov_b32 s9, s7
855 ; CHECK-NEXT: s_mov_b32 s8, s6
856 ; CHECK-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
857 ; CHECK-NEXT: s_waitcnt vmcnt(0)
858 ; CHECK-NEXT: s_setpc_b64 s[30:31]
859 %voffset.add = add i32 %voffset, 60
860 call void @llvm.amdgcn.raw.ptr.buffer.store.v3p3(<3 x ptr addrspace(3)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
864 define void @buffer_store_v4p3__voffset_add(ptr addrspace(8) inreg %rsrc, <4 x ptr addrspace(3)> %data, i32 %voffset) #0 {
865 ; VERDE-LABEL: buffer_store_v4p3__voffset_add:
867 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
868 ; VERDE-NEXT: s_mov_b32 s11, s17
869 ; VERDE-NEXT: s_mov_b32 s10, s16
870 ; VERDE-NEXT: s_mov_b32 s9, s7
871 ; VERDE-NEXT: s_mov_b32 s8, s6
872 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
873 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
874 ; VERDE-NEXT: s_setpc_b64 s[30:31]
876 ; CHECK-LABEL: buffer_store_v4p3__voffset_add:
878 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
879 ; CHECK-NEXT: s_mov_b32 s11, s17
880 ; CHECK-NEXT: s_mov_b32 s10, s16
881 ; CHECK-NEXT: s_mov_b32 s9, s7
882 ; CHECK-NEXT: s_mov_b32 s8, s6
883 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
884 ; CHECK-NEXT: s_waitcnt vmcnt(0)
885 ; CHECK-NEXT: s_setpc_b64 s[30:31]
886 %voffset.add = add i32 %voffset, 60
887 call void @llvm.amdgcn.raw.ptr.buffer.store.v4p3(<4 x ptr addrspace(3)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
891 define void @buffer_store_p5__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(5) %data, i32 %voffset) #0 {
892 ; VERDE-LABEL: buffer_store_p5__voffset_add:
894 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
895 ; VERDE-NEXT: s_mov_b32 s11, s17
896 ; VERDE-NEXT: s_mov_b32 s10, s16
897 ; VERDE-NEXT: s_mov_b32 s9, s7
898 ; VERDE-NEXT: s_mov_b32 s8, s6
899 ; VERDE-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
900 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
901 ; VERDE-NEXT: s_setpc_b64 s[30:31]
903 ; CHECK-LABEL: buffer_store_p5__voffset_add:
905 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
906 ; CHECK-NEXT: s_mov_b32 s11, s17
907 ; CHECK-NEXT: s_mov_b32 s10, s16
908 ; CHECK-NEXT: s_mov_b32 s9, s7
909 ; CHECK-NEXT: s_mov_b32 s8, s6
910 ; CHECK-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
911 ; CHECK-NEXT: s_waitcnt vmcnt(0)
912 ; CHECK-NEXT: s_setpc_b64 s[30:31]
913 %voffset.add = add i32 %voffset, 60
914 call void @llvm.amdgcn.raw.ptr.buffer.store.p5(ptr addrspace(5) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
918 define void @buffer_store_v2p5__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(5)> %data, i32 %voffset) #0 {
919 ; VERDE-LABEL: buffer_store_v2p5__voffset_add:
921 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
922 ; VERDE-NEXT: s_mov_b32 s11, s17
923 ; VERDE-NEXT: s_mov_b32 s10, s16
924 ; VERDE-NEXT: s_mov_b32 s9, s7
925 ; VERDE-NEXT: s_mov_b32 s8, s6
926 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
927 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
928 ; VERDE-NEXT: s_setpc_b64 s[30:31]
930 ; CHECK-LABEL: buffer_store_v2p5__voffset_add:
932 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
933 ; CHECK-NEXT: s_mov_b32 s11, s17
934 ; CHECK-NEXT: s_mov_b32 s10, s16
935 ; CHECK-NEXT: s_mov_b32 s9, s7
936 ; CHECK-NEXT: s_mov_b32 s8, s6
937 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
938 ; CHECK-NEXT: s_waitcnt vmcnt(0)
939 ; CHECK-NEXT: s_setpc_b64 s[30:31]
940 %voffset.add = add i32 %voffset, 60
941 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p5(<2 x ptr addrspace(5)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
945 define void @buffer_store_v3p5__voffset_add(ptr addrspace(8) inreg %rsrc, <3 x ptr addrspace(5)> %data, i32 %voffset) #0 {
946 ; VERDE-LABEL: buffer_store_v3p5__voffset_add:
948 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
949 ; VERDE-NEXT: s_mov_b32 s11, s17
950 ; VERDE-NEXT: s_mov_b32 s10, s16
951 ; VERDE-NEXT: s_mov_b32 s9, s7
952 ; VERDE-NEXT: s_mov_b32 s8, s6
953 ; VERDE-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
954 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
955 ; VERDE-NEXT: s_setpc_b64 s[30:31]
957 ; CHECK-LABEL: buffer_store_v3p5__voffset_add:
959 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
960 ; CHECK-NEXT: s_mov_b32 s11, s17
961 ; CHECK-NEXT: s_mov_b32 s10, s16
962 ; CHECK-NEXT: s_mov_b32 s9, s7
963 ; CHECK-NEXT: s_mov_b32 s8, s6
964 ; CHECK-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
965 ; CHECK-NEXT: s_waitcnt vmcnt(0)
966 ; CHECK-NEXT: s_setpc_b64 s[30:31]
967 %voffset.add = add i32 %voffset, 60
968 call void @llvm.amdgcn.raw.ptr.buffer.store.v3p5(<3 x ptr addrspace(5)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
972 define void @buffer_store_v4p5__voffset_add(ptr addrspace(8) inreg %rsrc, <4 x ptr addrspace(5)> %data, i32 %voffset) #0 {
973 ; VERDE-LABEL: buffer_store_v4p5__voffset_add:
975 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
976 ; VERDE-NEXT: s_mov_b32 s11, s17
977 ; VERDE-NEXT: s_mov_b32 s10, s16
978 ; VERDE-NEXT: s_mov_b32 s9, s7
979 ; VERDE-NEXT: s_mov_b32 s8, s6
980 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
981 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
982 ; VERDE-NEXT: s_setpc_b64 s[30:31]
984 ; CHECK-LABEL: buffer_store_v4p5__voffset_add:
986 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
987 ; CHECK-NEXT: s_mov_b32 s11, s17
988 ; CHECK-NEXT: s_mov_b32 s10, s16
989 ; CHECK-NEXT: s_mov_b32 s9, s7
990 ; CHECK-NEXT: s_mov_b32 s8, s6
991 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
992 ; CHECK-NEXT: s_waitcnt vmcnt(0)
993 ; CHECK-NEXT: s_setpc_b64 s[30:31]
994 %voffset.add = add i32 %voffset, 60
995 call void @llvm.amdgcn.raw.ptr.buffer.store.v4p5(<4 x ptr addrspace(5)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
999 define void @buffer_store_p6__voffset_add(ptr addrspace(8) inreg %rsrc, ptr addrspace(6) %data, i32 %voffset) #0 {
1000 ; VERDE-LABEL: buffer_store_p6__voffset_add:
1002 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1003 ; VERDE-NEXT: s_mov_b32 s11, s17
1004 ; VERDE-NEXT: s_mov_b32 s10, s16
1005 ; VERDE-NEXT: s_mov_b32 s9, s7
1006 ; VERDE-NEXT: s_mov_b32 s8, s6
1007 ; VERDE-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
1008 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1009 ; VERDE-NEXT: s_setpc_b64 s[30:31]
1011 ; CHECK-LABEL: buffer_store_p6__voffset_add:
1013 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1014 ; CHECK-NEXT: s_mov_b32 s11, s17
1015 ; CHECK-NEXT: s_mov_b32 s10, s16
1016 ; CHECK-NEXT: s_mov_b32 s9, s7
1017 ; CHECK-NEXT: s_mov_b32 s8, s6
1018 ; CHECK-NEXT: buffer_store_dword v0, v1, s[8:11], 0 offen offset:60
1019 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1020 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1021 %voffset.add = add i32 %voffset, 60
1022 call void @llvm.amdgcn.raw.ptr.buffer.store.p6(ptr addrspace(6) %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
1026 define void @buffer_store_v2p6__voffset_add(ptr addrspace(8) inreg %rsrc, <2 x ptr addrspace(6)> %data, i32 %voffset) #0 {
1027 ; VERDE-LABEL: buffer_store_v2p6__voffset_add:
1029 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1030 ; VERDE-NEXT: s_mov_b32 s11, s17
1031 ; VERDE-NEXT: s_mov_b32 s10, s16
1032 ; VERDE-NEXT: s_mov_b32 s9, s7
1033 ; VERDE-NEXT: s_mov_b32 s8, s6
1034 ; VERDE-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
1035 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1036 ; VERDE-NEXT: s_setpc_b64 s[30:31]
1038 ; CHECK-LABEL: buffer_store_v2p6__voffset_add:
1040 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1041 ; CHECK-NEXT: s_mov_b32 s11, s17
1042 ; CHECK-NEXT: s_mov_b32 s10, s16
1043 ; CHECK-NEXT: s_mov_b32 s9, s7
1044 ; CHECK-NEXT: s_mov_b32 s8, s6
1045 ; CHECK-NEXT: buffer_store_dwordx2 v[0:1], v2, s[8:11], 0 offen offset:60
1046 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1047 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1048 %voffset.add = add i32 %voffset, 60
1049 call void @llvm.amdgcn.raw.ptr.buffer.store.v2p6(<2 x ptr addrspace(6)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
1053 define void @buffer_store_v3p6__voffset_add(ptr addrspace(8) inreg %rsrc, <3 x ptr addrspace(6)> %data, i32 %voffset) #0 {
1054 ; VERDE-LABEL: buffer_store_v3p6__voffset_add:
1056 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1057 ; VERDE-NEXT: s_mov_b32 s11, s17
1058 ; VERDE-NEXT: s_mov_b32 s10, s16
1059 ; VERDE-NEXT: s_mov_b32 s9, s7
1060 ; VERDE-NEXT: s_mov_b32 s8, s6
1061 ; VERDE-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
1062 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1063 ; VERDE-NEXT: s_setpc_b64 s[30:31]
1065 ; CHECK-LABEL: buffer_store_v3p6__voffset_add:
1067 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1068 ; CHECK-NEXT: s_mov_b32 s11, s17
1069 ; CHECK-NEXT: s_mov_b32 s10, s16
1070 ; CHECK-NEXT: s_mov_b32 s9, s7
1071 ; CHECK-NEXT: s_mov_b32 s8, s6
1072 ; CHECK-NEXT: buffer_store_dwordx3 v[0:2], v3, s[8:11], 0 offen offset:60
1073 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1074 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1075 %voffset.add = add i32 %voffset, 60
1076 call void @llvm.amdgcn.raw.ptr.buffer.store.v3p6(<3 x ptr addrspace(6)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
1080 define void @buffer_store_v4p6__voffset_add(ptr addrspace(8) inreg %rsrc, <4 x ptr addrspace(6)> %data, i32 %voffset) #0 {
1081 ; VERDE-LABEL: buffer_store_v4p6__voffset_add:
1083 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1084 ; VERDE-NEXT: s_mov_b32 s11, s17
1085 ; VERDE-NEXT: s_mov_b32 s10, s16
1086 ; VERDE-NEXT: s_mov_b32 s9, s7
1087 ; VERDE-NEXT: s_mov_b32 s8, s6
1088 ; VERDE-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
1089 ; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0)
1090 ; VERDE-NEXT: s_setpc_b64 s[30:31]
1092 ; CHECK-LABEL: buffer_store_v4p6__voffset_add:
1094 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1095 ; CHECK-NEXT: s_mov_b32 s11, s17
1096 ; CHECK-NEXT: s_mov_b32 s10, s16
1097 ; CHECK-NEXT: s_mov_b32 s9, s7
1098 ; CHECK-NEXT: s_mov_b32 s8, s6
1099 ; CHECK-NEXT: buffer_store_dwordx4 v[0:3], v4, s[8:11], 0 offen offset:60
1100 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1101 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1102 %voffset.add = add i32 %voffset, 60
1103 call void @llvm.amdgcn.raw.ptr.buffer.store.v4p6(<4 x ptr addrspace(6)> %data, ptr addrspace(8) %rsrc, i32 %voffset.add, i32 0, i32 0)
1107 declare void @llvm.amdgcn.raw.ptr.buffer.store.f32(float, ptr addrspace(8), i32, i32, i32) #0
1108 declare void @llvm.amdgcn.raw.ptr.buffer.store.v2f32(<2 x float>, ptr addrspace(8), i32, i32, i32) #0
1109 declare void @llvm.amdgcn.raw.ptr.buffer.store.v4f32(<4 x float>, ptr addrspace(8), i32, i32, i32) #0
1110 declare void @llvm.amdgcn.raw.ptr.buffer.store.i32(i32, ptr addrspace(8), i32, i32, i32) #0
1111 declare void @llvm.amdgcn.raw.ptr.buffer.store.v2i32(<2 x i32>, ptr addrspace(8), i32, i32, i32) #0
1112 declare void @llvm.amdgcn.raw.ptr.buffer.store.v4i32(<4 x i32>, ptr addrspace(8), i32, i32, i32) #0
1113 declare <4 x float> @llvm.amdgcn.raw.ptr.buffer.load.v4f32(ptr addrspace(8), i32, i32, i32) #1
1114 declare void @llvm.amdgcn.raw.ptr.buffer.store.i8(i8, ptr addrspace(8), i32, i32, i32) #0
1115 declare void @llvm.amdgcn.raw.ptr.buffer.store.f16(half, ptr addrspace(8), i32, i32, i32) #0
1116 declare void @llvm.amdgcn.raw.ptr.buffer.store.v2f16(<2 x half>, ptr addrspace(8), i32, i32, i32) #0
1117 declare void @llvm.amdgcn.raw.ptr.buffer.store.v4f16(<4 x half>, ptr addrspace(8), i32, i32, i32) #0
1118 declare void @llvm.amdgcn.raw.ptr.buffer.store.i16(i16, ptr addrspace(8), i32, i32, i32) #0
1119 declare void @llvm.amdgcn.raw.ptr.buffer.store.v2i16(<2 x i16>, ptr addrspace(8), i32, i32, i32) #0
1120 declare void @llvm.amdgcn.raw.ptr.buffer.store.v4i16(<4 x i16>, ptr addrspace(8), i32, i32, i32) #0
1122 attributes #0 = { nounwind }
1123 attributes #1 = { nounwind readonly }