1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 %s -o - | FileCheck %s
5 ; Testing codegen for memcpy with vector operands for all combinations of the following parameters:
6 ; destination address space: 0, 1, 3, 5
7 ; source address space: 0, 1, 3, 4, 5
8 ; alignment: 1, 2, 8, 16
12 define void @memcpy_p0_p0_sz16_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
13 ; CHECK-LABEL: memcpy_p0_p0_sz16_align_1_1:
14 ; CHECK: ; %bb.0: ; %entry
15 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
16 ; CHECK-NEXT: s_clause 0xf
17 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:15
18 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:14
19 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:13
20 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:12
21 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:11
22 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:10
23 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:9
24 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:8
25 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:7
26 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:6
27 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:5
28 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:4
29 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:3
30 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:2
31 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:1
32 ; CHECK-NEXT: flat_load_ubyte v2, v[2:3]
33 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
34 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:15
35 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(15)
36 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:14
37 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(15)
38 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:13
39 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(15)
40 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:12
41 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(15)
42 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:11
43 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(15)
44 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:10
45 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(15)
46 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:9
47 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(15)
48 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:8
49 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(15)
50 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:7
51 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(15)
52 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:6
53 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(15)
54 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:5
55 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(15)
56 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:4
57 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(15)
58 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:3
59 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(15)
60 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:2
61 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(15)
62 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:1
63 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(15)
64 ; CHECK-NEXT: flat_store_byte v[0:1], v2
65 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
66 ; CHECK-NEXT: s_setpc_b64 s[30:31]
68 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 16, i1 false)
72 define void @memcpy_p0_p0_sz31_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
73 ; CHECK-LABEL: memcpy_p0_p0_sz31_align_1_1:
74 ; CHECK: ; %bb.0: ; %entry
75 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
76 ; CHECK-NEXT: s_clause 0xe
77 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:14
78 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:13
79 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:12
80 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:11
81 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:10
82 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:9
83 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:8
84 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:7
85 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:6
86 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:5
87 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:4
88 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:3
89 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:2
90 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:1
91 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3]
92 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
93 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
94 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(14)
95 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:13
96 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(14)
97 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:12
98 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(14)
99 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:11
100 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(14)
101 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:10
102 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(14)
103 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:9
104 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(14)
105 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:8
106 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(14)
107 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:7
108 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(14)
109 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:6
110 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(14)
111 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:5
112 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(14)
113 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:4
114 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(14)
115 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:3
116 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(14)
117 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:2
118 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(14)
119 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:1
120 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(14)
121 ; CHECK-NEXT: flat_store_byte v[0:1], v18
122 ; CHECK-NEXT: s_clause 0xf
123 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:30
124 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:29
125 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:28
126 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:27
127 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:26
128 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:25
129 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:24
130 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:23
131 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:22
132 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:21
133 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:20
134 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:19
135 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:18
136 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:17
137 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:16
138 ; CHECK-NEXT: flat_load_ubyte v2, v[2:3] offset:15
139 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
140 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
141 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(15)
142 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:29
143 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(15)
144 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:28
145 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(15)
146 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:27
147 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(15)
148 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
149 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(15)
150 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:25
151 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(15)
152 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:24
153 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(15)
154 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:23
155 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(15)
156 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:22
157 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(15)
158 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
159 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(15)
160 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:20
161 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(15)
162 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:19
163 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(15)
164 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:18
165 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(15)
166 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:17
167 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(15)
168 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:16
169 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(15)
170 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:15
171 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
172 ; CHECK-NEXT: s_setpc_b64 s[30:31]
174 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 31, i1 false)
178 define void @memcpy_p0_p0_sz32_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
179 ; CHECK-LABEL: memcpy_p0_p0_sz32_align_1_1:
180 ; CHECK: ; %bb.0: ; %entry
181 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
182 ; CHECK-NEXT: s_clause 0xf
183 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:15
184 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:14
185 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:13
186 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:12
187 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:11
188 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:10
189 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:9
190 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:8
191 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:7
192 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:6
193 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:5
194 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:4
195 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:3
196 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:2
197 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:1
198 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3]
199 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
200 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:15
201 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(15)
202 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:14
203 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(15)
204 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:13
205 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(15)
206 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:12
207 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(15)
208 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:11
209 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(15)
210 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:10
211 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(15)
212 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:9
213 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(15)
214 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:8
215 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(15)
216 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:7
217 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(15)
218 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:6
219 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(15)
220 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:5
221 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(15)
222 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:4
223 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(15)
224 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:3
225 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(15)
226 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:2
227 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(15)
228 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:1
229 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(15)
230 ; CHECK-NEXT: flat_store_byte v[0:1], v19
231 ; CHECK-NEXT: s_clause 0xf
232 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:31
233 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:30
234 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:29
235 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:28
236 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:27
237 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:26
238 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:25
239 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:24
240 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:23
241 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:22
242 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:21
243 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:20
244 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:19
245 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:18
246 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:17
247 ; CHECK-NEXT: flat_load_ubyte v2, v[2:3] offset:16
248 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
249 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:31
250 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(15)
251 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:30
252 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(15)
253 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:29
254 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(15)
255 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:28
256 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(15)
257 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:27
258 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(15)
259 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:26
260 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(15)
261 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:25
262 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(15)
263 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:24
264 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(15)
265 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:23
266 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(15)
267 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:22
268 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(15)
269 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:21
270 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(15)
271 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:20
272 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(15)
273 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:19
274 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(15)
275 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:18
276 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(15)
277 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:17
278 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(15)
279 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:16
280 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
281 ; CHECK-NEXT: s_setpc_b64 s[30:31]
283 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 32, i1 false)
287 define void @memcpy_p0_p0_sz16_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
288 ; CHECK-LABEL: memcpy_p0_p0_sz16_align_2_2:
289 ; CHECK: ; %bb.0: ; %entry
290 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
291 ; CHECK-NEXT: s_clause 0x7
292 ; CHECK-NEXT: flat_load_ushort v4, v[2:3] offset:14
293 ; CHECK-NEXT: flat_load_ushort v5, v[2:3] offset:12
294 ; CHECK-NEXT: flat_load_ushort v6, v[2:3] offset:10
295 ; CHECK-NEXT: flat_load_ushort v7, v[2:3] offset:8
296 ; CHECK-NEXT: flat_load_ushort v8, v[2:3] offset:6
297 ; CHECK-NEXT: flat_load_ushort v9, v[2:3] offset:4
298 ; CHECK-NEXT: flat_load_ushort v10, v[2:3] offset:2
299 ; CHECK-NEXT: flat_load_ushort v2, v[2:3]
300 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
301 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:14
302 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(7)
303 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:12
304 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(7)
305 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:10
306 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(7)
307 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:8
308 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(7)
309 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:6
310 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(7)
311 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:4
312 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(7)
313 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:2
314 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(7)
315 ; CHECK-NEXT: flat_store_short v[0:1], v2
316 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
317 ; CHECK-NEXT: s_setpc_b64 s[30:31]
319 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 16, i1 false)
323 define void @memcpy_p0_p0_sz31_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
324 ; CHECK-LABEL: memcpy_p0_p0_sz31_align_2_2:
325 ; CHECK: ; %bb.0: ; %entry
326 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
327 ; CHECK-NEXT: s_clause 0xf
328 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:30
329 ; CHECK-NEXT: flat_load_ushort v5, v[2:3] offset:28
330 ; CHECK-NEXT: flat_load_ushort v6, v[2:3] offset:26
331 ; CHECK-NEXT: flat_load_ushort v7, v[2:3] offset:24
332 ; CHECK-NEXT: flat_load_ushort v8, v[2:3] offset:22
333 ; CHECK-NEXT: flat_load_ushort v9, v[2:3] offset:20
334 ; CHECK-NEXT: flat_load_ushort v10, v[2:3] offset:18
335 ; CHECK-NEXT: flat_load_ushort v11, v[2:3] offset:16
336 ; CHECK-NEXT: flat_load_ushort v12, v[2:3] offset:14
337 ; CHECK-NEXT: flat_load_ushort v13, v[2:3] offset:12
338 ; CHECK-NEXT: flat_load_ushort v14, v[2:3] offset:10
339 ; CHECK-NEXT: flat_load_ushort v15, v[2:3] offset:8
340 ; CHECK-NEXT: flat_load_ushort v16, v[2:3] offset:6
341 ; CHECK-NEXT: flat_load_ushort v17, v[2:3] offset:4
342 ; CHECK-NEXT: flat_load_ushort v18, v[2:3] offset:2
343 ; CHECK-NEXT: flat_load_ushort v2, v[2:3]
344 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
345 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
346 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(15)
347 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:28
348 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(15)
349 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:26
350 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(15)
351 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:24
352 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(15)
353 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:22
354 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(15)
355 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:20
356 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(15)
357 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:18
358 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(15)
359 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:16
360 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(15)
361 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:14
362 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(15)
363 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:12
364 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(15)
365 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:10
366 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(15)
367 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:8
368 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(15)
369 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:6
370 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(15)
371 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:4
372 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(15)
373 ; CHECK-NEXT: flat_store_short v[0:1], v18 offset:2
374 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(15)
375 ; CHECK-NEXT: flat_store_short v[0:1], v2
376 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
377 ; CHECK-NEXT: s_setpc_b64 s[30:31]
379 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 31, i1 false)
383 define void @memcpy_p0_p0_sz32_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
384 ; CHECK-LABEL: memcpy_p0_p0_sz32_align_2_2:
385 ; CHECK: ; %bb.0: ; %entry
386 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
387 ; CHECK-NEXT: s_clause 0xf
388 ; CHECK-NEXT: flat_load_ushort v4, v[2:3] offset:30
389 ; CHECK-NEXT: flat_load_ushort v5, v[2:3] offset:28
390 ; CHECK-NEXT: flat_load_ushort v6, v[2:3] offset:26
391 ; CHECK-NEXT: flat_load_ushort v7, v[2:3] offset:24
392 ; CHECK-NEXT: flat_load_ushort v8, v[2:3] offset:22
393 ; CHECK-NEXT: flat_load_ushort v9, v[2:3] offset:20
394 ; CHECK-NEXT: flat_load_ushort v10, v[2:3] offset:18
395 ; CHECK-NEXT: flat_load_ushort v11, v[2:3] offset:16
396 ; CHECK-NEXT: flat_load_ushort v12, v[2:3] offset:14
397 ; CHECK-NEXT: flat_load_ushort v13, v[2:3] offset:12
398 ; CHECK-NEXT: flat_load_ushort v14, v[2:3] offset:10
399 ; CHECK-NEXT: flat_load_ushort v15, v[2:3] offset:8
400 ; CHECK-NEXT: flat_load_ushort v16, v[2:3] offset:6
401 ; CHECK-NEXT: flat_load_ushort v17, v[2:3] offset:4
402 ; CHECK-NEXT: flat_load_ushort v18, v[2:3] offset:2
403 ; CHECK-NEXT: flat_load_ushort v2, v[2:3]
404 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
405 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:30
406 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(15)
407 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:28
408 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(15)
409 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:26
410 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(15)
411 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:24
412 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(15)
413 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:22
414 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(15)
415 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:20
416 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(15)
417 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:18
418 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(15)
419 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:16
420 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(15)
421 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:14
422 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(15)
423 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:12
424 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(15)
425 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:10
426 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(15)
427 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:8
428 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(15)
429 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:6
430 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(15)
431 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:4
432 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(15)
433 ; CHECK-NEXT: flat_store_short v[0:1], v18 offset:2
434 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(15)
435 ; CHECK-NEXT: flat_store_short v[0:1], v2
436 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
437 ; CHECK-NEXT: s_setpc_b64 s[30:31]
439 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 32, i1 false)
443 define void @memcpy_p0_p0_sz16_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
444 ; CHECK-LABEL: memcpy_p0_p0_sz16_align_8_8:
445 ; CHECK: ; %bb.0: ; %entry
446 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
447 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
448 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
449 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
450 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
451 ; CHECK-NEXT: s_setpc_b64 s[30:31]
453 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 16, i1 false)
457 define void @memcpy_p0_p0_sz31_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
458 ; CHECK-LABEL: memcpy_p0_p0_sz31_align_8_8:
459 ; CHECK: ; %bb.0: ; %entry
460 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
461 ; CHECK-NEXT: s_clause 0x10
462 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:17
463 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:18
464 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:15
465 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:16
466 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:21
467 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:22
468 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:19
469 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:20
470 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:25
471 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:26
472 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:23
473 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:24
474 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:29
475 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3] offset:30
476 ; CHECK-NEXT: flat_load_ubyte v20, v[2:3] offset:27
477 ; CHECK-NEXT: flat_load_ubyte v21, v[2:3] offset:28
478 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
479 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
480 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:17
481 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(16)
482 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:18
483 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(16)
484 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:15
485 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(16)
486 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:16
487 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(16)
488 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:21
489 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(16)
490 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:22
491 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(16)
492 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:19
493 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(16)
494 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:20
495 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(16)
496 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:25
497 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(16)
498 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:26
499 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(16)
500 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:23
501 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(16)
502 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:24
503 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(16)
504 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:29
505 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(16)
506 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:30
507 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(16)
508 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:27
509 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(16)
510 ; CHECK-NEXT: flat_store_byte v[0:1], v21 offset:28
511 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(16)
512 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
513 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
514 ; CHECK-NEXT: s_setpc_b64 s[30:31]
516 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 31, i1 false)
520 define void @memcpy_p0_p0_sz32_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
521 ; CHECK-LABEL: memcpy_p0_p0_sz32_align_8_8:
522 ; CHECK: ; %bb.0: ; %entry
523 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
524 ; CHECK-NEXT: s_clause 0x1
525 ; CHECK-NEXT: flat_load_dwordx4 v[4:7], v[2:3] offset:16
526 ; CHECK-NEXT: flat_load_dwordx4 v[8:11], v[2:3]
527 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
528 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7] offset:16
529 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(1)
530 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[8:11]
531 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
532 ; CHECK-NEXT: s_setpc_b64 s[30:31]
534 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 32, i1 false)
538 define void @memcpy_p0_p0_sz16_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
539 ; CHECK-LABEL: memcpy_p0_p0_sz16_align_16_16:
540 ; CHECK: ; %bb.0: ; %entry
541 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
542 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
543 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
544 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
545 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
546 ; CHECK-NEXT: s_setpc_b64 s[30:31]
548 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 16, i1 false)
552 define void @memcpy_p0_p0_sz31_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
553 ; CHECK-LABEL: memcpy_p0_p0_sz31_align_16_16:
554 ; CHECK: ; %bb.0: ; %entry
555 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
556 ; CHECK-NEXT: s_clause 0x10
557 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:17
558 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:18
559 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:15
560 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:16
561 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:21
562 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:22
563 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:19
564 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:20
565 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:25
566 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:26
567 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:23
568 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:24
569 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:29
570 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3] offset:30
571 ; CHECK-NEXT: flat_load_ubyte v20, v[2:3] offset:27
572 ; CHECK-NEXT: flat_load_ubyte v21, v[2:3] offset:28
573 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
574 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
575 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:17
576 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(16)
577 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:18
578 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(16)
579 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:15
580 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(16)
581 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:16
582 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(16)
583 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:21
584 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(16)
585 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:22
586 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(16)
587 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:19
588 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(16)
589 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:20
590 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(16)
591 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:25
592 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(16)
593 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:26
594 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(16)
595 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:23
596 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(16)
597 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:24
598 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(16)
599 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:29
600 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(16)
601 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:30
602 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(16)
603 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:27
604 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(16)
605 ; CHECK-NEXT: flat_store_byte v[0:1], v21 offset:28
606 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(16)
607 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
608 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
609 ; CHECK-NEXT: s_setpc_b64 s[30:31]
611 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 31, i1 false)
615 define void @memcpy_p0_p0_sz32_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
616 ; CHECK-LABEL: memcpy_p0_p0_sz32_align_16_16:
617 ; CHECK: ; %bb.0: ; %entry
618 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
619 ; CHECK-NEXT: s_clause 0x1
620 ; CHECK-NEXT: flat_load_dwordx4 v[4:7], v[2:3] offset:16
621 ; CHECK-NEXT: flat_load_dwordx4 v[8:11], v[2:3]
622 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
623 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7] offset:16
624 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(1)
625 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[8:11]
626 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
627 ; CHECK-NEXT: s_setpc_b64 s[30:31]
629 tail call void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 32, i1 false)
633 define void @memcpy_p0_p1_sz16_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
634 ; CHECK-LABEL: memcpy_p0_p1_sz16_align_1_1:
635 ; CHECK: ; %bb.0: ; %entry
636 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
637 ; CHECK-NEXT: s_clause 0xf
638 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:15
639 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:14
640 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:13
641 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:12
642 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:11
643 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:10
644 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:9
645 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:8
646 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:7
647 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:6
648 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:5
649 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:4
650 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:3
651 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:2
652 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:1
653 ; CHECK-NEXT: global_load_ubyte v2, v[2:3], off
654 ; CHECK-NEXT: s_waitcnt vmcnt(15)
655 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:15
656 ; CHECK-NEXT: s_waitcnt vmcnt(14)
657 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:14
658 ; CHECK-NEXT: s_waitcnt vmcnt(13)
659 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:13
660 ; CHECK-NEXT: s_waitcnt vmcnt(12)
661 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:12
662 ; CHECK-NEXT: s_waitcnt vmcnt(11)
663 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:11
664 ; CHECK-NEXT: s_waitcnt vmcnt(10)
665 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:10
666 ; CHECK-NEXT: s_waitcnt vmcnt(9)
667 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:9
668 ; CHECK-NEXT: s_waitcnt vmcnt(8)
669 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:8
670 ; CHECK-NEXT: s_waitcnt vmcnt(7)
671 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:7
672 ; CHECK-NEXT: s_waitcnt vmcnt(6)
673 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:6
674 ; CHECK-NEXT: s_waitcnt vmcnt(5)
675 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:5
676 ; CHECK-NEXT: s_waitcnt vmcnt(4)
677 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:4
678 ; CHECK-NEXT: s_waitcnt vmcnt(3)
679 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:3
680 ; CHECK-NEXT: s_waitcnt vmcnt(2)
681 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:2
682 ; CHECK-NEXT: s_waitcnt vmcnt(1)
683 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:1
684 ; CHECK-NEXT: s_waitcnt vmcnt(0)
685 ; CHECK-NEXT: flat_store_byte v[0:1], v2
686 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
687 ; CHECK-NEXT: s_setpc_b64 s[30:31]
689 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 16, i1 false)
693 define void @memcpy_p0_p1_sz31_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
694 ; CHECK-LABEL: memcpy_p0_p1_sz31_align_1_1:
695 ; CHECK: ; %bb.0: ; %entry
696 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
697 ; CHECK-NEXT: s_clause 0xe
698 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:14
699 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:13
700 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:12
701 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:11
702 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:10
703 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:9
704 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:8
705 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:7
706 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:6
707 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:5
708 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:4
709 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:3
710 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:2
711 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:1
712 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off
713 ; CHECK-NEXT: s_waitcnt vmcnt(14)
714 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
715 ; CHECK-NEXT: s_waitcnt vmcnt(13)
716 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:13
717 ; CHECK-NEXT: s_waitcnt vmcnt(12)
718 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:12
719 ; CHECK-NEXT: s_waitcnt vmcnt(11)
720 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:11
721 ; CHECK-NEXT: s_waitcnt vmcnt(10)
722 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:10
723 ; CHECK-NEXT: s_waitcnt vmcnt(9)
724 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:9
725 ; CHECK-NEXT: s_waitcnt vmcnt(8)
726 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:8
727 ; CHECK-NEXT: s_waitcnt vmcnt(7)
728 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:7
729 ; CHECK-NEXT: s_waitcnt vmcnt(6)
730 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:6
731 ; CHECK-NEXT: s_waitcnt vmcnt(5)
732 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:5
733 ; CHECK-NEXT: s_waitcnt vmcnt(4)
734 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:4
735 ; CHECK-NEXT: s_waitcnt vmcnt(3)
736 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:3
737 ; CHECK-NEXT: s_waitcnt vmcnt(2)
738 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:2
739 ; CHECK-NEXT: s_waitcnt vmcnt(1)
740 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:1
741 ; CHECK-NEXT: s_waitcnt vmcnt(0)
742 ; CHECK-NEXT: flat_store_byte v[0:1], v18
743 ; CHECK-NEXT: s_clause 0xf
744 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:30
745 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:29
746 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:28
747 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:27
748 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:26
749 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:25
750 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:24
751 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:23
752 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:22
753 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:21
754 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:20
755 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:19
756 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:18
757 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:17
758 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:16
759 ; CHECK-NEXT: global_load_ubyte v2, v[2:3], off offset:15
760 ; CHECK-NEXT: s_waitcnt vmcnt(15)
761 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
762 ; CHECK-NEXT: s_waitcnt vmcnt(14)
763 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:29
764 ; CHECK-NEXT: s_waitcnt vmcnt(13)
765 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:28
766 ; CHECK-NEXT: s_waitcnt vmcnt(12)
767 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:27
768 ; CHECK-NEXT: s_waitcnt vmcnt(11)
769 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
770 ; CHECK-NEXT: s_waitcnt vmcnt(10)
771 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:25
772 ; CHECK-NEXT: s_waitcnt vmcnt(9)
773 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:24
774 ; CHECK-NEXT: s_waitcnt vmcnt(8)
775 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:23
776 ; CHECK-NEXT: s_waitcnt vmcnt(7)
777 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:22
778 ; CHECK-NEXT: s_waitcnt vmcnt(6)
779 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
780 ; CHECK-NEXT: s_waitcnt vmcnt(5)
781 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:20
782 ; CHECK-NEXT: s_waitcnt vmcnt(4)
783 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:19
784 ; CHECK-NEXT: s_waitcnt vmcnt(3)
785 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:18
786 ; CHECK-NEXT: s_waitcnt vmcnt(2)
787 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:17
788 ; CHECK-NEXT: s_waitcnt vmcnt(1)
789 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:16
790 ; CHECK-NEXT: s_waitcnt vmcnt(0)
791 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:15
792 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
793 ; CHECK-NEXT: s_setpc_b64 s[30:31]
795 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 31, i1 false)
799 define void @memcpy_p0_p1_sz32_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
800 ; CHECK-LABEL: memcpy_p0_p1_sz32_align_1_1:
801 ; CHECK: ; %bb.0: ; %entry
802 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
803 ; CHECK-NEXT: s_clause 0xf
804 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:15
805 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:14
806 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:13
807 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:12
808 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:11
809 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:10
810 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:9
811 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:8
812 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:7
813 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:6
814 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:5
815 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:4
816 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:3
817 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:2
818 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:1
819 ; CHECK-NEXT: global_load_ubyte v19, v[2:3], off
820 ; CHECK-NEXT: s_waitcnt vmcnt(15)
821 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:15
822 ; CHECK-NEXT: s_waitcnt vmcnt(14)
823 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:14
824 ; CHECK-NEXT: s_waitcnt vmcnt(13)
825 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:13
826 ; CHECK-NEXT: s_waitcnt vmcnt(12)
827 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:12
828 ; CHECK-NEXT: s_waitcnt vmcnt(11)
829 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:11
830 ; CHECK-NEXT: s_waitcnt vmcnt(10)
831 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:10
832 ; CHECK-NEXT: s_waitcnt vmcnt(9)
833 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:9
834 ; CHECK-NEXT: s_waitcnt vmcnt(8)
835 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:8
836 ; CHECK-NEXT: s_waitcnt vmcnt(7)
837 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:7
838 ; CHECK-NEXT: s_waitcnt vmcnt(6)
839 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:6
840 ; CHECK-NEXT: s_waitcnt vmcnt(5)
841 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:5
842 ; CHECK-NEXT: s_waitcnt vmcnt(4)
843 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:4
844 ; CHECK-NEXT: s_waitcnt vmcnt(3)
845 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:3
846 ; CHECK-NEXT: s_waitcnt vmcnt(2)
847 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:2
848 ; CHECK-NEXT: s_waitcnt vmcnt(1)
849 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:1
850 ; CHECK-NEXT: s_waitcnt vmcnt(0)
851 ; CHECK-NEXT: flat_store_byte v[0:1], v19
852 ; CHECK-NEXT: s_clause 0xf
853 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:31
854 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:30
855 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:29
856 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:28
857 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:27
858 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:26
859 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:25
860 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:24
861 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:23
862 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:22
863 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:21
864 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:20
865 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:19
866 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:18
867 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:17
868 ; CHECK-NEXT: global_load_ubyte v2, v[2:3], off offset:16
869 ; CHECK-NEXT: s_waitcnt vmcnt(15)
870 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:31
871 ; CHECK-NEXT: s_waitcnt vmcnt(14)
872 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:30
873 ; CHECK-NEXT: s_waitcnt vmcnt(13)
874 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:29
875 ; CHECK-NEXT: s_waitcnt vmcnt(12)
876 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:28
877 ; CHECK-NEXT: s_waitcnt vmcnt(11)
878 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:27
879 ; CHECK-NEXT: s_waitcnt vmcnt(10)
880 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:26
881 ; CHECK-NEXT: s_waitcnt vmcnt(9)
882 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:25
883 ; CHECK-NEXT: s_waitcnt vmcnt(8)
884 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:24
885 ; CHECK-NEXT: s_waitcnt vmcnt(7)
886 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:23
887 ; CHECK-NEXT: s_waitcnt vmcnt(6)
888 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:22
889 ; CHECK-NEXT: s_waitcnt vmcnt(5)
890 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:21
891 ; CHECK-NEXT: s_waitcnt vmcnt(4)
892 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:20
893 ; CHECK-NEXT: s_waitcnt vmcnt(3)
894 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:19
895 ; CHECK-NEXT: s_waitcnt vmcnt(2)
896 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:18
897 ; CHECK-NEXT: s_waitcnt vmcnt(1)
898 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:17
899 ; CHECK-NEXT: s_waitcnt vmcnt(0)
900 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:16
901 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
902 ; CHECK-NEXT: s_setpc_b64 s[30:31]
904 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 32, i1 false)
908 define void @memcpy_p0_p1_sz16_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
909 ; CHECK-LABEL: memcpy_p0_p1_sz16_align_2_2:
910 ; CHECK: ; %bb.0: ; %entry
911 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
912 ; CHECK-NEXT: s_clause 0x7
913 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:14
914 ; CHECK-NEXT: global_load_ushort v5, v[2:3], off offset:12
915 ; CHECK-NEXT: global_load_ushort v6, v[2:3], off offset:10
916 ; CHECK-NEXT: global_load_ushort v7, v[2:3], off offset:8
917 ; CHECK-NEXT: global_load_ushort v8, v[2:3], off offset:6
918 ; CHECK-NEXT: global_load_ushort v9, v[2:3], off offset:4
919 ; CHECK-NEXT: global_load_ushort v10, v[2:3], off offset:2
920 ; CHECK-NEXT: global_load_ushort v2, v[2:3], off
921 ; CHECK-NEXT: s_waitcnt vmcnt(7)
922 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:14
923 ; CHECK-NEXT: s_waitcnt vmcnt(6)
924 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:12
925 ; CHECK-NEXT: s_waitcnt vmcnt(5)
926 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:10
927 ; CHECK-NEXT: s_waitcnt vmcnt(4)
928 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:8
929 ; CHECK-NEXT: s_waitcnt vmcnt(3)
930 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:6
931 ; CHECK-NEXT: s_waitcnt vmcnt(2)
932 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:4
933 ; CHECK-NEXT: s_waitcnt vmcnt(1)
934 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:2
935 ; CHECK-NEXT: s_waitcnt vmcnt(0)
936 ; CHECK-NEXT: flat_store_short v[0:1], v2
937 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
938 ; CHECK-NEXT: s_setpc_b64 s[30:31]
940 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 16, i1 false)
944 define void @memcpy_p0_p1_sz31_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
945 ; CHECK-LABEL: memcpy_p0_p1_sz31_align_2_2:
946 ; CHECK: ; %bb.0: ; %entry
947 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
948 ; CHECK-NEXT: s_clause 0xf
949 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:30
950 ; CHECK-NEXT: global_load_ushort v5, v[2:3], off offset:28
951 ; CHECK-NEXT: global_load_ushort v6, v[2:3], off offset:26
952 ; CHECK-NEXT: global_load_ushort v7, v[2:3], off offset:24
953 ; CHECK-NEXT: global_load_ushort v8, v[2:3], off offset:22
954 ; CHECK-NEXT: global_load_ushort v9, v[2:3], off offset:20
955 ; CHECK-NEXT: global_load_ushort v10, v[2:3], off offset:18
956 ; CHECK-NEXT: global_load_ushort v11, v[2:3], off offset:16
957 ; CHECK-NEXT: global_load_ushort v12, v[2:3], off offset:14
958 ; CHECK-NEXT: global_load_ushort v13, v[2:3], off offset:12
959 ; CHECK-NEXT: global_load_ushort v14, v[2:3], off offset:10
960 ; CHECK-NEXT: global_load_ushort v15, v[2:3], off offset:8
961 ; CHECK-NEXT: global_load_ushort v16, v[2:3], off offset:6
962 ; CHECK-NEXT: global_load_ushort v17, v[2:3], off offset:4
963 ; CHECK-NEXT: global_load_ushort v18, v[2:3], off offset:2
964 ; CHECK-NEXT: global_load_ushort v2, v[2:3], off
965 ; CHECK-NEXT: s_waitcnt vmcnt(15)
966 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
967 ; CHECK-NEXT: s_waitcnt vmcnt(14)
968 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:28
969 ; CHECK-NEXT: s_waitcnt vmcnt(13)
970 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:26
971 ; CHECK-NEXT: s_waitcnt vmcnt(12)
972 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:24
973 ; CHECK-NEXT: s_waitcnt vmcnt(11)
974 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:22
975 ; CHECK-NEXT: s_waitcnt vmcnt(10)
976 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:20
977 ; CHECK-NEXT: s_waitcnt vmcnt(9)
978 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:18
979 ; CHECK-NEXT: s_waitcnt vmcnt(8)
980 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:16
981 ; CHECK-NEXT: s_waitcnt vmcnt(7)
982 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:14
983 ; CHECK-NEXT: s_waitcnt vmcnt(6)
984 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:12
985 ; CHECK-NEXT: s_waitcnt vmcnt(5)
986 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:10
987 ; CHECK-NEXT: s_waitcnt vmcnt(4)
988 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:8
989 ; CHECK-NEXT: s_waitcnt vmcnt(3)
990 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:6
991 ; CHECK-NEXT: s_waitcnt vmcnt(2)
992 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:4
993 ; CHECK-NEXT: s_waitcnt vmcnt(1)
994 ; CHECK-NEXT: flat_store_short v[0:1], v18 offset:2
995 ; CHECK-NEXT: s_waitcnt vmcnt(0)
996 ; CHECK-NEXT: flat_store_short v[0:1], v2
997 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
998 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1000 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 31, i1 false)
1004 define void @memcpy_p0_p1_sz32_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
1005 ; CHECK-LABEL: memcpy_p0_p1_sz32_align_2_2:
1006 ; CHECK: ; %bb.0: ; %entry
1007 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1008 ; CHECK-NEXT: s_clause 0xf
1009 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:30
1010 ; CHECK-NEXT: global_load_ushort v5, v[2:3], off offset:28
1011 ; CHECK-NEXT: global_load_ushort v6, v[2:3], off offset:26
1012 ; CHECK-NEXT: global_load_ushort v7, v[2:3], off offset:24
1013 ; CHECK-NEXT: global_load_ushort v8, v[2:3], off offset:22
1014 ; CHECK-NEXT: global_load_ushort v9, v[2:3], off offset:20
1015 ; CHECK-NEXT: global_load_ushort v10, v[2:3], off offset:18
1016 ; CHECK-NEXT: global_load_ushort v11, v[2:3], off offset:16
1017 ; CHECK-NEXT: global_load_ushort v12, v[2:3], off offset:14
1018 ; CHECK-NEXT: global_load_ushort v13, v[2:3], off offset:12
1019 ; CHECK-NEXT: global_load_ushort v14, v[2:3], off offset:10
1020 ; CHECK-NEXT: global_load_ushort v15, v[2:3], off offset:8
1021 ; CHECK-NEXT: global_load_ushort v16, v[2:3], off offset:6
1022 ; CHECK-NEXT: global_load_ushort v17, v[2:3], off offset:4
1023 ; CHECK-NEXT: global_load_ushort v18, v[2:3], off offset:2
1024 ; CHECK-NEXT: global_load_ushort v2, v[2:3], off
1025 ; CHECK-NEXT: s_waitcnt vmcnt(15)
1026 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:30
1027 ; CHECK-NEXT: s_waitcnt vmcnt(14)
1028 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:28
1029 ; CHECK-NEXT: s_waitcnt vmcnt(13)
1030 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:26
1031 ; CHECK-NEXT: s_waitcnt vmcnt(12)
1032 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:24
1033 ; CHECK-NEXT: s_waitcnt vmcnt(11)
1034 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:22
1035 ; CHECK-NEXT: s_waitcnt vmcnt(10)
1036 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:20
1037 ; CHECK-NEXT: s_waitcnt vmcnt(9)
1038 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:18
1039 ; CHECK-NEXT: s_waitcnt vmcnt(8)
1040 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:16
1041 ; CHECK-NEXT: s_waitcnt vmcnt(7)
1042 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:14
1043 ; CHECK-NEXT: s_waitcnt vmcnt(6)
1044 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:12
1045 ; CHECK-NEXT: s_waitcnt vmcnt(5)
1046 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:10
1047 ; CHECK-NEXT: s_waitcnt vmcnt(4)
1048 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:8
1049 ; CHECK-NEXT: s_waitcnt vmcnt(3)
1050 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:6
1051 ; CHECK-NEXT: s_waitcnt vmcnt(2)
1052 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:4
1053 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1054 ; CHECK-NEXT: flat_store_short v[0:1], v18 offset:2
1055 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1056 ; CHECK-NEXT: flat_store_short v[0:1], v2
1057 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1058 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1060 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 32, i1 false)
1064 define void @memcpy_p0_p1_sz16_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
1065 ; CHECK-LABEL: memcpy_p0_p1_sz16_align_8_8:
1066 ; CHECK: ; %bb.0: ; %entry
1067 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1068 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
1069 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1070 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
1071 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1072 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1074 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 16, i1 false)
1078 define void @memcpy_p0_p1_sz31_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
1079 ; CHECK-LABEL: memcpy_p0_p1_sz31_align_8_8:
1080 ; CHECK: ; %bb.0: ; %entry
1081 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1082 ; CHECK-NEXT: s_clause 0x1
1083 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
1084 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off offset:15
1085 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1086 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7]
1087 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1088 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v8 offset:17
1089 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:15
1090 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v9 offset:21
1091 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:19
1092 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v10 offset:25
1093 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:23
1094 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v11 offset:29
1095 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:27
1096 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 24, v8
1097 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 8, v8
1098 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 24, v9
1099 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 8, v9
1100 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 24, v10
1101 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 8, v10
1102 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 24, v11
1103 ; CHECK-NEXT: v_lshrrev_b32_e32 v9, 8, v11
1104 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
1105 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:16
1106 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:22
1107 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:20
1108 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:26
1109 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:24
1110 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:30
1111 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:28
1112 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1113 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1115 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 31, i1 false)
1119 define void @memcpy_p0_p1_sz32_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
1120 ; CHECK-LABEL: memcpy_p0_p1_sz32_align_8_8:
1121 ; CHECK: ; %bb.0: ; %entry
1122 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1123 ; CHECK-NEXT: s_clause 0x1
1124 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:16
1125 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
1126 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1127 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7] offset:16
1128 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1129 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[8:11]
1130 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1131 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1133 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 32, i1 false)
1137 define void @memcpy_p0_p1_sz16_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
1138 ; CHECK-LABEL: memcpy_p0_p1_sz16_align_16_16:
1139 ; CHECK: ; %bb.0: ; %entry
1140 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1141 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
1142 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1143 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
1144 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1145 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1147 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 16, i1 false)
1151 define void @memcpy_p0_p1_sz31_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
1152 ; CHECK-LABEL: memcpy_p0_p1_sz31_align_16_16:
1153 ; CHECK: ; %bb.0: ; %entry
1154 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1155 ; CHECK-NEXT: s_clause 0x1
1156 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
1157 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off offset:15
1158 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1159 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7]
1160 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1161 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v8 offset:17
1162 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:15
1163 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v9 offset:21
1164 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:19
1165 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v10 offset:25
1166 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:23
1167 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v11 offset:29
1168 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:27
1169 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 24, v8
1170 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 8, v8
1171 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 24, v9
1172 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 8, v9
1173 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 24, v10
1174 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 8, v10
1175 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 24, v11
1176 ; CHECK-NEXT: v_lshrrev_b32_e32 v9, 8, v11
1177 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
1178 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:16
1179 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:22
1180 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:20
1181 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:26
1182 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:24
1183 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:30
1184 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:28
1185 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1186 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1188 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 31, i1 false)
1192 define void @memcpy_p0_p1_sz32_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
1193 ; CHECK-LABEL: memcpy_p0_p1_sz32_align_16_16:
1194 ; CHECK: ; %bb.0: ; %entry
1195 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1196 ; CHECK-NEXT: s_clause 0x1
1197 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:16
1198 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
1199 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1200 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7] offset:16
1201 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1202 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[8:11]
1203 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1204 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1206 tail call void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 32, i1 false)
1210 define void @memcpy_p0_p3_sz16_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
1211 ; CHECK-LABEL: memcpy_p0_p3_sz16_align_1_1:
1212 ; CHECK: ; %bb.0: ; %entry
1213 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1214 ; CHECK-NEXT: ds_read_u8 v3, v2 offset:15
1215 ; CHECK-NEXT: ds_read_u8 v4, v2 offset:14
1216 ; CHECK-NEXT: ds_read_u8 v5, v2 offset:13
1217 ; CHECK-NEXT: ds_read_u8 v6, v2 offset:12
1218 ; CHECK-NEXT: ds_read_u8 v7, v2 offset:11
1219 ; CHECK-NEXT: ds_read_u8 v8, v2 offset:10
1220 ; CHECK-NEXT: ds_read_u8 v9, v2 offset:9
1221 ; CHECK-NEXT: ds_read_u8 v10, v2 offset:8
1222 ; CHECK-NEXT: ds_read_u8 v11, v2 offset:7
1223 ; CHECK-NEXT: ds_read_u8 v12, v2 offset:6
1224 ; CHECK-NEXT: ds_read_u8 v13, v2 offset:5
1225 ; CHECK-NEXT: ds_read_u8 v14, v2 offset:4
1226 ; CHECK-NEXT: ds_read_u8 v15, v2 offset:3
1227 ; CHECK-NEXT: ds_read_u8 v16, v2 offset:2
1228 ; CHECK-NEXT: ds_read_u8 v17, v2 offset:1
1229 ; CHECK-NEXT: ds_read_u8 v2, v2
1230 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1231 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:15
1232 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1233 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
1234 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1235 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:13
1236 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1237 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:12
1238 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1239 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:11
1240 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1241 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:10
1242 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1243 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:9
1244 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1245 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:8
1246 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1247 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:7
1248 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1249 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:6
1250 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1251 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:5
1252 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1253 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:4
1254 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1255 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:3
1256 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1257 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:2
1258 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1259 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:1
1260 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1261 ; CHECK-NEXT: flat_store_byte v[0:1], v2
1262 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1263 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1265 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 16, i1 false)
1269 define void @memcpy_p0_p3_sz31_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
1270 ; CHECK-LABEL: memcpy_p0_p3_sz31_align_1_1:
1271 ; CHECK: ; %bb.0: ; %entry
1272 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1273 ; CHECK-NEXT: ds_read_u8 v3, v2 offset:14
1274 ; CHECK-NEXT: ds_read_u8 v4, v2 offset:13
1275 ; CHECK-NEXT: ds_read_u8 v5, v2 offset:12
1276 ; CHECK-NEXT: ds_read_u8 v6, v2 offset:11
1277 ; CHECK-NEXT: ds_read_u8 v7, v2 offset:10
1278 ; CHECK-NEXT: ds_read_u8 v8, v2 offset:9
1279 ; CHECK-NEXT: ds_read_u8 v9, v2 offset:8
1280 ; CHECK-NEXT: ds_read_u8 v10, v2 offset:7
1281 ; CHECK-NEXT: ds_read_u8 v11, v2 offset:6
1282 ; CHECK-NEXT: ds_read_u8 v12, v2 offset:5
1283 ; CHECK-NEXT: ds_read_u8 v13, v2 offset:4
1284 ; CHECK-NEXT: ds_read_u8 v14, v2 offset:3
1285 ; CHECK-NEXT: ds_read_u8 v15, v2 offset:2
1286 ; CHECK-NEXT: ds_read_u8 v16, v2 offset:1
1287 ; CHECK-NEXT: ds_read_u8 v17, v2
1288 ; CHECK-NEXT: ds_read_u8 v18, v2 offset:15
1289 ; CHECK-NEXT: ds_read_u8 v19, v2 offset:16
1290 ; CHECK-NEXT: ds_read_u8 v20, v2 offset:17
1291 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1292 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:14
1293 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1294 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:13
1295 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1296 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:12
1297 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1298 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:11
1299 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1300 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:10
1301 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1302 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:9
1303 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1304 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:8
1305 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1306 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:7
1307 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1308 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:6
1309 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1310 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:5
1311 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1312 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:4
1313 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1314 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:3
1315 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1316 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:2
1317 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1318 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:1
1319 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1320 ; CHECK-NEXT: flat_store_byte v[0:1], v17
1321 ; CHECK-NEXT: ds_read_u8 v3, v2 offset:30
1322 ; CHECK-NEXT: ds_read_u8 v4, v2 offset:29
1323 ; CHECK-NEXT: ds_read_u8 v5, v2 offset:28
1324 ; CHECK-NEXT: ds_read_u8 v6, v2 offset:27
1325 ; CHECK-NEXT: ds_read_u8 v7, v2 offset:26
1326 ; CHECK-NEXT: ds_read_u8 v8, v2 offset:25
1327 ; CHECK-NEXT: ds_read_u8 v9, v2 offset:24
1328 ; CHECK-NEXT: ds_read_u8 v10, v2 offset:23
1329 ; CHECK-NEXT: ds_read_u8 v11, v2 offset:22
1330 ; CHECK-NEXT: ds_read_u8 v12, v2 offset:21
1331 ; CHECK-NEXT: ds_read_u8 v13, v2 offset:20
1332 ; CHECK-NEXT: ds_read_u8 v14, v2 offset:19
1333 ; CHECK-NEXT: ds_read_u8 v2, v2 offset:18
1334 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1335 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:30
1336 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1337 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:29
1338 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1339 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:28
1340 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1341 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:27
1342 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1343 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:26
1344 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1345 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:25
1346 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1347 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:24
1348 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1349 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:23
1350 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1351 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:22
1352 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1353 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:21
1354 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1355 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:20
1356 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1357 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:19
1358 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
1359 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
1360 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:17
1361 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:16
1362 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:15
1363 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1364 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1366 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 31, i1 false)
1370 define void @memcpy_p0_p3_sz32_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
1371 ; CHECK-LABEL: memcpy_p0_p3_sz32_align_1_1:
1372 ; CHECK: ; %bb.0: ; %entry
1373 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1374 ; CHECK-NEXT: ds_read_u8 v3, v2 offset:15
1375 ; CHECK-NEXT: ds_read_u8 v4, v2 offset:14
1376 ; CHECK-NEXT: ds_read_u8 v5, v2 offset:13
1377 ; CHECK-NEXT: ds_read_u8 v6, v2 offset:12
1378 ; CHECK-NEXT: ds_read_u8 v7, v2 offset:11
1379 ; CHECK-NEXT: ds_read_u8 v8, v2 offset:10
1380 ; CHECK-NEXT: ds_read_u8 v9, v2 offset:9
1381 ; CHECK-NEXT: ds_read_u8 v10, v2 offset:8
1382 ; CHECK-NEXT: ds_read_u8 v11, v2 offset:7
1383 ; CHECK-NEXT: ds_read_u8 v12, v2 offset:6
1384 ; CHECK-NEXT: ds_read_u8 v13, v2 offset:5
1385 ; CHECK-NEXT: ds_read_u8 v14, v2 offset:4
1386 ; CHECK-NEXT: ds_read_u8 v15, v2 offset:3
1387 ; CHECK-NEXT: ds_read_u8 v16, v2 offset:2
1388 ; CHECK-NEXT: ds_read_u8 v17, v2 offset:1
1389 ; CHECK-NEXT: ds_read_u8 v18, v2
1390 ; CHECK-NEXT: ds_read_u8 v19, v2 offset:16
1391 ; CHECK-NEXT: ds_read_u8 v20, v2 offset:17
1392 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1393 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:15
1394 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1395 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
1396 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1397 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:13
1398 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1399 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:12
1400 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1401 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:11
1402 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1403 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:10
1404 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1405 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:9
1406 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1407 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:8
1408 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1409 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:7
1410 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1411 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:6
1412 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1413 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:5
1414 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1415 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:4
1416 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1417 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:3
1418 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1419 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:2
1420 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1421 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:1
1422 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
1423 ; CHECK-NEXT: flat_store_byte v[0:1], v18
1424 ; CHECK-NEXT: ds_read_u8 v3, v2 offset:31
1425 ; CHECK-NEXT: ds_read_u8 v4, v2 offset:30
1426 ; CHECK-NEXT: ds_read_u8 v5, v2 offset:29
1427 ; CHECK-NEXT: ds_read_u8 v6, v2 offset:28
1428 ; CHECK-NEXT: ds_read_u8 v7, v2 offset:27
1429 ; CHECK-NEXT: ds_read_u8 v8, v2 offset:26
1430 ; CHECK-NEXT: ds_read_u8 v9, v2 offset:25
1431 ; CHECK-NEXT: ds_read_u8 v10, v2 offset:24
1432 ; CHECK-NEXT: ds_read_u8 v11, v2 offset:23
1433 ; CHECK-NEXT: ds_read_u8 v12, v2 offset:22
1434 ; CHECK-NEXT: ds_read_u8 v13, v2 offset:21
1435 ; CHECK-NEXT: ds_read_u8 v14, v2 offset:20
1436 ; CHECK-NEXT: ds_read_u8 v15, v2 offset:19
1437 ; CHECK-NEXT: ds_read_u8 v2, v2 offset:18
1438 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1439 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:31
1440 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1441 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
1442 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1443 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:29
1444 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1445 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:28
1446 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1447 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:27
1448 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1449 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
1450 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1451 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:25
1452 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1453 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:24
1454 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1455 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:23
1456 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1457 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:22
1458 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1459 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
1460 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1461 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:20
1462 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1463 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:19
1464 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
1465 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
1466 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:17
1467 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:16
1468 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1469 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1471 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 32, i1 false)
1475 define void @memcpy_p0_p3_sz16_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
1476 ; CHECK-LABEL: memcpy_p0_p3_sz16_align_2_2:
1477 ; CHECK: ; %bb.0: ; %entry
1478 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1479 ; CHECK-NEXT: ds_read_u16 v3, v2 offset:14
1480 ; CHECK-NEXT: ds_read_u16 v4, v2 offset:12
1481 ; CHECK-NEXT: ds_read_u16 v5, v2 offset:10
1482 ; CHECK-NEXT: ds_read_u16 v6, v2 offset:8
1483 ; CHECK-NEXT: ds_read_u16 v7, v2 offset:6
1484 ; CHECK-NEXT: ds_read_u16 v8, v2 offset:4
1485 ; CHECK-NEXT: ds_read_u16 v9, v2 offset:2
1486 ; CHECK-NEXT: ds_read_u16 v2, v2
1487 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1488 ; CHECK-NEXT: flat_store_short v[0:1], v3 offset:14
1489 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1490 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:12
1491 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1492 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:10
1493 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1494 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:8
1495 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1496 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:6
1497 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1498 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:4
1499 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1500 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:2
1501 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
1502 ; CHECK-NEXT: flat_store_short v[0:1], v2
1503 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1504 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1506 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 16, i1 false)
1510 define void @memcpy_p0_p3_sz31_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
1511 ; CHECK-LABEL: memcpy_p0_p3_sz31_align_2_2:
1512 ; CHECK: ; %bb.0: ; %entry
1513 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1514 ; CHECK-NEXT: ds_read_u8 v3, v2 offset:30
1515 ; CHECK-NEXT: ds_read_u16 v4, v2 offset:28
1516 ; CHECK-NEXT: ds_read_u16 v5, v2 offset:26
1517 ; CHECK-NEXT: ds_read_u16 v6, v2 offset:24
1518 ; CHECK-NEXT: ds_read_u16 v7, v2 offset:22
1519 ; CHECK-NEXT: ds_read_u16 v8, v2 offset:20
1520 ; CHECK-NEXT: ds_read_u16 v9, v2 offset:18
1521 ; CHECK-NEXT: ds_read_u16 v10, v2 offset:16
1522 ; CHECK-NEXT: ds_read_u16 v11, v2 offset:14
1523 ; CHECK-NEXT: ds_read_u16 v12, v2 offset:12
1524 ; CHECK-NEXT: ds_read_u16 v13, v2 offset:10
1525 ; CHECK-NEXT: ds_read_u16 v14, v2 offset:8
1526 ; CHECK-NEXT: ds_read_u16 v15, v2 offset:6
1527 ; CHECK-NEXT: ds_read_u16 v16, v2 offset:4
1528 ; CHECK-NEXT: ds_read_u16 v17, v2 offset:2
1529 ; CHECK-NEXT: ds_read_u16 v2, v2
1530 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1531 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:30
1532 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1533 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:28
1534 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1535 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:26
1536 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1537 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:24
1538 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1539 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:22
1540 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1541 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:20
1542 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1543 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:18
1544 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1545 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:16
1546 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1547 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:14
1548 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1549 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:12
1550 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1551 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:10
1552 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1553 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:8
1554 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1555 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:6
1556 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1557 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:4
1558 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1559 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:2
1560 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1561 ; CHECK-NEXT: flat_store_short v[0:1], v2
1562 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1563 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1565 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 31, i1 false)
1569 define void @memcpy_p0_p3_sz32_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
1570 ; CHECK-LABEL: memcpy_p0_p3_sz32_align_2_2:
1571 ; CHECK: ; %bb.0: ; %entry
1572 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1573 ; CHECK-NEXT: ds_read_u16 v3, v2 offset:30
1574 ; CHECK-NEXT: ds_read_u16 v4, v2 offset:28
1575 ; CHECK-NEXT: ds_read_u16 v5, v2 offset:26
1576 ; CHECK-NEXT: ds_read_u16 v6, v2 offset:24
1577 ; CHECK-NEXT: ds_read_u16 v7, v2 offset:22
1578 ; CHECK-NEXT: ds_read_u16 v8, v2 offset:20
1579 ; CHECK-NEXT: ds_read_u16 v9, v2 offset:18
1580 ; CHECK-NEXT: ds_read_u16 v10, v2 offset:16
1581 ; CHECK-NEXT: ds_read_u16 v11, v2 offset:14
1582 ; CHECK-NEXT: ds_read_u16 v12, v2 offset:12
1583 ; CHECK-NEXT: ds_read_u16 v13, v2 offset:10
1584 ; CHECK-NEXT: ds_read_u16 v14, v2 offset:8
1585 ; CHECK-NEXT: ds_read_u16 v15, v2 offset:6
1586 ; CHECK-NEXT: ds_read_u16 v16, v2 offset:4
1587 ; CHECK-NEXT: ds_read_u16 v17, v2 offset:2
1588 ; CHECK-NEXT: ds_read_u16 v2, v2
1589 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1590 ; CHECK-NEXT: flat_store_short v[0:1], v3 offset:30
1591 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1592 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:28
1593 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1594 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:26
1595 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1596 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:24
1597 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1598 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:22
1599 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1600 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:20
1601 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1602 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:18
1603 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1604 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:16
1605 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1606 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:14
1607 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1608 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:12
1609 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1610 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:10
1611 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1612 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:8
1613 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1614 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:6
1615 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1616 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:4
1617 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1618 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:2
1619 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
1620 ; CHECK-NEXT: flat_store_short v[0:1], v2
1621 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1622 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1624 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 32, i1 false)
1628 define void @memcpy_p0_p3_sz16_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
1629 ; CHECK-LABEL: memcpy_p0_p3_sz16_align_8_8:
1630 ; CHECK: ; %bb.0: ; %entry
1631 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1632 ; CHECK-NEXT: ds_read2_b64 v[2:5], v2 offset1:1
1633 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1634 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
1635 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1636 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1638 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 16, i1 false)
1642 define void @memcpy_p0_p3_sz31_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
1643 ; CHECK-LABEL: memcpy_p0_p3_sz31_align_8_8:
1644 ; CHECK: ; %bb.0: ; %entry
1645 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1646 ; CHECK-NEXT: ds_read2_b64 v[3:6], v2 offset1:1
1647 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:15
1648 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1649 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
1650 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1651 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v7 offset:17
1652 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:15
1653 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v8 offset:21
1654 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:19
1655 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v9 offset:25
1656 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:23
1657 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v10 offset:29
1658 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:27
1659 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 24, v7
1660 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 8, v7
1661 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 24, v8
1662 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 8, v8
1663 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 24, v9
1664 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 8, v9
1665 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 24, v10
1666 ; CHECK-NEXT: v_lshrrev_b32_e32 v9, 8, v10
1667 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
1668 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:16
1669 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:22
1670 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:20
1671 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:26
1672 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:24
1673 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:30
1674 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:28
1675 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1676 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1678 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 31, i1 false)
1682 define void @memcpy_p0_p3_sz32_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
1683 ; CHECK-LABEL: memcpy_p0_p3_sz32_align_8_8:
1684 ; CHECK: ; %bb.0: ; %entry
1685 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1686 ; CHECK-NEXT: ds_read2_b64 v[3:6], v2 offset0:2 offset1:3
1687 ; CHECK-NEXT: ds_read2_b64 v[7:10], v2 offset1:1
1688 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1689 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6] offset:16
1690 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1691 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[7:10]
1692 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1693 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1695 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 32, i1 false)
1699 define void @memcpy_p0_p3_sz16_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
1700 ; CHECK-LABEL: memcpy_p0_p3_sz16_align_16_16:
1701 ; CHECK: ; %bb.0: ; %entry
1702 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1703 ; CHECK-NEXT: ds_read_b128 v[2:5], v2
1704 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1705 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
1706 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1707 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1709 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 16, i1 false)
1713 define void @memcpy_p0_p3_sz31_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
1714 ; CHECK-LABEL: memcpy_p0_p3_sz31_align_16_16:
1715 ; CHECK: ; %bb.0: ; %entry
1716 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1717 ; CHECK-NEXT: ds_read_b128 v[3:6], v2
1718 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:15
1719 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1720 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
1721 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1722 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v7 offset:17
1723 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:15
1724 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v8 offset:21
1725 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:19
1726 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v9 offset:25
1727 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:23
1728 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v10 offset:29
1729 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:27
1730 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 24, v7
1731 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 8, v7
1732 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 24, v8
1733 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 8, v8
1734 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 24, v9
1735 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 8, v9
1736 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 24, v10
1737 ; CHECK-NEXT: v_lshrrev_b32_e32 v9, 8, v10
1738 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
1739 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:16
1740 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:22
1741 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:20
1742 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:26
1743 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:24
1744 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:30
1745 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:28
1746 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1747 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1749 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 31, i1 false)
1753 define void @memcpy_p0_p3_sz32_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
1754 ; CHECK-LABEL: memcpy_p0_p3_sz32_align_16_16:
1755 ; CHECK: ; %bb.0: ; %entry
1756 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1757 ; CHECK-NEXT: ds_read_b128 v[3:6], v2 offset:16
1758 ; CHECK-NEXT: ds_read_b128 v[7:10], v2
1759 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1760 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6] offset:16
1761 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
1762 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[7:10]
1763 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1764 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1766 tail call void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 32, i1 false)
1770 define void @memcpy_p0_p4_sz16_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
1771 ; CHECK-LABEL: memcpy_p0_p4_sz16_align_1_1:
1772 ; CHECK: ; %bb.0: ; %entry
1773 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1774 ; CHECK-NEXT: s_clause 0xf
1775 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:15
1776 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:14
1777 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:13
1778 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:12
1779 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:11
1780 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:10
1781 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:9
1782 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:8
1783 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:7
1784 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:6
1785 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:5
1786 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:4
1787 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:3
1788 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:2
1789 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:1
1790 ; CHECK-NEXT: global_load_ubyte v2, v[2:3], off
1791 ; CHECK-NEXT: s_waitcnt vmcnt(15)
1792 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:15
1793 ; CHECK-NEXT: s_waitcnt vmcnt(14)
1794 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:14
1795 ; CHECK-NEXT: s_waitcnt vmcnt(13)
1796 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:13
1797 ; CHECK-NEXT: s_waitcnt vmcnt(12)
1798 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:12
1799 ; CHECK-NEXT: s_waitcnt vmcnt(11)
1800 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:11
1801 ; CHECK-NEXT: s_waitcnt vmcnt(10)
1802 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:10
1803 ; CHECK-NEXT: s_waitcnt vmcnt(9)
1804 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:9
1805 ; CHECK-NEXT: s_waitcnt vmcnt(8)
1806 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:8
1807 ; CHECK-NEXT: s_waitcnt vmcnt(7)
1808 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:7
1809 ; CHECK-NEXT: s_waitcnt vmcnt(6)
1810 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:6
1811 ; CHECK-NEXT: s_waitcnt vmcnt(5)
1812 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:5
1813 ; CHECK-NEXT: s_waitcnt vmcnt(4)
1814 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:4
1815 ; CHECK-NEXT: s_waitcnt vmcnt(3)
1816 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:3
1817 ; CHECK-NEXT: s_waitcnt vmcnt(2)
1818 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:2
1819 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1820 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:1
1821 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1822 ; CHECK-NEXT: flat_store_byte v[0:1], v2
1823 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1824 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1826 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 16, i1 false)
1830 define void @memcpy_p0_p4_sz31_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
1831 ; CHECK-LABEL: memcpy_p0_p4_sz31_align_1_1:
1832 ; CHECK: ; %bb.0: ; %entry
1833 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1834 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off
1835 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1836 ; CHECK-NEXT: flat_store_byte v[0:1], v4
1837 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:1
1838 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1839 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:1
1840 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:2
1841 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1842 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:2
1843 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:3
1844 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1845 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:3
1846 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:4
1847 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1848 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:4
1849 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:5
1850 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1851 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:5
1852 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:6
1853 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1854 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:6
1855 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:7
1856 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1857 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:7
1858 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:8
1859 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1860 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:8
1861 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:9
1862 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1863 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:9
1864 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:10
1865 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1866 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:10
1867 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:11
1868 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1869 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:11
1870 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:12
1871 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1872 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:12
1873 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:13
1874 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1875 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:13
1876 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:14
1877 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1878 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
1879 ; CHECK-NEXT: s_clause 0xf
1880 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:30
1881 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:29
1882 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:28
1883 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:27
1884 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:26
1885 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:25
1886 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:24
1887 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:23
1888 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:22
1889 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:21
1890 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:20
1891 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:19
1892 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:18
1893 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:17
1894 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:16
1895 ; CHECK-NEXT: global_load_ubyte v2, v[2:3], off offset:15
1896 ; CHECK-NEXT: s_waitcnt vmcnt(15)
1897 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
1898 ; CHECK-NEXT: s_waitcnt vmcnt(14)
1899 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:29
1900 ; CHECK-NEXT: s_waitcnt vmcnt(13)
1901 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:28
1902 ; CHECK-NEXT: s_waitcnt vmcnt(12)
1903 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:27
1904 ; CHECK-NEXT: s_waitcnt vmcnt(11)
1905 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
1906 ; CHECK-NEXT: s_waitcnt vmcnt(10)
1907 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:25
1908 ; CHECK-NEXT: s_waitcnt vmcnt(9)
1909 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:24
1910 ; CHECK-NEXT: s_waitcnt vmcnt(8)
1911 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:23
1912 ; CHECK-NEXT: s_waitcnt vmcnt(7)
1913 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:22
1914 ; CHECK-NEXT: s_waitcnt vmcnt(6)
1915 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
1916 ; CHECK-NEXT: s_waitcnt vmcnt(5)
1917 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:20
1918 ; CHECK-NEXT: s_waitcnt vmcnt(4)
1919 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:19
1920 ; CHECK-NEXT: s_waitcnt vmcnt(3)
1921 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:18
1922 ; CHECK-NEXT: s_waitcnt vmcnt(2)
1923 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:17
1924 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1925 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:16
1926 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1927 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:15
1928 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1929 ; CHECK-NEXT: s_setpc_b64 s[30:31]
1931 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 31, i1 false)
1935 define void @memcpy_p0_p4_sz32_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
1936 ; CHECK-LABEL: memcpy_p0_p4_sz32_align_1_1:
1937 ; CHECK: ; %bb.0: ; %entry
1938 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1939 ; CHECK-NEXT: s_clause 0xf
1940 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:15
1941 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:14
1942 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:13
1943 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:12
1944 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:11
1945 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:10
1946 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:9
1947 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:8
1948 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:7
1949 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:6
1950 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:5
1951 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:4
1952 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:3
1953 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:2
1954 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:1
1955 ; CHECK-NEXT: global_load_ubyte v19, v[2:3], off
1956 ; CHECK-NEXT: s_waitcnt vmcnt(15)
1957 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:15
1958 ; CHECK-NEXT: s_waitcnt vmcnt(14)
1959 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:14
1960 ; CHECK-NEXT: s_waitcnt vmcnt(13)
1961 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:13
1962 ; CHECK-NEXT: s_waitcnt vmcnt(12)
1963 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:12
1964 ; CHECK-NEXT: s_waitcnt vmcnt(11)
1965 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:11
1966 ; CHECK-NEXT: s_waitcnt vmcnt(10)
1967 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:10
1968 ; CHECK-NEXT: s_waitcnt vmcnt(9)
1969 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:9
1970 ; CHECK-NEXT: s_waitcnt vmcnt(8)
1971 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:8
1972 ; CHECK-NEXT: s_waitcnt vmcnt(7)
1973 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:7
1974 ; CHECK-NEXT: s_waitcnt vmcnt(6)
1975 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:6
1976 ; CHECK-NEXT: s_waitcnt vmcnt(5)
1977 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:5
1978 ; CHECK-NEXT: s_waitcnt vmcnt(4)
1979 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:4
1980 ; CHECK-NEXT: s_waitcnt vmcnt(3)
1981 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:3
1982 ; CHECK-NEXT: s_waitcnt vmcnt(2)
1983 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:2
1984 ; CHECK-NEXT: s_waitcnt vmcnt(1)
1985 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:1
1986 ; CHECK-NEXT: s_waitcnt vmcnt(0)
1987 ; CHECK-NEXT: flat_store_byte v[0:1], v19
1988 ; CHECK-NEXT: s_clause 0xf
1989 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:31
1990 ; CHECK-NEXT: global_load_ubyte v5, v[2:3], off offset:30
1991 ; CHECK-NEXT: global_load_ubyte v6, v[2:3], off offset:29
1992 ; CHECK-NEXT: global_load_ubyte v7, v[2:3], off offset:28
1993 ; CHECK-NEXT: global_load_ubyte v8, v[2:3], off offset:27
1994 ; CHECK-NEXT: global_load_ubyte v9, v[2:3], off offset:26
1995 ; CHECK-NEXT: global_load_ubyte v10, v[2:3], off offset:25
1996 ; CHECK-NEXT: global_load_ubyte v11, v[2:3], off offset:24
1997 ; CHECK-NEXT: global_load_ubyte v12, v[2:3], off offset:23
1998 ; CHECK-NEXT: global_load_ubyte v13, v[2:3], off offset:22
1999 ; CHECK-NEXT: global_load_ubyte v14, v[2:3], off offset:21
2000 ; CHECK-NEXT: global_load_ubyte v15, v[2:3], off offset:20
2001 ; CHECK-NEXT: global_load_ubyte v16, v[2:3], off offset:19
2002 ; CHECK-NEXT: global_load_ubyte v17, v[2:3], off offset:18
2003 ; CHECK-NEXT: global_load_ubyte v18, v[2:3], off offset:17
2004 ; CHECK-NEXT: global_load_ubyte v2, v[2:3], off offset:16
2005 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2006 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:31
2007 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2008 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:30
2009 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2010 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:29
2011 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2012 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:28
2013 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2014 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:27
2015 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2016 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:26
2017 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2018 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:25
2019 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2020 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:24
2021 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2022 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:23
2023 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2024 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:22
2025 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2026 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:21
2027 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2028 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:20
2029 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2030 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:19
2031 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2032 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:18
2033 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2034 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:17
2035 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2036 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:16
2037 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2038 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2040 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 32, i1 false)
2044 define void @memcpy_p0_p4_sz16_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
2045 ; CHECK-LABEL: memcpy_p0_p4_sz16_align_2_2:
2046 ; CHECK: ; %bb.0: ; %entry
2047 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2048 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off
2049 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2050 ; CHECK-NEXT: flat_store_short v[0:1], v4
2051 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:2
2052 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2053 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:2
2054 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:4
2055 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2056 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:4
2057 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:6
2058 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2059 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:6
2060 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:8
2061 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2062 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:8
2063 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:10
2064 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2065 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:10
2066 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:12
2067 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2068 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:12
2069 ; CHECK-NEXT: global_load_ushort v2, v[2:3], off offset:14
2070 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2071 ; CHECK-NEXT: flat_store_short v[0:1], v2 offset:14
2072 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2073 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2075 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 16, i1 false)
2079 define void @memcpy_p0_p4_sz31_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
2080 ; CHECK-LABEL: memcpy_p0_p4_sz31_align_2_2:
2081 ; CHECK: ; %bb.0: ; %entry
2082 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2083 ; CHECK-NEXT: s_clause 0xf
2084 ; CHECK-NEXT: global_load_ubyte v4, v[2:3], off offset:30
2085 ; CHECK-NEXT: global_load_ushort v5, v[2:3], off offset:28
2086 ; CHECK-NEXT: global_load_ushort v6, v[2:3], off offset:26
2087 ; CHECK-NEXT: global_load_ushort v7, v[2:3], off offset:24
2088 ; CHECK-NEXT: global_load_ushort v8, v[2:3], off offset:22
2089 ; CHECK-NEXT: global_load_ushort v9, v[2:3], off offset:20
2090 ; CHECK-NEXT: global_load_ushort v10, v[2:3], off offset:18
2091 ; CHECK-NEXT: global_load_ushort v11, v[2:3], off offset:16
2092 ; CHECK-NEXT: global_load_ushort v12, v[2:3], off offset:14
2093 ; CHECK-NEXT: global_load_ushort v13, v[2:3], off offset:12
2094 ; CHECK-NEXT: global_load_ushort v14, v[2:3], off offset:10
2095 ; CHECK-NEXT: global_load_ushort v15, v[2:3], off offset:8
2096 ; CHECK-NEXT: global_load_ushort v16, v[2:3], off offset:6
2097 ; CHECK-NEXT: global_load_ushort v17, v[2:3], off offset:4
2098 ; CHECK-NEXT: global_load_ushort v18, v[2:3], off offset:2
2099 ; CHECK-NEXT: global_load_ushort v2, v[2:3], off
2100 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2101 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
2102 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2103 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:28
2104 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2105 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:26
2106 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2107 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:24
2108 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2109 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:22
2110 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2111 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:20
2112 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2113 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:18
2114 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2115 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:16
2116 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2117 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:14
2118 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2119 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:12
2120 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2121 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:10
2122 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2123 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:8
2124 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2125 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:6
2126 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2127 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:4
2128 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2129 ; CHECK-NEXT: flat_store_short v[0:1], v18 offset:2
2130 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2131 ; CHECK-NEXT: flat_store_short v[0:1], v2
2132 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2133 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2135 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 31, i1 false)
2139 define void @memcpy_p0_p4_sz32_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
2140 ; CHECK-LABEL: memcpy_p0_p4_sz32_align_2_2:
2141 ; CHECK: ; %bb.0: ; %entry
2142 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2143 ; CHECK-NEXT: s_clause 0xf
2144 ; CHECK-NEXT: global_load_ushort v4, v[2:3], off offset:30
2145 ; CHECK-NEXT: global_load_ushort v5, v[2:3], off offset:28
2146 ; CHECK-NEXT: global_load_ushort v6, v[2:3], off offset:26
2147 ; CHECK-NEXT: global_load_ushort v7, v[2:3], off offset:24
2148 ; CHECK-NEXT: global_load_ushort v8, v[2:3], off offset:22
2149 ; CHECK-NEXT: global_load_ushort v9, v[2:3], off offset:20
2150 ; CHECK-NEXT: global_load_ushort v10, v[2:3], off offset:18
2151 ; CHECK-NEXT: global_load_ushort v11, v[2:3], off offset:16
2152 ; CHECK-NEXT: global_load_ushort v12, v[2:3], off offset:14
2153 ; CHECK-NEXT: global_load_ushort v13, v[2:3], off offset:12
2154 ; CHECK-NEXT: global_load_ushort v14, v[2:3], off offset:10
2155 ; CHECK-NEXT: global_load_ushort v15, v[2:3], off offset:8
2156 ; CHECK-NEXT: global_load_ushort v16, v[2:3], off offset:6
2157 ; CHECK-NEXT: global_load_ushort v17, v[2:3], off offset:4
2158 ; CHECK-NEXT: global_load_ushort v18, v[2:3], off offset:2
2159 ; CHECK-NEXT: global_load_ushort v2, v[2:3], off
2160 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2161 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:30
2162 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2163 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:28
2164 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2165 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:26
2166 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2167 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:24
2168 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2169 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:22
2170 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2171 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:20
2172 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2173 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:18
2174 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2175 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:16
2176 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2177 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:14
2178 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2179 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:12
2180 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2181 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:10
2182 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2183 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:8
2184 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2185 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:6
2186 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2187 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:4
2188 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2189 ; CHECK-NEXT: flat_store_short v[0:1], v18 offset:2
2190 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2191 ; CHECK-NEXT: flat_store_short v[0:1], v2
2192 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2193 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2195 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 32, i1 false)
2199 define void @memcpy_p0_p4_sz16_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
2200 ; CHECK-LABEL: memcpy_p0_p4_sz16_align_8_8:
2201 ; CHECK: ; %bb.0: ; %entry
2202 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2203 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
2204 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2205 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
2206 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2207 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2209 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 16, i1 false)
2213 define void @memcpy_p0_p4_sz31_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
2214 ; CHECK-LABEL: memcpy_p0_p4_sz31_align_8_8:
2215 ; CHECK: ; %bb.0: ; %entry
2216 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2217 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
2218 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2219 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7]
2220 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:15
2221 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2222 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v2 offset:17
2223 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:15
2224 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v3 offset:21
2225 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:19
2226 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v4 offset:25
2227 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:23
2228 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v5 offset:29
2229 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:27
2230 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 24, v2
2231 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v2
2232 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v3
2233 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 8, v3
2234 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 24, v4
2235 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v4
2236 ; CHECK-NEXT: v_lshrrev_b32_e32 v9, 24, v5
2237 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 8, v5
2238 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:18
2239 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:16
2240 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:22
2241 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:20
2242 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
2243 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:24
2244 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:30
2245 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:28
2246 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2247 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2249 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 31, i1 false)
2253 define void @memcpy_p0_p4_sz32_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
2254 ; CHECK-LABEL: memcpy_p0_p4_sz32_align_8_8:
2255 ; CHECK: ; %bb.0: ; %entry
2256 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2257 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
2258 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2259 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7]
2260 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:16
2261 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2262 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5] offset:16
2263 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2264 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2266 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 32, i1 false)
2270 define void @memcpy_p0_p4_sz16_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
2271 ; CHECK-LABEL: memcpy_p0_p4_sz16_align_16_16:
2272 ; CHECK: ; %bb.0: ; %entry
2273 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2274 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
2275 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2276 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5]
2277 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2278 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2280 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 16, i1 false)
2284 define void @memcpy_p0_p4_sz31_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
2285 ; CHECK-LABEL: memcpy_p0_p4_sz31_align_16_16:
2286 ; CHECK: ; %bb.0: ; %entry
2287 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2288 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
2289 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2290 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7]
2291 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:15
2292 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2293 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v2 offset:17
2294 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:15
2295 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v3 offset:21
2296 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:19
2297 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v4 offset:25
2298 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:23
2299 ; CHECK-NEXT: flat_store_byte_d16_hi v[0:1], v5 offset:29
2300 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:27
2301 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 24, v2
2302 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v2
2303 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v3
2304 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 8, v3
2305 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 24, v4
2306 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v4
2307 ; CHECK-NEXT: v_lshrrev_b32_e32 v9, 24, v5
2308 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 8, v5
2309 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:18
2310 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:16
2311 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:22
2312 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:20
2313 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
2314 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:24
2315 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:30
2316 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:28
2317 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2318 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2320 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 31, i1 false)
2324 define void @memcpy_p0_p4_sz32_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
2325 ; CHECK-LABEL: memcpy_p0_p4_sz32_align_16_16:
2326 ; CHECK: ; %bb.0: ; %entry
2327 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2328 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
2329 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2330 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[4:7]
2331 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:16
2332 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2333 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[2:5] offset:16
2334 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2335 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2337 tail call void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 32, i1 false)
2341 define void @memcpy_p0_p5_sz16_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
2342 ; CHECK-LABEL: memcpy_p0_p5_sz16_align_1_1:
2343 ; CHECK: ; %bb.0: ; %entry
2344 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2345 ; CHECK-NEXT: s_clause 0xf
2346 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen offset:15
2347 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:14
2348 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:13
2349 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:12
2350 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:11
2351 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:10
2352 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:9
2353 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:8
2354 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:7
2355 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:6
2356 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:5
2357 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:4
2358 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:3
2359 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:2
2360 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:1
2361 ; CHECK-NEXT: buffer_load_ubyte v2, v2, s[0:3], 0 offen
2362 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2363 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:15
2364 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2365 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
2366 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2367 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:13
2368 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2369 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:12
2370 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2371 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:11
2372 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2373 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:10
2374 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2375 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:9
2376 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2377 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:8
2378 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2379 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:7
2380 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2381 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:6
2382 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2383 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:5
2384 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2385 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:4
2386 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2387 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:3
2388 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2389 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:2
2390 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2391 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:1
2392 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2393 ; CHECK-NEXT: flat_store_byte v[0:1], v2
2394 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2395 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2397 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 16, i1 false)
2401 define void @memcpy_p0_p5_sz31_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
2402 ; CHECK-LABEL: memcpy_p0_p5_sz31_align_1_1:
2403 ; CHECK: ; %bb.0: ; %entry
2404 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2405 ; CHECK-NEXT: s_clause 0x11
2406 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen offset:14
2407 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:13
2408 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:12
2409 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:11
2410 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:10
2411 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:9
2412 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:8
2413 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:7
2414 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:6
2415 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:5
2416 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:4
2417 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:3
2418 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:2
2419 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:1
2420 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen
2421 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:15
2422 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:16
2423 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:17
2424 ; CHECK-NEXT: s_waitcnt vmcnt(17)
2425 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:14
2426 ; CHECK-NEXT: s_waitcnt vmcnt(16)
2427 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:13
2428 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2429 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:12
2430 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2431 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:11
2432 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2433 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:10
2434 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2435 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:9
2436 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2437 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:8
2438 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2439 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:7
2440 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2441 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:6
2442 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2443 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:5
2444 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2445 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:4
2446 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2447 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:3
2448 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2449 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:2
2450 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2451 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:1
2452 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2453 ; CHECK-NEXT: flat_store_byte v[0:1], v17
2454 ; CHECK-NEXT: s_clause 0xc
2455 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen offset:30
2456 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:29
2457 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:28
2458 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:27
2459 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:26
2460 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:25
2461 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:24
2462 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:23
2463 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:22
2464 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:21
2465 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:20
2466 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:19
2467 ; CHECK-NEXT: buffer_load_ubyte v2, v2, s[0:3], 0 offen offset:18
2468 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2469 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:17
2470 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:16
2471 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2472 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:30
2473 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2474 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:29
2475 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2476 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:28
2477 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2478 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:27
2479 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2480 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:26
2481 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2482 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:25
2483 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2484 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:24
2485 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2486 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:23
2487 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2488 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:22
2489 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2490 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:21
2491 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2492 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:20
2493 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2494 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:19
2495 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2496 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
2497 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:15
2498 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2499 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2501 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 31, i1 false)
2505 define void @memcpy_p0_p5_sz32_align_1_1(ptr addrspace(0) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
2506 ; CHECK-LABEL: memcpy_p0_p5_sz32_align_1_1:
2507 ; CHECK: ; %bb.0: ; %entry
2508 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2509 ; CHECK-NEXT: s_clause 0x11
2510 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen offset:15
2511 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:14
2512 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:13
2513 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:12
2514 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:11
2515 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:10
2516 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:9
2517 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:8
2518 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:7
2519 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:6
2520 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:5
2521 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:4
2522 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:3
2523 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:2
2524 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:1
2525 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen
2526 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:16
2527 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:17
2528 ; CHECK-NEXT: s_waitcnt vmcnt(17)
2529 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:15
2530 ; CHECK-NEXT: s_waitcnt vmcnt(16)
2531 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:14
2532 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2533 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:13
2534 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2535 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:12
2536 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2537 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:11
2538 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2539 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:10
2540 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2541 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:9
2542 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2543 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:8
2544 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2545 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:7
2546 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2547 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:6
2548 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2549 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:5
2550 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2551 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:4
2552 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2553 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:3
2554 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2555 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:2
2556 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2557 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:1
2558 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2559 ; CHECK-NEXT: flat_store_byte v[0:1], v18
2560 ; CHECK-NEXT: s_clause 0xd
2561 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen offset:31
2562 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:30
2563 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:29
2564 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:28
2565 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:27
2566 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:26
2567 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:25
2568 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:24
2569 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:23
2570 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:22
2571 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:21
2572 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:20
2573 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:19
2574 ; CHECK-NEXT: buffer_load_ubyte v2, v2, s[0:3], 0 offen offset:18
2575 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2576 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:17
2577 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2578 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:31
2579 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2580 ; CHECK-NEXT: flat_store_byte v[0:1], v4 offset:30
2581 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2582 ; CHECK-NEXT: flat_store_byte v[0:1], v5 offset:29
2583 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2584 ; CHECK-NEXT: flat_store_byte v[0:1], v6 offset:28
2585 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2586 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:27
2587 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2588 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:26
2589 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2590 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:25
2591 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2592 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:24
2593 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2594 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:23
2595 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2596 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:22
2597 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2598 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
2599 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2600 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:20
2601 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2602 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:19
2603 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2604 ; CHECK-NEXT: flat_store_byte v[0:1], v2 offset:18
2605 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:16
2606 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2607 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2609 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 32, i1 false)
2613 define void @memcpy_p0_p5_sz16_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
2614 ; CHECK-LABEL: memcpy_p0_p5_sz16_align_2_2:
2615 ; CHECK: ; %bb.0: ; %entry
2616 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2617 ; CHECK-NEXT: s_clause 0x7
2618 ; CHECK-NEXT: buffer_load_ushort v3, v2, s[0:3], 0 offen offset:14
2619 ; CHECK-NEXT: buffer_load_ushort v4, v2, s[0:3], 0 offen offset:12
2620 ; CHECK-NEXT: buffer_load_ushort v5, v2, s[0:3], 0 offen offset:10
2621 ; CHECK-NEXT: buffer_load_ushort v6, v2, s[0:3], 0 offen offset:8
2622 ; CHECK-NEXT: buffer_load_ushort v7, v2, s[0:3], 0 offen offset:6
2623 ; CHECK-NEXT: buffer_load_ushort v8, v2, s[0:3], 0 offen offset:4
2624 ; CHECK-NEXT: buffer_load_ushort v9, v2, s[0:3], 0 offen offset:2
2625 ; CHECK-NEXT: buffer_load_ushort v2, v2, s[0:3], 0 offen
2626 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2627 ; CHECK-NEXT: flat_store_short v[0:1], v3 offset:14
2628 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2629 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:12
2630 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2631 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:10
2632 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2633 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:8
2634 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2635 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:6
2636 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2637 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:4
2638 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2639 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:2
2640 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2641 ; CHECK-NEXT: flat_store_short v[0:1], v2
2642 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2643 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2645 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 16, i1 false)
2649 define void @memcpy_p0_p5_sz31_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
2650 ; CHECK-LABEL: memcpy_p0_p5_sz31_align_2_2:
2651 ; CHECK: ; %bb.0: ; %entry
2652 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2653 ; CHECK-NEXT: s_clause 0xf
2654 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen offset:30
2655 ; CHECK-NEXT: buffer_load_ushort v4, v2, s[0:3], 0 offen offset:28
2656 ; CHECK-NEXT: buffer_load_ushort v5, v2, s[0:3], 0 offen offset:26
2657 ; CHECK-NEXT: buffer_load_ushort v6, v2, s[0:3], 0 offen offset:24
2658 ; CHECK-NEXT: buffer_load_ushort v7, v2, s[0:3], 0 offen offset:22
2659 ; CHECK-NEXT: buffer_load_ushort v8, v2, s[0:3], 0 offen offset:20
2660 ; CHECK-NEXT: buffer_load_ushort v9, v2, s[0:3], 0 offen offset:18
2661 ; CHECK-NEXT: buffer_load_ushort v10, v2, s[0:3], 0 offen offset:16
2662 ; CHECK-NEXT: buffer_load_ushort v11, v2, s[0:3], 0 offen offset:14
2663 ; CHECK-NEXT: buffer_load_ushort v12, v2, s[0:3], 0 offen offset:12
2664 ; CHECK-NEXT: buffer_load_ushort v13, v2, s[0:3], 0 offen offset:10
2665 ; CHECK-NEXT: buffer_load_ushort v14, v2, s[0:3], 0 offen offset:8
2666 ; CHECK-NEXT: buffer_load_ushort v15, v2, s[0:3], 0 offen offset:6
2667 ; CHECK-NEXT: buffer_load_ushort v16, v2, s[0:3], 0 offen offset:4
2668 ; CHECK-NEXT: buffer_load_ushort v17, v2, s[0:3], 0 offen offset:2
2669 ; CHECK-NEXT: buffer_load_ushort v2, v2, s[0:3], 0 offen
2670 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2671 ; CHECK-NEXT: flat_store_byte v[0:1], v3 offset:30
2672 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2673 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:28
2674 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2675 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:26
2676 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2677 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:24
2678 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2679 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:22
2680 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2681 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:20
2682 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2683 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:18
2684 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2685 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:16
2686 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2687 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:14
2688 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2689 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:12
2690 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2691 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:10
2692 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2693 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:8
2694 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2695 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:6
2696 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2697 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:4
2698 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2699 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:2
2700 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2701 ; CHECK-NEXT: flat_store_short v[0:1], v2
2702 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2703 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2705 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 31, i1 false)
2709 define void @memcpy_p0_p5_sz32_align_2_2(ptr addrspace(0) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
2710 ; CHECK-LABEL: memcpy_p0_p5_sz32_align_2_2:
2711 ; CHECK: ; %bb.0: ; %entry
2712 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2713 ; CHECK-NEXT: s_clause 0xf
2714 ; CHECK-NEXT: buffer_load_ushort v3, v2, s[0:3], 0 offen offset:30
2715 ; CHECK-NEXT: buffer_load_ushort v4, v2, s[0:3], 0 offen offset:28
2716 ; CHECK-NEXT: buffer_load_ushort v5, v2, s[0:3], 0 offen offset:26
2717 ; CHECK-NEXT: buffer_load_ushort v6, v2, s[0:3], 0 offen offset:24
2718 ; CHECK-NEXT: buffer_load_ushort v7, v2, s[0:3], 0 offen offset:22
2719 ; CHECK-NEXT: buffer_load_ushort v8, v2, s[0:3], 0 offen offset:20
2720 ; CHECK-NEXT: buffer_load_ushort v9, v2, s[0:3], 0 offen offset:18
2721 ; CHECK-NEXT: buffer_load_ushort v10, v2, s[0:3], 0 offen offset:16
2722 ; CHECK-NEXT: buffer_load_ushort v11, v2, s[0:3], 0 offen offset:14
2723 ; CHECK-NEXT: buffer_load_ushort v12, v2, s[0:3], 0 offen offset:12
2724 ; CHECK-NEXT: buffer_load_ushort v13, v2, s[0:3], 0 offen offset:10
2725 ; CHECK-NEXT: buffer_load_ushort v14, v2, s[0:3], 0 offen offset:8
2726 ; CHECK-NEXT: buffer_load_ushort v15, v2, s[0:3], 0 offen offset:6
2727 ; CHECK-NEXT: buffer_load_ushort v16, v2, s[0:3], 0 offen offset:4
2728 ; CHECK-NEXT: buffer_load_ushort v17, v2, s[0:3], 0 offen offset:2
2729 ; CHECK-NEXT: buffer_load_ushort v2, v2, s[0:3], 0 offen
2730 ; CHECK-NEXT: s_waitcnt vmcnt(15)
2731 ; CHECK-NEXT: flat_store_short v[0:1], v3 offset:30
2732 ; CHECK-NEXT: s_waitcnt vmcnt(14)
2733 ; CHECK-NEXT: flat_store_short v[0:1], v4 offset:28
2734 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2735 ; CHECK-NEXT: flat_store_short v[0:1], v5 offset:26
2736 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2737 ; CHECK-NEXT: flat_store_short v[0:1], v6 offset:24
2738 ; CHECK-NEXT: s_waitcnt vmcnt(11)
2739 ; CHECK-NEXT: flat_store_short v[0:1], v7 offset:22
2740 ; CHECK-NEXT: s_waitcnt vmcnt(10)
2741 ; CHECK-NEXT: flat_store_short v[0:1], v8 offset:20
2742 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2743 ; CHECK-NEXT: flat_store_short v[0:1], v9 offset:18
2744 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2745 ; CHECK-NEXT: flat_store_short v[0:1], v10 offset:16
2746 ; CHECK-NEXT: s_waitcnt vmcnt(7)
2747 ; CHECK-NEXT: flat_store_short v[0:1], v11 offset:14
2748 ; CHECK-NEXT: s_waitcnt vmcnt(6)
2749 ; CHECK-NEXT: flat_store_short v[0:1], v12 offset:12
2750 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2751 ; CHECK-NEXT: flat_store_short v[0:1], v13 offset:10
2752 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2753 ; CHECK-NEXT: flat_store_short v[0:1], v14 offset:8
2754 ; CHECK-NEXT: s_waitcnt vmcnt(3)
2755 ; CHECK-NEXT: flat_store_short v[0:1], v15 offset:6
2756 ; CHECK-NEXT: s_waitcnt vmcnt(2)
2757 ; CHECK-NEXT: flat_store_short v[0:1], v16 offset:4
2758 ; CHECK-NEXT: s_waitcnt vmcnt(1)
2759 ; CHECK-NEXT: flat_store_short v[0:1], v17 offset:2
2760 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2761 ; CHECK-NEXT: flat_store_short v[0:1], v2
2762 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2763 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2765 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 32, i1 false)
2769 define void @memcpy_p0_p5_sz16_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
2770 ; CHECK-LABEL: memcpy_p0_p5_sz16_align_8_8:
2771 ; CHECK: ; %bb.0: ; %entry
2772 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2773 ; CHECK-NEXT: s_clause 0x3
2774 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
2775 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
2776 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
2777 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
2778 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2779 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
2780 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2781 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2783 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 16, i1 false)
2787 define void @memcpy_p0_p5_sz31_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
2788 ; CHECK-LABEL: memcpy_p0_p5_sz31_align_8_8:
2789 ; CHECK: ; %bb.0: ; %entry
2790 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2791 ; CHECK-NEXT: s_clause 0x13
2792 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:15
2793 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:16
2794 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:17
2795 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:18
2796 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:19
2797 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:20
2798 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:21
2799 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:22
2800 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:23
2801 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:24
2802 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:25
2803 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:26
2804 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:27
2805 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:30
2806 ; CHECK-NEXT: buffer_load_ubyte v21, v2, s[0:3], 0 offen offset:29
2807 ; CHECK-NEXT: buffer_load_ubyte v22, v2, s[0:3], 0 offen offset:28
2808 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
2809 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
2810 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
2811 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
2812 ; CHECK-NEXT: s_waitcnt vmcnt(17)
2813 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:17
2814 ; CHECK-NEXT: s_waitcnt vmcnt(16)
2815 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:18
2816 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:15
2817 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:16
2818 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2819 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
2820 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2821 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:22
2822 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:19
2823 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:20
2824 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2825 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:25
2826 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2827 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:26
2828 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:23
2829 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:24
2830 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2831 ; CHECK-NEXT: flat_store_byte v[0:1], v21 offset:29
2832 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:30
2833 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:27
2834 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2835 ; CHECK-NEXT: flat_store_byte v[0:1], v22 offset:28
2836 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2837 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
2838 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2839 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2841 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 31, i1 false)
2845 define void @memcpy_p0_p5_sz32_align_8_8(ptr addrspace(0) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
2846 ; CHECK-LABEL: memcpy_p0_p5_sz32_align_8_8:
2847 ; CHECK: ; %bb.0: ; %entry
2848 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2849 ; CHECK-NEXT: s_clause 0x7
2850 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
2851 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
2852 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
2853 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
2854 ; CHECK-NEXT: buffer_load_dword v7, v2, s[0:3], 0 offen offset:16
2855 ; CHECK-NEXT: buffer_load_dword v8, v2, s[0:3], 0 offen offset:20
2856 ; CHECK-NEXT: buffer_load_dword v9, v2, s[0:3], 0 offen offset:24
2857 ; CHECK-NEXT: buffer_load_dword v10, v2, s[0:3], 0 offen offset:28
2858 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2859 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
2860 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2861 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[7:10] offset:16
2862 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2863 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2865 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 32, i1 false)
2869 define void @memcpy_p0_p5_sz16_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
2870 ; CHECK-LABEL: memcpy_p0_p5_sz16_align_16_16:
2871 ; CHECK: ; %bb.0: ; %entry
2872 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2873 ; CHECK-NEXT: s_clause 0x3
2874 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
2875 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
2876 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
2877 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
2878 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2879 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
2880 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2881 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2883 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 16, i1 false)
2887 define void @memcpy_p0_p5_sz31_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
2888 ; CHECK-LABEL: memcpy_p0_p5_sz31_align_16_16:
2889 ; CHECK: ; %bb.0: ; %entry
2890 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2891 ; CHECK-NEXT: s_clause 0x13
2892 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:15
2893 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:16
2894 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:17
2895 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:18
2896 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:19
2897 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:20
2898 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:21
2899 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:22
2900 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:23
2901 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:24
2902 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:25
2903 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:26
2904 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:27
2905 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:30
2906 ; CHECK-NEXT: buffer_load_ubyte v21, v2, s[0:3], 0 offen offset:29
2907 ; CHECK-NEXT: buffer_load_ubyte v22, v2, s[0:3], 0 offen offset:28
2908 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
2909 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
2910 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
2911 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
2912 ; CHECK-NEXT: s_waitcnt vmcnt(17)
2913 ; CHECK-NEXT: flat_store_byte v[0:1], v9 offset:17
2914 ; CHECK-NEXT: s_waitcnt vmcnt(16)
2915 ; CHECK-NEXT: flat_store_byte v[0:1], v10 offset:18
2916 ; CHECK-NEXT: flat_store_byte v[0:1], v7 offset:15
2917 ; CHECK-NEXT: flat_store_byte v[0:1], v8 offset:16
2918 ; CHECK-NEXT: s_waitcnt vmcnt(13)
2919 ; CHECK-NEXT: flat_store_byte v[0:1], v13 offset:21
2920 ; CHECK-NEXT: s_waitcnt vmcnt(12)
2921 ; CHECK-NEXT: flat_store_byte v[0:1], v14 offset:22
2922 ; CHECK-NEXT: flat_store_byte v[0:1], v11 offset:19
2923 ; CHECK-NEXT: flat_store_byte v[0:1], v12 offset:20
2924 ; CHECK-NEXT: s_waitcnt vmcnt(9)
2925 ; CHECK-NEXT: flat_store_byte v[0:1], v17 offset:25
2926 ; CHECK-NEXT: s_waitcnt vmcnt(8)
2927 ; CHECK-NEXT: flat_store_byte v[0:1], v18 offset:26
2928 ; CHECK-NEXT: flat_store_byte v[0:1], v15 offset:23
2929 ; CHECK-NEXT: flat_store_byte v[0:1], v16 offset:24
2930 ; CHECK-NEXT: s_waitcnt vmcnt(5)
2931 ; CHECK-NEXT: flat_store_byte v[0:1], v21 offset:29
2932 ; CHECK-NEXT: flat_store_byte v[0:1], v20 offset:30
2933 ; CHECK-NEXT: flat_store_byte v[0:1], v19 offset:27
2934 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2935 ; CHECK-NEXT: flat_store_byte v[0:1], v22 offset:28
2936 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2937 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
2938 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2939 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2941 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 31, i1 false)
2945 define void @memcpy_p0_p5_sz32_align_16_16(ptr addrspace(0) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
2946 ; CHECK-LABEL: memcpy_p0_p5_sz32_align_16_16:
2947 ; CHECK: ; %bb.0: ; %entry
2948 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2949 ; CHECK-NEXT: s_clause 0x7
2950 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
2951 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
2952 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
2953 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
2954 ; CHECK-NEXT: buffer_load_dword v7, v2, s[0:3], 0 offen offset:16
2955 ; CHECK-NEXT: buffer_load_dword v8, v2, s[0:3], 0 offen offset:20
2956 ; CHECK-NEXT: buffer_load_dword v9, v2, s[0:3], 0 offen offset:24
2957 ; CHECK-NEXT: buffer_load_dword v10, v2, s[0:3], 0 offen offset:28
2958 ; CHECK-NEXT: s_waitcnt vmcnt(4)
2959 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[3:6]
2960 ; CHECK-NEXT: s_waitcnt vmcnt(0)
2961 ; CHECK-NEXT: flat_store_dwordx4 v[0:1], v[7:10] offset:16
2962 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
2963 ; CHECK-NEXT: s_setpc_b64 s[30:31]
2965 tail call void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 32, i1 false)
2969 define void @memcpy_p1_p0_sz16_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
2970 ; CHECK-LABEL: memcpy_p1_p0_sz16_align_1_1:
2971 ; CHECK: ; %bb.0: ; %entry
2972 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2973 ; CHECK-NEXT: s_clause 0xf
2974 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:5
2975 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:6
2976 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:7
2977 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3]
2978 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:1
2979 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:2
2980 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:4
2981 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:3
2982 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:15
2983 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:14
2984 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:13
2985 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:12
2986 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:9
2987 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:8
2988 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:11
2989 ; CHECK-NEXT: flat_load_ubyte v2, v[2:3] offset:10
2990 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
2991 ; CHECK-NEXT: v_lshl_or_b32 v3, v4, 8, v10
2992 ; CHECK-NEXT: v_lshl_or_b32 v4, v6, 8, v5
2993 ; CHECK-NEXT: v_lshl_or_b32 v5, v8, 8, v7
2994 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
2995 ; CHECK-NEXT: v_lshl_or_b32 v6, v11, 8, v9
2996 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
2997 ; CHECK-NEXT: v_lshl_or_b32 v8, v12, 8, v13
2998 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
2999 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 8, v15
3000 ; CHECK-NEXT: v_lshl_or_b32 v3, v4, 16, v3
3001 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3002 ; CHECK-NEXT: v_lshl_or_b32 v9, v16, 8, v17
3003 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3004 ; CHECK-NEXT: v_lshl_or_b32 v10, v18, 8, v2
3005 ; CHECK-NEXT: v_lshl_or_b32 v2, v6, 16, v5
3006 ; CHECK-NEXT: v_lshl_or_b32 v5, v8, 16, v7
3007 ; CHECK-NEXT: v_lshl_or_b32 v4, v10, 16, v9
3008 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3009 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3011 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 16, i1 false)
3015 define void @memcpy_p1_p0_sz31_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
3016 ; CHECK-LABEL: memcpy_p1_p0_sz31_align_1_1:
3017 ; CHECK: ; %bb.0: ; %entry
3018 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3019 ; CHECK-NEXT: s_clause 0x1e
3020 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:28
3021 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:29
3022 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:30
3023 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:24
3024 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:25
3025 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:27
3026 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:26
3027 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:15
3028 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:14
3029 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:13
3030 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:12
3031 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:23
3032 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:22
3033 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:21
3034 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:20
3035 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3] offset:19
3036 ; CHECK-NEXT: flat_load_ubyte v20, v[2:3] offset:18
3037 ; CHECK-NEXT: flat_load_ubyte v21, v[2:3] offset:17
3038 ; CHECK-NEXT: flat_load_ubyte v22, v[2:3] offset:16
3039 ; CHECK-NEXT: flat_load_ubyte v23, v[2:3] offset:11
3040 ; CHECK-NEXT: flat_load_ubyte v24, v[2:3] offset:10
3041 ; CHECK-NEXT: flat_load_ubyte v25, v[2:3] offset:9
3042 ; CHECK-NEXT: flat_load_ubyte v26, v[2:3] offset:8
3043 ; CHECK-NEXT: flat_load_ubyte v27, v[2:3] offset:7
3044 ; CHECK-NEXT: flat_load_ubyte v28, v[2:3] offset:6
3045 ; CHECK-NEXT: flat_load_ubyte v29, v[2:3] offset:5
3046 ; CHECK-NEXT: flat_load_ubyte v30, v[2:3] offset:4
3047 ; CHECK-NEXT: flat_load_ubyte v31, v[2:3] offset:1
3048 ; CHECK-NEXT: flat_load_ubyte v32, v[2:3]
3049 ; CHECK-NEXT: flat_load_ubyte v33, v[2:3] offset:3
3050 ; CHECK-NEXT: flat_load_ubyte v2, v[2:3] offset:2
3051 ; CHECK-NEXT: s_waitcnt vmcnt(25) lgkmcnt(25)
3052 ; CHECK-NEXT: v_lshl_or_b32 v3, v4, 8, v9
3053 ; CHECK-NEXT: v_lshl_or_b32 v4, v6, 8, v5
3054 ; CHECK-NEXT: s_waitcnt vmcnt(24) lgkmcnt(24)
3055 ; CHECK-NEXT: v_lshl_or_b32 v6, v10, 8, v8
3056 ; CHECK-NEXT: s_waitcnt vmcnt(22) lgkmcnt(22)
3057 ; CHECK-NEXT: v_lshl_or_b32 v11, v11, 8, v12
3058 ; CHECK-NEXT: s_waitcnt vmcnt(20) lgkmcnt(20)
3059 ; CHECK-NEXT: v_lshl_or_b32 v13, v13, 8, v14
3060 ; CHECK-NEXT: s_waitcnt vmcnt(19) lgkmcnt(19)
3061 ; CHECK-NEXT: v_lshl_or_b32 v5, v7, 8, v15
3062 ; CHECK-NEXT: s_waitcnt vmcnt(18) lgkmcnt(18)
3063 ; CHECK-NEXT: v_lshl_or_b32 v9, v15, 8, v16
3064 ; CHECK-NEXT: v_lshl_or_b32 v7, v4, 16, v3
3065 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
3066 ; CHECK-NEXT: v_lshl_or_b32 v8, v17, 8, v18
3067 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
3068 ; CHECK-NEXT: v_lshl_or_b32 v15, v19, 8, v20
3069 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 16, v5
3070 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
3071 ; CHECK-NEXT: v_lshl_or_b32 v10, v21, 8, v22
3072 ; CHECK-NEXT: v_lshl_or_b32 v9, v9, 16, v8
3073 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
3074 ; CHECK-NEXT: v_lshl_or_b32 v14, v23, 8, v24
3075 ; CHECK-NEXT: v_lshl_or_b32 v5, v11, 16, v13
3076 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
3077 ; CHECK-NEXT: v_lshl_or_b32 v12, v25, 8, v26
3078 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 16, v10
3079 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
3080 ; CHECK-NEXT: v_lshl_or_b32 v17, v27, 8, v28
3081 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
3082 ; CHECK-NEXT: v_lshl_or_b32 v16, v29, 8, v30
3083 ; CHECK-NEXT: v_lshl_or_b32 v4, v14, 16, v12
3084 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3085 ; CHECK-NEXT: v_lshl_or_b32 v18, v31, 8, v32
3086 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3087 ; CHECK-NEXT: v_lshl_or_b32 v2, v33, 8, v2
3088 ; CHECK-NEXT: v_lshl_or_b32 v3, v17, 16, v16
3089 ; CHECK-NEXT: v_lshl_or_b32 v2, v2, 16, v18
3090 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:23
3091 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off offset:16
3092 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3093 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3095 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 31, i1 false)
3099 define void @memcpy_p1_p0_sz32_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
3100 ; CHECK-LABEL: memcpy_p1_p0_sz32_align_1_1:
3101 ; CHECK: ; %bb.0: ; %entry
3102 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3103 ; CHECK-NEXT: s_clause 0x1f
3104 ; CHECK-NEXT: flat_load_ubyte v4, v[2:3] offset:29
3105 ; CHECK-NEXT: flat_load_ubyte v5, v[2:3] offset:30
3106 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:31
3107 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:24
3108 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:25
3109 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:26
3110 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:28
3111 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:27
3112 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:15
3113 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:14
3114 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:13
3115 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:12
3116 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:23
3117 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:22
3118 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:21
3119 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3] offset:20
3120 ; CHECK-NEXT: flat_load_ubyte v20, v[2:3] offset:19
3121 ; CHECK-NEXT: flat_load_ubyte v21, v[2:3] offset:18
3122 ; CHECK-NEXT: flat_load_ubyte v22, v[2:3] offset:17
3123 ; CHECK-NEXT: flat_load_ubyte v23, v[2:3] offset:16
3124 ; CHECK-NEXT: flat_load_ubyte v24, v[2:3] offset:11
3125 ; CHECK-NEXT: flat_load_ubyte v25, v[2:3] offset:10
3126 ; CHECK-NEXT: flat_load_ubyte v26, v[2:3] offset:9
3127 ; CHECK-NEXT: flat_load_ubyte v27, v[2:3] offset:8
3128 ; CHECK-NEXT: flat_load_ubyte v28, v[2:3] offset:7
3129 ; CHECK-NEXT: flat_load_ubyte v29, v[2:3] offset:6
3130 ; CHECK-NEXT: flat_load_ubyte v30, v[2:3] offset:5
3131 ; CHECK-NEXT: flat_load_ubyte v31, v[2:3] offset:4
3132 ; CHECK-NEXT: flat_load_ubyte v32, v[2:3] offset:1
3133 ; CHECK-NEXT: flat_load_ubyte v33, v[2:3]
3134 ; CHECK-NEXT: flat_load_ubyte v34, v[2:3] offset:3
3135 ; CHECK-NEXT: flat_load_ubyte v2, v[2:3] offset:2
3136 ; CHECK-NEXT: s_waitcnt vmcnt(25) lgkmcnt(25)
3137 ; CHECK-NEXT: v_lshl_or_b32 v3, v4, 8, v10
3138 ; CHECK-NEXT: v_lshl_or_b32 v4, v6, 8, v5
3139 ; CHECK-NEXT: v_lshl_or_b32 v6, v8, 8, v7
3140 ; CHECK-NEXT: s_waitcnt vmcnt(24) lgkmcnt(24)
3141 ; CHECK-NEXT: v_lshl_or_b32 v7, v11, 8, v9
3142 ; CHECK-NEXT: s_waitcnt vmcnt(22) lgkmcnt(22)
3143 ; CHECK-NEXT: v_lshl_or_b32 v12, v12, 8, v13
3144 ; CHECK-NEXT: s_waitcnt vmcnt(20) lgkmcnt(20)
3145 ; CHECK-NEXT: v_lshl_or_b32 v14, v14, 8, v15
3146 ; CHECK-NEXT: v_lshl_or_b32 v5, v4, 16, v3
3147 ; CHECK-NEXT: s_waitcnt vmcnt(18) lgkmcnt(18)
3148 ; CHECK-NEXT: v_lshl_or_b32 v9, v16, 8, v17
3149 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 16, v6
3150 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
3151 ; CHECK-NEXT: v_lshl_or_b32 v8, v18, 8, v19
3152 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
3153 ; CHECK-NEXT: v_lshl_or_b32 v11, v20, 8, v21
3154 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
3155 ; CHECK-NEXT: v_lshl_or_b32 v10, v22, 8, v23
3156 ; CHECK-NEXT: v_lshl_or_b32 v3, v9, 16, v8
3157 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
3158 ; CHECK-NEXT: v_lshl_or_b32 v15, v24, 8, v25
3159 ; CHECK-NEXT: v_lshl_or_b32 v9, v12, 16, v14
3160 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
3161 ; CHECK-NEXT: v_lshl_or_b32 v13, v26, 8, v27
3162 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
3163 ; CHECK-NEXT: v_lshl_or_b32 v17, v28, 8, v29
3164 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
3165 ; CHECK-NEXT: v_lshl_or_b32 v16, v30, 8, v31
3166 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 16, v13
3167 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3168 ; CHECK-NEXT: v_lshl_or_b32 v18, v32, 8, v33
3169 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3170 ; CHECK-NEXT: v_lshl_or_b32 v19, v34, 8, v2
3171 ; CHECK-NEXT: v_lshl_or_b32 v2, v11, 16, v10
3172 ; CHECK-NEXT: v_lshl_or_b32 v7, v17, 16, v16
3173 ; CHECK-NEXT: v_lshl_or_b32 v6, v19, 16, v18
3174 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off offset:16
3175 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[6:9], off
3176 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3178 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 32, i1 false)
3182 define void @memcpy_p1_p0_sz16_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
3183 ; CHECK-LABEL: memcpy_p1_p0_sz16_align_2_2:
3184 ; CHECK: ; %bb.0: ; %entry
3185 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3186 ; CHECK-NEXT: s_clause 0x7
3187 ; CHECK-NEXT: flat_load_ushort v4, v[2:3] offset:6
3188 ; CHECK-NEXT: flat_load_ushort v5, v[2:3]
3189 ; CHECK-NEXT: flat_load_ushort v6, v[2:3] offset:12
3190 ; CHECK-NEXT: flat_load_ushort v7, v[2:3] offset:8
3191 ; CHECK-NEXT: flat_load_ushort v8, v[2:3] offset:4
3192 ; CHECK-NEXT: flat_load_ushort v9, v[2:3] offset:2
3193 ; CHECK-NEXT: flat_load_ushort v10, v[2:3] offset:14
3194 ; CHECK-NEXT: flat_load_ushort v11, v[2:3] offset:10
3195 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
3196 ; CHECK-NEXT: v_lshl_or_b32 v3, v4, 16, v8
3197 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3198 ; CHECK-NEXT: v_lshl_or_b32 v2, v9, 16, v5
3199 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
3200 ; CHECK-NEXT: v_lshl_or_b32 v5, v10, 16, v6
3201 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3202 ; CHECK-NEXT: v_lshl_or_b32 v4, v11, 16, v7
3203 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3204 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3206 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 16, i1 false)
3210 define void @memcpy_p1_p0_sz31_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
3211 ; CHECK-LABEL: memcpy_p1_p0_sz31_align_2_2:
3212 ; CHECK: ; %bb.0: ; %entry
3213 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3214 ; CHECK-NEXT: s_clause 0x13
3215 ; CHECK-NEXT: flat_load_ushort v4, v[2:3] offset:22
3216 ; CHECK-NEXT: flat_load_ushort v5, v[2:3] offset:16
3217 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:26
3218 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:25
3219 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:24
3220 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:23
3221 ; CHECK-NEXT: flat_load_ushort v6, v[2:3] offset:20
3222 ; CHECK-NEXT: flat_load_ushort v12, v[2:3] offset:18
3223 ; CHECK-NEXT: flat_load_ushort v13, v[2:3] offset:14
3224 ; CHECK-NEXT: flat_load_ushort v14, v[2:3] offset:12
3225 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:30
3226 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:29
3227 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:28
3228 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:27
3229 ; CHECK-NEXT: flat_load_ushort v19, v[2:3] offset:10
3230 ; CHECK-NEXT: flat_load_ushort v20, v[2:3] offset:8
3231 ; CHECK-NEXT: flat_load_ushort v21, v[2:3] offset:6
3232 ; CHECK-NEXT: flat_load_ushort v22, v[2:3] offset:4
3233 ; CHECK-NEXT: flat_load_ushort v23, v[2:3] offset:2
3234 ; CHECK-NEXT: flat_load_ushort v2, v[2:3]
3235 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
3236 ; CHECK-NEXT: v_lshl_or_b32 v8, v8, 8, v9
3237 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
3238 ; CHECK-NEXT: v_lshl_or_b32 v10, v10, 8, v11
3239 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
3240 ; CHECK-NEXT: v_lshl_or_b32 v7, v4, 16, v6
3241 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
3242 ; CHECK-NEXT: v_lshl_or_b32 v6, v12, 16, v5
3243 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
3244 ; CHECK-NEXT: v_lshl_or_b32 v5, v13, 16, v14
3245 ; CHECK-NEXT: v_lshl_or_b32 v8, v8, 16, v10
3246 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
3247 ; CHECK-NEXT: v_lshl_or_b32 v13, v15, 8, v16
3248 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
3249 ; CHECK-NEXT: v_lshl_or_b32 v12, v17, 8, v18
3250 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
3251 ; CHECK-NEXT: v_lshl_or_b32 v4, v19, 16, v20
3252 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3253 ; CHECK-NEXT: v_lshl_or_b32 v3, v21, 16, v22
3254 ; CHECK-NEXT: v_lshl_or_b32 v9, v13, 16, v12
3255 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3256 ; CHECK-NEXT: v_lshl_or_b32 v2, v23, 16, v2
3257 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16
3258 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3259 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off offset:23
3260 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3262 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 31, i1 false)
3266 define void @memcpy_p1_p0_sz32_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
3267 ; CHECK-LABEL: memcpy_p1_p0_sz32_align_2_2:
3268 ; CHECK: ; %bb.0: ; %entry
3269 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3270 ; CHECK-NEXT: s_clause 0xf
3271 ; CHECK-NEXT: flat_load_ushort v4, v[2:3] offset:30
3272 ; CHECK-NEXT: flat_load_ushort v5, v[2:3] offset:28
3273 ; CHECK-NEXT: flat_load_ushort v6, v[2:3] offset:26
3274 ; CHECK-NEXT: flat_load_ushort v7, v[2:3] offset:14
3275 ; CHECK-NEXT: flat_load_ushort v8, v[2:3] offset:12
3276 ; CHECK-NEXT: flat_load_ushort v10, v[2:3] offset:10
3277 ; CHECK-NEXT: flat_load_ushort v11, v[2:3] offset:8
3278 ; CHECK-NEXT: flat_load_ushort v9, v[2:3] offset:24
3279 ; CHECK-NEXT: flat_load_ushort v12, v[2:3] offset:22
3280 ; CHECK-NEXT: flat_load_ushort v13, v[2:3] offset:20
3281 ; CHECK-NEXT: flat_load_ushort v14, v[2:3] offset:18
3282 ; CHECK-NEXT: flat_load_ushort v15, v[2:3] offset:16
3283 ; CHECK-NEXT: flat_load_ushort v16, v[2:3] offset:6
3284 ; CHECK-NEXT: flat_load_ushort v17, v[2:3] offset:4
3285 ; CHECK-NEXT: flat_load_ushort v18, v[2:3] offset:2
3286 ; CHECK-NEXT: flat_load_ushort v19, v[2:3]
3287 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
3288 ; CHECK-NEXT: v_lshl_or_b32 v5, v4, 16, v5
3289 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
3290 ; CHECK-NEXT: v_lshl_or_b32 v4, v6, 16, v9
3291 ; CHECK-NEXT: v_lshl_or_b32 v9, v7, 16, v8
3292 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
3293 ; CHECK-NEXT: v_lshl_or_b32 v3, v12, 16, v13
3294 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 16, v11
3295 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
3296 ; CHECK-NEXT: v_lshl_or_b32 v2, v14, 16, v15
3297 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3298 ; CHECK-NEXT: v_lshl_or_b32 v7, v16, 16, v17
3299 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3300 ; CHECK-NEXT: v_lshl_or_b32 v6, v18, 16, v19
3301 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off offset:16
3302 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[6:9], off
3303 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3305 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 32, i1 false)
3309 define void @memcpy_p1_p0_sz16_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
3310 ; CHECK-LABEL: memcpy_p1_p0_sz16_align_8_8:
3311 ; CHECK: ; %bb.0: ; %entry
3312 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3313 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
3314 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3315 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3316 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3318 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 16, i1 false)
3322 define void @memcpy_p1_p0_sz31_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
3323 ; CHECK-LABEL: memcpy_p1_p0_sz31_align_8_8:
3324 ; CHECK: ; %bb.0: ; %entry
3325 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3326 ; CHECK-NEXT: s_clause 0x10
3327 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:18
3328 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:26
3329 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:25
3330 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:24
3331 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:23
3332 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:30
3333 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:29
3334 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:28
3335 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:27
3336 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:22
3337 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:21
3338 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:20
3339 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:19
3340 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3] offset:16
3341 ; CHECK-NEXT: flat_load_ubyte v20, v[2:3] offset:15
3342 ; CHECK-NEXT: flat_load_ubyte v21, v[2:3] offset:17
3343 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
3344 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
3345 ; CHECK-NEXT: v_lshl_or_b32 v7, v7, 8, v8
3346 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
3347 ; CHECK-NEXT: v_lshl_or_b32 v10, v9, 8, v10
3348 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
3349 ; CHECK-NEXT: v_lshl_or_b32 v11, v11, 8, v12
3350 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
3351 ; CHECK-NEXT: v_lshl_or_b32 v13, v13, 8, v14
3352 ; CHECK-NEXT: v_lshl_or_b32 v8, v7, 16, v10
3353 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
3354 ; CHECK-NEXT: v_lshl_or_b32 v14, v15, 8, v16
3355 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
3356 ; CHECK-NEXT: v_lshl_or_b32 v12, v17, 8, v18
3357 ; CHECK-NEXT: v_lshl_or_b32 v9, v11, 16, v13
3358 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3359 ; CHECK-NEXT: v_lshl_or_b32 v15, v19, 8, v20
3360 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
3361 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 8, v21
3362 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 16, v12
3363 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 16, v15
3364 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3365 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3366 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[6:9], off offset:15
3367 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3369 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 31, i1 false)
3373 define void @memcpy_p1_p0_sz32_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
3374 ; CHECK-LABEL: memcpy_p1_p0_sz32_align_8_8:
3375 ; CHECK: ; %bb.0: ; %entry
3376 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3377 ; CHECK-NEXT: s_clause 0x1
3378 ; CHECK-NEXT: flat_load_dwordx4 v[4:7], v[2:3] offset:16
3379 ; CHECK-NEXT: flat_load_dwordx4 v[8:11], v[2:3]
3380 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
3381 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:16
3382 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3383 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3384 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3386 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 32, i1 false)
3390 define void @memcpy_p1_p0_sz16_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
3391 ; CHECK-LABEL: memcpy_p1_p0_sz16_align_16_16:
3392 ; CHECK: ; %bb.0: ; %entry
3393 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3394 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
3395 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3396 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3397 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3399 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 16, i1 false)
3403 define void @memcpy_p1_p0_sz31_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
3404 ; CHECK-LABEL: memcpy_p1_p0_sz31_align_16_16:
3405 ; CHECK: ; %bb.0: ; %entry
3406 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3407 ; CHECK-NEXT: s_clause 0x10
3408 ; CHECK-NEXT: flat_load_ubyte v6, v[2:3] offset:18
3409 ; CHECK-NEXT: flat_load_ubyte v7, v[2:3] offset:26
3410 ; CHECK-NEXT: flat_load_ubyte v8, v[2:3] offset:25
3411 ; CHECK-NEXT: flat_load_ubyte v9, v[2:3] offset:24
3412 ; CHECK-NEXT: flat_load_ubyte v10, v[2:3] offset:23
3413 ; CHECK-NEXT: flat_load_ubyte v11, v[2:3] offset:30
3414 ; CHECK-NEXT: flat_load_ubyte v12, v[2:3] offset:29
3415 ; CHECK-NEXT: flat_load_ubyte v13, v[2:3] offset:28
3416 ; CHECK-NEXT: flat_load_ubyte v14, v[2:3] offset:27
3417 ; CHECK-NEXT: flat_load_ubyte v15, v[2:3] offset:22
3418 ; CHECK-NEXT: flat_load_ubyte v16, v[2:3] offset:21
3419 ; CHECK-NEXT: flat_load_ubyte v17, v[2:3] offset:20
3420 ; CHECK-NEXT: flat_load_ubyte v18, v[2:3] offset:19
3421 ; CHECK-NEXT: flat_load_ubyte v19, v[2:3] offset:16
3422 ; CHECK-NEXT: flat_load_ubyte v20, v[2:3] offset:15
3423 ; CHECK-NEXT: flat_load_ubyte v21, v[2:3] offset:17
3424 ; CHECK-NEXT: flat_load_dwordx4 v[2:5], v[2:3]
3425 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
3426 ; CHECK-NEXT: v_lshl_or_b32 v7, v7, 8, v8
3427 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
3428 ; CHECK-NEXT: v_lshl_or_b32 v10, v9, 8, v10
3429 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
3430 ; CHECK-NEXT: v_lshl_or_b32 v11, v11, 8, v12
3431 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
3432 ; CHECK-NEXT: v_lshl_or_b32 v13, v13, 8, v14
3433 ; CHECK-NEXT: v_lshl_or_b32 v8, v7, 16, v10
3434 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
3435 ; CHECK-NEXT: v_lshl_or_b32 v14, v15, 8, v16
3436 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
3437 ; CHECK-NEXT: v_lshl_or_b32 v12, v17, 8, v18
3438 ; CHECK-NEXT: v_lshl_or_b32 v9, v11, 16, v13
3439 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
3440 ; CHECK-NEXT: v_lshl_or_b32 v15, v19, 8, v20
3441 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
3442 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 8, v21
3443 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 16, v12
3444 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 16, v15
3445 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3446 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3447 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[6:9], off offset:15
3448 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3450 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 31, i1 false)
3454 define void @memcpy_p1_p0_sz32_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
3455 ; CHECK-LABEL: memcpy_p1_p0_sz32_align_16_16:
3456 ; CHECK: ; %bb.0: ; %entry
3457 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3458 ; CHECK-NEXT: s_clause 0x1
3459 ; CHECK-NEXT: flat_load_dwordx4 v[4:7], v[2:3] offset:16
3460 ; CHECK-NEXT: flat_load_dwordx4 v[8:11], v[2:3]
3461 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
3462 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:16
3463 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3464 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3465 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3467 tail call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 32, i1 false)
3471 define void @memcpy_p1_p1_sz16_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
3472 ; CHECK-LABEL: memcpy_p1_p1_sz16_align_1_1:
3473 ; CHECK: ; %bb.0: ; %entry
3474 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3475 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3476 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3477 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3478 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3480 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 16, i1 false)
3484 define void @memcpy_p1_p1_sz31_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
3485 ; CHECK-LABEL: memcpy_p1_p1_sz31_align_1_1:
3486 ; CHECK: ; %bb.0: ; %entry
3487 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3488 ; CHECK-NEXT: s_clause 0x2
3489 ; CHECK-NEXT: global_load_dwordx2 v[8:9], v[2:3], off offset:23
3490 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
3491 ; CHECK-NEXT: global_load_dwordx2 v[2:3], v[2:3], off offset:16
3492 ; CHECK-NEXT: s_waitcnt vmcnt(2)
3493 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off offset:23
3494 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3495 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
3496 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3497 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[2:3], off offset:16
3498 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3500 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 31, i1 false)
3504 define void @memcpy_p1_p1_sz32_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
3505 ; CHECK-LABEL: memcpy_p1_p1_sz32_align_1_1:
3506 ; CHECK: ; %bb.0: ; %entry
3507 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3508 ; CHECK-NEXT: s_clause 0x1
3509 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:16
3510 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
3511 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3512 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:16
3513 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3514 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3515 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3517 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 32, i1 false)
3521 define void @memcpy_p1_p1_sz16_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
3522 ; CHECK-LABEL: memcpy_p1_p1_sz16_align_2_2:
3523 ; CHECK: ; %bb.0: ; %entry
3524 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3525 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3526 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3527 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3528 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3530 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 16, i1 false)
3534 define void @memcpy_p1_p1_sz31_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
3535 ; CHECK-LABEL: memcpy_p1_p1_sz31_align_2_2:
3536 ; CHECK: ; %bb.0: ; %entry
3537 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3538 ; CHECK-NEXT: s_clause 0x2
3539 ; CHECK-NEXT: global_load_dwordx2 v[8:9], v[2:3], off offset:23
3540 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
3541 ; CHECK-NEXT: global_load_dwordx2 v[2:3], v[2:3], off offset:16
3542 ; CHECK-NEXT: s_waitcnt vmcnt(2)
3543 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off offset:23
3544 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3545 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
3546 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3547 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[2:3], off offset:16
3548 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3550 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 31, i1 false)
3554 define void @memcpy_p1_p1_sz32_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
3555 ; CHECK-LABEL: memcpy_p1_p1_sz32_align_2_2:
3556 ; CHECK: ; %bb.0: ; %entry
3557 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3558 ; CHECK-NEXT: s_clause 0x1
3559 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:16
3560 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
3561 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3562 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:16
3563 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3564 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3565 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3567 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 32, i1 false)
3571 define void @memcpy_p1_p1_sz16_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
3572 ; CHECK-LABEL: memcpy_p1_p1_sz16_align_8_8:
3573 ; CHECK: ; %bb.0: ; %entry
3574 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3575 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3576 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3577 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3578 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3580 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 16, i1 false)
3584 define void @memcpy_p1_p1_sz31_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
3585 ; CHECK-LABEL: memcpy_p1_p1_sz31_align_8_8:
3586 ; CHECK: ; %bb.0: ; %entry
3587 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3588 ; CHECK-NEXT: s_clause 0x1
3589 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:15
3590 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
3591 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3592 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:15
3593 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3594 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3595 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3597 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 31, i1 false)
3601 define void @memcpy_p1_p1_sz32_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
3602 ; CHECK-LABEL: memcpy_p1_p1_sz32_align_8_8:
3603 ; CHECK: ; %bb.0: ; %entry
3604 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3605 ; CHECK-NEXT: s_clause 0x1
3606 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:16
3607 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
3608 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3609 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:16
3610 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3611 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3612 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3614 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 32, i1 false)
3618 define void @memcpy_p1_p1_sz16_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
3619 ; CHECK-LABEL: memcpy_p1_p1_sz16_align_16_16:
3620 ; CHECK: ; %bb.0: ; %entry
3621 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3622 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3623 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3624 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3625 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3627 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 16, i1 false)
3631 define void @memcpy_p1_p1_sz31_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
3632 ; CHECK-LABEL: memcpy_p1_p1_sz31_align_16_16:
3633 ; CHECK: ; %bb.0: ; %entry
3634 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3635 ; CHECK-NEXT: s_clause 0x1
3636 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:15
3637 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
3638 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3639 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:15
3640 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3641 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3642 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3644 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 31, i1 false)
3648 define void @memcpy_p1_p1_sz32_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
3649 ; CHECK-LABEL: memcpy_p1_p1_sz32_align_16_16:
3650 ; CHECK: ; %bb.0: ; %entry
3651 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3652 ; CHECK-NEXT: s_clause 0x1
3653 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:16
3654 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off
3655 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3656 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:16
3657 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3658 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off
3659 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3661 tail call void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 32, i1 false)
3665 define void @memcpy_p1_p3_sz16_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
3666 ; CHECK-LABEL: memcpy_p1_p3_sz16_align_1_1:
3667 ; CHECK: ; %bb.0: ; %entry
3668 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3669 ; CHECK-NEXT: ds_read_b128 v[2:5], v2
3670 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3671 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3672 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3674 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 16, i1 false)
3678 define void @memcpy_p1_p3_sz31_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
3679 ; CHECK-LABEL: memcpy_p1_p3_sz31_align_1_1:
3680 ; CHECK: ; %bb.0: ; %entry
3681 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3682 ; CHECK-NEXT: ds_read_b64 v[7:8], v2
3683 ; CHECK-NEXT: ds_read_b128 v[3:6], v2 offset:8
3684 ; CHECK-NEXT: ds_read_b64 v[9:10], v2 offset:23
3685 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
3686 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[7:8], off
3687 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3688 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off offset:8
3689 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3690 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[9:10], off offset:23
3691 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3693 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 31, i1 false)
3697 define void @memcpy_p1_p3_sz32_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
3698 ; CHECK-LABEL: memcpy_p1_p3_sz32_align_1_1:
3699 ; CHECK: ; %bb.0: ; %entry
3700 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3701 ; CHECK-NEXT: ds_read_b128 v[3:6], v2
3702 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:16
3703 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3704 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
3705 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3706 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:16
3707 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3709 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 32, i1 false)
3713 define void @memcpy_p1_p3_sz16_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
3714 ; CHECK-LABEL: memcpy_p1_p3_sz16_align_2_2:
3715 ; CHECK: ; %bb.0: ; %entry
3716 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3717 ; CHECK-NEXT: ds_read_b128 v[2:5], v2
3718 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3719 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3720 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3722 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 16, i1 false)
3726 define void @memcpy_p1_p3_sz31_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
3727 ; CHECK-LABEL: memcpy_p1_p3_sz31_align_2_2:
3728 ; CHECK: ; %bb.0: ; %entry
3729 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3730 ; CHECK-NEXT: ds_read_b64 v[7:8], v2
3731 ; CHECK-NEXT: ds_read_b128 v[3:6], v2 offset:8
3732 ; CHECK-NEXT: ds_read_b64 v[9:10], v2 offset:23
3733 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
3734 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[7:8], off
3735 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3736 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off offset:8
3737 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3738 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[9:10], off offset:23
3739 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3741 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 31, i1 false)
3745 define void @memcpy_p1_p3_sz32_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
3746 ; CHECK-LABEL: memcpy_p1_p3_sz32_align_2_2:
3747 ; CHECK: ; %bb.0: ; %entry
3748 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3749 ; CHECK-NEXT: ds_read_b128 v[3:6], v2
3750 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:16
3751 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3752 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
3753 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3754 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:16
3755 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3757 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 32, i1 false)
3761 define void @memcpy_p1_p3_sz16_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
3762 ; CHECK-LABEL: memcpy_p1_p3_sz16_align_8_8:
3763 ; CHECK: ; %bb.0: ; %entry
3764 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3765 ; CHECK-NEXT: ds_read2_b64 v[2:5], v2 offset1:1
3766 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3767 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3768 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3770 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 16, i1 false)
3774 define void @memcpy_p1_p3_sz31_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
3775 ; CHECK-LABEL: memcpy_p1_p3_sz31_align_8_8:
3776 ; CHECK: ; %bb.0: ; %entry
3777 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3778 ; CHECK-NEXT: ds_read2_b64 v[3:6], v2 offset1:1
3779 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:15
3780 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3781 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
3782 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3783 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:15
3784 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3786 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 31, i1 false)
3790 define void @memcpy_p1_p3_sz32_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
3791 ; CHECK-LABEL: memcpy_p1_p3_sz32_align_8_8:
3792 ; CHECK: ; %bb.0: ; %entry
3793 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3794 ; CHECK-NEXT: ds_read2_b64 v[3:6], v2 offset1:1
3795 ; CHECK-NEXT: ds_read2_b64 v[7:10], v2 offset0:2 offset1:3
3796 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3797 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
3798 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3799 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:16
3800 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3802 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 32, i1 false)
3806 define void @memcpy_p1_p3_sz16_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
3807 ; CHECK-LABEL: memcpy_p1_p3_sz16_align_16_16:
3808 ; CHECK: ; %bb.0: ; %entry
3809 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3810 ; CHECK-NEXT: ds_read_b128 v[2:5], v2
3811 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3812 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3813 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3815 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 16, i1 false)
3819 define void @memcpy_p1_p3_sz31_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
3820 ; CHECK-LABEL: memcpy_p1_p3_sz31_align_16_16:
3821 ; CHECK: ; %bb.0: ; %entry
3822 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3823 ; CHECK-NEXT: ds_read_b128 v[3:6], v2
3824 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:15
3825 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3826 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
3827 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3828 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:15
3829 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3831 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 31, i1 false)
3835 define void @memcpy_p1_p3_sz32_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
3836 ; CHECK-LABEL: memcpy_p1_p3_sz32_align_16_16:
3837 ; CHECK: ; %bb.0: ; %entry
3838 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3839 ; CHECK-NEXT: ds_read_b128 v[3:6], v2
3840 ; CHECK-NEXT: ds_read_b128 v[7:10], v2 offset:16
3841 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
3842 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
3843 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
3844 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:16
3845 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3847 tail call void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 32, i1 false)
3851 define void @memcpy_p1_p4_sz16_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
3852 ; CHECK-LABEL: memcpy_p1_p4_sz16_align_1_1:
3853 ; CHECK: ; %bb.0: ; %entry
3854 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3855 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3856 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3857 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3858 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3860 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 16, i1 false)
3864 define void @memcpy_p1_p4_sz31_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
3865 ; CHECK-LABEL: memcpy_p1_p4_sz31_align_1_1:
3866 ; CHECK: ; %bb.0: ; %entry
3867 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3868 ; CHECK-NEXT: s_clause 0x1
3869 ; CHECK-NEXT: global_load_dwordx2 v[8:9], v[2:3], off
3870 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:8
3871 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3872 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off
3873 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3874 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:8
3875 ; CHECK-NEXT: global_load_dwordx2 v[2:3], v[2:3], off offset:23
3876 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3877 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[2:3], off offset:23
3878 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3880 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 31, i1 false)
3884 define void @memcpy_p1_p4_sz32_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
3885 ; CHECK-LABEL: memcpy_p1_p4_sz32_align_1_1:
3886 ; CHECK: ; %bb.0: ; %entry
3887 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3888 ; CHECK-NEXT: s_clause 0x1
3889 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
3890 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off offset:16
3891 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3892 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
3893 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3894 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off offset:16
3895 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3897 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 32, i1 false)
3901 define void @memcpy_p1_p4_sz16_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
3902 ; CHECK-LABEL: memcpy_p1_p4_sz16_align_2_2:
3903 ; CHECK: ; %bb.0: ; %entry
3904 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3905 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3906 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3907 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3908 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3910 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 16, i1 false)
3914 define void @memcpy_p1_p4_sz31_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
3915 ; CHECK-LABEL: memcpy_p1_p4_sz31_align_2_2:
3916 ; CHECK: ; %bb.0: ; %entry
3917 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3918 ; CHECK-NEXT: s_clause 0x1
3919 ; CHECK-NEXT: global_load_dwordx2 v[8:9], v[2:3], off
3920 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off offset:8
3921 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3922 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off
3923 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3924 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off offset:8
3925 ; CHECK-NEXT: global_load_dwordx2 v[2:3], v[2:3], off offset:23
3926 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3927 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[2:3], off offset:23
3928 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3930 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 31, i1 false)
3934 define void @memcpy_p1_p4_sz32_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
3935 ; CHECK-LABEL: memcpy_p1_p4_sz32_align_2_2:
3936 ; CHECK: ; %bb.0: ; %entry
3937 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3938 ; CHECK-NEXT: s_clause 0x1
3939 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
3940 ; CHECK-NEXT: global_load_dwordx4 v[8:11], v[2:3], off offset:16
3941 ; CHECK-NEXT: s_waitcnt vmcnt(1)
3942 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
3943 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3944 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[8:11], off offset:16
3945 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3947 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 32, i1 false)
3951 define void @memcpy_p1_p4_sz16_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
3952 ; CHECK-LABEL: memcpy_p1_p4_sz16_align_8_8:
3953 ; CHECK: ; %bb.0: ; %entry
3954 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3955 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
3956 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3957 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
3958 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3960 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 16, i1 false)
3964 define void @memcpy_p1_p4_sz31_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
3965 ; CHECK-LABEL: memcpy_p1_p4_sz31_align_8_8:
3966 ; CHECK: ; %bb.0: ; %entry
3967 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3968 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
3969 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3970 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
3971 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:15
3972 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3973 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off offset:15
3974 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3976 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 31, i1 false)
3980 define void @memcpy_p1_p4_sz32_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
3981 ; CHECK-LABEL: memcpy_p1_p4_sz32_align_8_8:
3982 ; CHECK: ; %bb.0: ; %entry
3983 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3984 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
3985 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3986 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
3987 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:16
3988 ; CHECK-NEXT: s_waitcnt vmcnt(0)
3989 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off offset:16
3990 ; CHECK-NEXT: s_setpc_b64 s[30:31]
3992 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 32, i1 false)
3996 define void @memcpy_p1_p4_sz16_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
3997 ; CHECK-LABEL: memcpy_p1_p4_sz16_align_16_16:
3998 ; CHECK: ; %bb.0: ; %entry
3999 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4000 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off
4001 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4002 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4003 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4005 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 16, i1 false)
4009 define void @memcpy_p1_p4_sz31_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
4010 ; CHECK-LABEL: memcpy_p1_p4_sz31_align_16_16:
4011 ; CHECK: ; %bb.0: ; %entry
4012 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4013 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
4014 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4015 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
4016 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:15
4017 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4018 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off offset:15
4019 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4021 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 31, i1 false)
4025 define void @memcpy_p1_p4_sz32_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
4026 ; CHECK-LABEL: memcpy_p1_p4_sz32_align_16_16:
4027 ; CHECK: ; %bb.0: ; %entry
4028 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4029 ; CHECK-NEXT: global_load_dwordx4 v[4:7], v[2:3], off
4030 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4031 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[4:7], off
4032 ; CHECK-NEXT: global_load_dwordx4 v[2:5], v[2:3], off offset:16
4033 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4034 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off offset:16
4035 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4037 tail call void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 32, i1 false)
4041 define void @memcpy_p1_p5_sz16_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
4042 ; CHECK-LABEL: memcpy_p1_p5_sz16_align_1_1:
4043 ; CHECK: ; %bb.0: ; %entry
4044 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4045 ; CHECK-NEXT: s_clause 0xf
4046 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen
4047 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:1
4048 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:2
4049 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:3
4050 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:4
4051 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:5
4052 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:6
4053 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:7
4054 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:12
4055 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:13
4056 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:14
4057 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:15
4058 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:8
4059 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:9
4060 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:10
4061 ; CHECK-NEXT: buffer_load_ubyte v2, v2, s[0:3], 0 offen offset:11
4062 ; CHECK-NEXT: s_waitcnt vmcnt(14)
4063 ; CHECK-NEXT: v_lshl_or_b32 v4, v4, 8, v3
4064 ; CHECK-NEXT: s_waitcnt vmcnt(12)
4065 ; CHECK-NEXT: v_lshl_or_b32 v5, v6, 8, v5
4066 ; CHECK-NEXT: s_waitcnt vmcnt(10)
4067 ; CHECK-NEXT: v_lshl_or_b32 v7, v8, 8, v7
4068 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4069 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 8, v9
4070 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4071 ; CHECK-NEXT: v_lshl_or_b32 v6, v12, 8, v11
4072 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4073 ; CHECK-NEXT: v_lshl_or_b32 v9, v14, 8, v13
4074 ; CHECK-NEXT: v_lshl_or_b32 v3, v8, 16, v7
4075 ; CHECK-NEXT: s_waitcnt vmcnt(2)
4076 ; CHECK-NEXT: v_lshl_or_b32 v10, v16, 8, v15
4077 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4078 ; CHECK-NEXT: v_lshl_or_b32 v11, v2, 8, v17
4079 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v4
4080 ; CHECK-NEXT: v_lshl_or_b32 v5, v9, 16, v6
4081 ; CHECK-NEXT: v_lshl_or_b32 v4, v11, 16, v10
4082 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4083 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4085 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 16, i1 false)
4089 define void @memcpy_p1_p5_sz31_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
4090 ; CHECK-LABEL: memcpy_p1_p5_sz31_align_1_1:
4091 ; CHECK: ; %bb.0: ; %entry
4092 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4093 ; CHECK-NEXT: s_clause 0x1e
4094 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen
4095 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:1
4096 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:2
4097 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:3
4098 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:4
4099 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:5
4100 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:6
4101 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:7
4102 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:8
4103 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:9
4104 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:10
4105 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:11
4106 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:12
4107 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:13
4108 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:14
4109 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:15
4110 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:21
4111 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:22
4112 ; CHECK-NEXT: buffer_load_ubyte v21, v2, s[0:3], 0 offen offset:23
4113 ; CHECK-NEXT: buffer_load_ubyte v22, v2, s[0:3], 0 offen offset:16
4114 ; CHECK-NEXT: buffer_load_ubyte v23, v2, s[0:3], 0 offen offset:17
4115 ; CHECK-NEXT: buffer_load_ubyte v24, v2, s[0:3], 0 offen offset:18
4116 ; CHECK-NEXT: buffer_load_ubyte v25, v2, s[0:3], 0 offen offset:20
4117 ; CHECK-NEXT: buffer_load_ubyte v26, v2, s[0:3], 0 offen offset:19
4118 ; CHECK-NEXT: buffer_load_ubyte v27, v2, s[0:3], 0 offen offset:27
4119 ; CHECK-NEXT: buffer_load_ubyte v28, v2, s[0:3], 0 offen offset:28
4120 ; CHECK-NEXT: buffer_load_ubyte v29, v2, s[0:3], 0 offen offset:29
4121 ; CHECK-NEXT: buffer_load_ubyte v30, v2, s[0:3], 0 offen offset:30
4122 ; CHECK-NEXT: buffer_load_ubyte v31, v2, s[0:3], 0 offen offset:24
4123 ; CHECK-NEXT: buffer_load_ubyte v32, v2, s[0:3], 0 offen offset:25
4124 ; CHECK-NEXT: buffer_load_ubyte v2, v2, s[0:3], 0 offen offset:26
4125 ; CHECK-NEXT: s_waitcnt vmcnt(29)
4126 ; CHECK-NEXT: v_lshl_or_b32 v4, v4, 8, v3
4127 ; CHECK-NEXT: s_waitcnt vmcnt(27)
4128 ; CHECK-NEXT: v_lshl_or_b32 v5, v6, 8, v5
4129 ; CHECK-NEXT: s_waitcnt vmcnt(25)
4130 ; CHECK-NEXT: v_lshl_or_b32 v7, v8, 8, v7
4131 ; CHECK-NEXT: s_waitcnt vmcnt(23)
4132 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 8, v9
4133 ; CHECK-NEXT: s_waitcnt vmcnt(21)
4134 ; CHECK-NEXT: v_lshl_or_b32 v10, v12, 8, v11
4135 ; CHECK-NEXT: s_waitcnt vmcnt(19)
4136 ; CHECK-NEXT: v_lshl_or_b32 v11, v14, 8, v13
4137 ; CHECK-NEXT: v_lshl_or_b32 v3, v8, 16, v7
4138 ; CHECK-NEXT: s_waitcnt vmcnt(17)
4139 ; CHECK-NEXT: v_lshl_or_b32 v6, v16, 8, v15
4140 ; CHECK-NEXT: s_waitcnt vmcnt(15)
4141 ; CHECK-NEXT: v_lshl_or_b32 v9, v18, 8, v17
4142 ; CHECK-NEXT: s_waitcnt vmcnt(12)
4143 ; CHECK-NEXT: v_lshl_or_b32 v13, v21, 8, v20
4144 ; CHECK-NEXT: s_waitcnt vmcnt(10)
4145 ; CHECK-NEXT: v_lshl_or_b32 v15, v23, 8, v22
4146 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4147 ; CHECK-NEXT: v_lshl_or_b32 v12, v19, 8, v25
4148 ; CHECK-NEXT: s_waitcnt vmcnt(7)
4149 ; CHECK-NEXT: v_lshl_or_b32 v14, v26, 8, v24
4150 ; CHECK-NEXT: s_waitcnt vmcnt(5)
4151 ; CHECK-NEXT: v_lshl_or_b32 v16, v28, 8, v27
4152 ; CHECK-NEXT: s_waitcnt vmcnt(3)
4153 ; CHECK-NEXT: v_lshl_or_b32 v17, v30, 8, v29
4154 ; CHECK-NEXT: s_waitcnt vmcnt(2)
4155 ; CHECK-NEXT: v_lshl_or_b32 v18, v31, 8, v21
4156 ; CHECK-NEXT: v_lshl_or_b32 v7, v13, 16, v12
4157 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4158 ; CHECK-NEXT: v_lshl_or_b32 v19, v2, 8, v32
4159 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v4
4160 ; CHECK-NEXT: v_lshl_or_b32 v5, v9, 16, v6
4161 ; CHECK-NEXT: v_lshl_or_b32 v4, v11, 16, v10
4162 ; CHECK-NEXT: v_lshl_or_b32 v6, v14, 16, v15
4163 ; CHECK-NEXT: v_lshl_or_b32 v9, v17, 16, v16
4164 ; CHECK-NEXT: v_lshl_or_b32 v8, v19, 16, v18
4165 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4166 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16
4167 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off offset:23
4168 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4170 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 31, i1 false)
4174 define void @memcpy_p1_p5_sz32_align_1_1(ptr addrspace(1) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
4175 ; CHECK-LABEL: memcpy_p1_p5_sz32_align_1_1:
4176 ; CHECK: ; %bb.0: ; %entry
4177 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4178 ; CHECK-NEXT: s_clause 0x1f
4179 ; CHECK-NEXT: buffer_load_ubyte v3, v2, s[0:3], 0 offen
4180 ; CHECK-NEXT: buffer_load_ubyte v4, v2, s[0:3], 0 offen offset:1
4181 ; CHECK-NEXT: buffer_load_ubyte v5, v2, s[0:3], 0 offen offset:2
4182 ; CHECK-NEXT: buffer_load_ubyte v6, v2, s[0:3], 0 offen offset:3
4183 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:4
4184 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:5
4185 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:6
4186 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:7
4187 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:8
4188 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:9
4189 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:10
4190 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:11
4191 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:12
4192 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:13
4193 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:14
4194 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:15
4195 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:21
4196 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:22
4197 ; CHECK-NEXT: buffer_load_ubyte v21, v2, s[0:3], 0 offen offset:23
4198 ; CHECK-NEXT: buffer_load_ubyte v22, v2, s[0:3], 0 offen offset:16
4199 ; CHECK-NEXT: buffer_load_ubyte v23, v2, s[0:3], 0 offen offset:17
4200 ; CHECK-NEXT: buffer_load_ubyte v24, v2, s[0:3], 0 offen offset:18
4201 ; CHECK-NEXT: buffer_load_ubyte v25, v2, s[0:3], 0 offen offset:20
4202 ; CHECK-NEXT: buffer_load_ubyte v26, v2, s[0:3], 0 offen offset:19
4203 ; CHECK-NEXT: buffer_load_ubyte v27, v2, s[0:3], 0 offen offset:28
4204 ; CHECK-NEXT: buffer_load_ubyte v28, v2, s[0:3], 0 offen offset:29
4205 ; CHECK-NEXT: buffer_load_ubyte v29, v2, s[0:3], 0 offen offset:30
4206 ; CHECK-NEXT: buffer_load_ubyte v30, v2, s[0:3], 0 offen offset:31
4207 ; CHECK-NEXT: buffer_load_ubyte v31, v2, s[0:3], 0 offen offset:24
4208 ; CHECK-NEXT: buffer_load_ubyte v32, v2, s[0:3], 0 offen offset:25
4209 ; CHECK-NEXT: buffer_load_ubyte v33, v2, s[0:3], 0 offen offset:26
4210 ; CHECK-NEXT: buffer_load_ubyte v2, v2, s[0:3], 0 offen offset:27
4211 ; CHECK-NEXT: s_waitcnt vmcnt(30)
4212 ; CHECK-NEXT: v_lshl_or_b32 v4, v4, 8, v3
4213 ; CHECK-NEXT: s_waitcnt vmcnt(28)
4214 ; CHECK-NEXT: v_lshl_or_b32 v5, v6, 8, v5
4215 ; CHECK-NEXT: s_waitcnt vmcnt(26)
4216 ; CHECK-NEXT: v_lshl_or_b32 v7, v8, 8, v7
4217 ; CHECK-NEXT: s_waitcnt vmcnt(24)
4218 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 8, v9
4219 ; CHECK-NEXT: s_waitcnt vmcnt(22)
4220 ; CHECK-NEXT: v_lshl_or_b32 v10, v12, 8, v11
4221 ; CHECK-NEXT: s_waitcnt vmcnt(20)
4222 ; CHECK-NEXT: v_lshl_or_b32 v11, v14, 8, v13
4223 ; CHECK-NEXT: v_lshl_or_b32 v3, v8, 16, v7
4224 ; CHECK-NEXT: s_waitcnt vmcnt(18)
4225 ; CHECK-NEXT: v_lshl_or_b32 v6, v16, 8, v15
4226 ; CHECK-NEXT: s_waitcnt vmcnt(16)
4227 ; CHECK-NEXT: v_lshl_or_b32 v9, v18, 8, v17
4228 ; CHECK-NEXT: s_waitcnt vmcnt(13)
4229 ; CHECK-NEXT: v_lshl_or_b32 v13, v21, 8, v20
4230 ; CHECK-NEXT: s_waitcnt vmcnt(11)
4231 ; CHECK-NEXT: v_lshl_or_b32 v15, v23, 8, v22
4232 ; CHECK-NEXT: s_waitcnt vmcnt(9)
4233 ; CHECK-NEXT: v_lshl_or_b32 v12, v19, 8, v25
4234 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4235 ; CHECK-NEXT: v_lshl_or_b32 v14, v26, 8, v24
4236 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4237 ; CHECK-NEXT: v_lshl_or_b32 v16, v28, 8, v27
4238 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4239 ; CHECK-NEXT: v_lshl_or_b32 v17, v30, 8, v29
4240 ; CHECK-NEXT: v_lshl_or_b32 v7, v13, 16, v12
4241 ; CHECK-NEXT: s_waitcnt vmcnt(2)
4242 ; CHECK-NEXT: v_lshl_or_b32 v18, v32, 8, v31
4243 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4244 ; CHECK-NEXT: v_lshl_or_b32 v19, v2, 8, v33
4245 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v4
4246 ; CHECK-NEXT: v_lshl_or_b32 v5, v9, 16, v6
4247 ; CHECK-NEXT: v_lshl_or_b32 v4, v11, 16, v10
4248 ; CHECK-NEXT: v_lshl_or_b32 v6, v14, 16, v15
4249 ; CHECK-NEXT: v_lshl_or_b32 v9, v17, 16, v16
4250 ; CHECK-NEXT: v_lshl_or_b32 v8, v19, 16, v18
4251 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4252 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[6:9], off offset:16
4253 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4255 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 32, i1 false)
4259 define void @memcpy_p1_p5_sz16_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
4260 ; CHECK-LABEL: memcpy_p1_p5_sz16_align_2_2:
4261 ; CHECK: ; %bb.0: ; %entry
4262 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4263 ; CHECK-NEXT: s_clause 0x7
4264 ; CHECK-NEXT: buffer_load_ushort v4, v2, s[0:3], 0 offen
4265 ; CHECK-NEXT: buffer_load_ushort v5, v2, s[0:3], 0 offen offset:2
4266 ; CHECK-NEXT: buffer_load_ushort v3, v2, s[0:3], 0 offen offset:4
4267 ; CHECK-NEXT: buffer_load_ushort v6, v2, s[0:3], 0 offen offset:6
4268 ; CHECK-NEXT: buffer_load_ushort v7, v2, s[0:3], 0 offen offset:12
4269 ; CHECK-NEXT: buffer_load_ushort v8, v2, s[0:3], 0 offen offset:14
4270 ; CHECK-NEXT: buffer_load_ushort v9, v2, s[0:3], 0 offen offset:8
4271 ; CHECK-NEXT: buffer_load_ushort v10, v2, s[0:3], 0 offen offset:10
4272 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4273 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v4
4274 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4275 ; CHECK-NEXT: v_lshl_or_b32 v3, v6, 16, v3
4276 ; CHECK-NEXT: s_waitcnt vmcnt(2)
4277 ; CHECK-NEXT: v_lshl_or_b32 v5, v8, 16, v7
4278 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4279 ; CHECK-NEXT: v_lshl_or_b32 v4, v10, 16, v9
4280 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4281 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4283 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 16, i1 false)
4287 define void @memcpy_p1_p5_sz31_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
4288 ; CHECK-LABEL: memcpy_p1_p5_sz31_align_2_2:
4289 ; CHECK: ; %bb.0: ; %entry
4290 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4291 ; CHECK-NEXT: s_clause 0x13
4292 ; CHECK-NEXT: buffer_load_ushort v4, v2, s[0:3], 0 offen
4293 ; CHECK-NEXT: buffer_load_ushort v5, v2, s[0:3], 0 offen offset:2
4294 ; CHECK-NEXT: buffer_load_ushort v3, v2, s[0:3], 0 offen offset:4
4295 ; CHECK-NEXT: buffer_load_ushort v6, v2, s[0:3], 0 offen offset:6
4296 ; CHECK-NEXT: buffer_load_ushort v7, v2, s[0:3], 0 offen offset:8
4297 ; CHECK-NEXT: buffer_load_ushort v8, v2, s[0:3], 0 offen offset:10
4298 ; CHECK-NEXT: buffer_load_ushort v9, v2, s[0:3], 0 offen offset:12
4299 ; CHECK-NEXT: buffer_load_ushort v10, v2, s[0:3], 0 offen offset:14
4300 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:27
4301 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:28
4302 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:29
4303 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:30
4304 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:23
4305 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:24
4306 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:25
4307 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:26
4308 ; CHECK-NEXT: buffer_load_ushort v19, v2, s[0:3], 0 offen offset:20
4309 ; CHECK-NEXT: buffer_load_ushort v20, v2, s[0:3], 0 offen offset:22
4310 ; CHECK-NEXT: buffer_load_ushort v21, v2, s[0:3], 0 offen offset:16
4311 ; CHECK-NEXT: buffer_load_ushort v22, v2, s[0:3], 0 offen offset:18
4312 ; CHECK-NEXT: s_waitcnt vmcnt(18)
4313 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v4
4314 ; CHECK-NEXT: s_waitcnt vmcnt(16)
4315 ; CHECK-NEXT: v_lshl_or_b32 v3, v6, 16, v3
4316 ; CHECK-NEXT: s_waitcnt vmcnt(14)
4317 ; CHECK-NEXT: v_lshl_or_b32 v4, v8, 16, v7
4318 ; CHECK-NEXT: s_waitcnt vmcnt(12)
4319 ; CHECK-NEXT: v_lshl_or_b32 v5, v10, 16, v9
4320 ; CHECK-NEXT: s_waitcnt vmcnt(10)
4321 ; CHECK-NEXT: v_lshl_or_b32 v10, v12, 8, v11
4322 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4323 ; CHECK-NEXT: v_lshl_or_b32 v9, v14, 8, v13
4324 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4325 ; CHECK-NEXT: v_lshl_or_b32 v11, v16, 8, v15
4326 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4327 ; CHECK-NEXT: v_lshl_or_b32 v12, v18, 8, v17
4328 ; CHECK-NEXT: v_lshl_or_b32 v9, v9, 16, v10
4329 ; CHECK-NEXT: s_waitcnt vmcnt(2)
4330 ; CHECK-NEXT: v_lshl_or_b32 v7, v20, 16, v19
4331 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4332 ; CHECK-NEXT: v_lshl_or_b32 v6, v22, 16, v21
4333 ; CHECK-NEXT: v_lshl_or_b32 v8, v12, 16, v11
4334 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4335 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[6:7], off offset:16
4336 ; CHECK-NEXT: global_store_dwordx2 v[0:1], v[8:9], off offset:23
4337 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4339 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 31, i1 false)
4343 define void @memcpy_p1_p5_sz32_align_2_2(ptr addrspace(1) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
4344 ; CHECK-LABEL: memcpy_p1_p5_sz32_align_2_2:
4345 ; CHECK: ; %bb.0: ; %entry
4346 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4347 ; CHECK-NEXT: s_clause 0xf
4348 ; CHECK-NEXT: buffer_load_ushort v4, v2, s[0:3], 0 offen
4349 ; CHECK-NEXT: buffer_load_ushort v5, v2, s[0:3], 0 offen offset:2
4350 ; CHECK-NEXT: buffer_load_ushort v3, v2, s[0:3], 0 offen offset:4
4351 ; CHECK-NEXT: buffer_load_ushort v6, v2, s[0:3], 0 offen offset:6
4352 ; CHECK-NEXT: buffer_load_ushort v7, v2, s[0:3], 0 offen offset:8
4353 ; CHECK-NEXT: buffer_load_ushort v8, v2, s[0:3], 0 offen offset:10
4354 ; CHECK-NEXT: buffer_load_ushort v9, v2, s[0:3], 0 offen offset:12
4355 ; CHECK-NEXT: buffer_load_ushort v10, v2, s[0:3], 0 offen offset:14
4356 ; CHECK-NEXT: buffer_load_ushort v11, v2, s[0:3], 0 offen offset:16
4357 ; CHECK-NEXT: buffer_load_ushort v12, v2, s[0:3], 0 offen offset:18
4358 ; CHECK-NEXT: buffer_load_ushort v13, v2, s[0:3], 0 offen offset:20
4359 ; CHECK-NEXT: buffer_load_ushort v14, v2, s[0:3], 0 offen offset:22
4360 ; CHECK-NEXT: buffer_load_ushort v15, v2, s[0:3], 0 offen offset:28
4361 ; CHECK-NEXT: buffer_load_ushort v16, v2, s[0:3], 0 offen offset:30
4362 ; CHECK-NEXT: buffer_load_ushort v17, v2, s[0:3], 0 offen offset:24
4363 ; CHECK-NEXT: buffer_load_ushort v18, v2, s[0:3], 0 offen offset:26
4364 ; CHECK-NEXT: s_waitcnt vmcnt(14)
4365 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v4
4366 ; CHECK-NEXT: s_waitcnt vmcnt(12)
4367 ; CHECK-NEXT: v_lshl_or_b32 v3, v6, 16, v3
4368 ; CHECK-NEXT: s_waitcnt vmcnt(10)
4369 ; CHECK-NEXT: v_lshl_or_b32 v4, v8, 16, v7
4370 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4371 ; CHECK-NEXT: v_lshl_or_b32 v5, v10, 16, v9
4372 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4373 ; CHECK-NEXT: v_lshl_or_b32 v6, v12, 16, v11
4374 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4375 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 16, v13
4376 ; CHECK-NEXT: s_waitcnt vmcnt(2)
4377 ; CHECK-NEXT: v_lshl_or_b32 v9, v16, 16, v15
4378 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4379 ; CHECK-NEXT: v_lshl_or_b32 v8, v18, 16, v17
4380 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[2:5], off
4381 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[6:9], off offset:16
4382 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4384 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 32, i1 false)
4388 define void @memcpy_p1_p5_sz16_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
4389 ; CHECK-LABEL: memcpy_p1_p5_sz16_align_8_8:
4390 ; CHECK: ; %bb.0: ; %entry
4391 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4392 ; CHECK-NEXT: s_clause 0x3
4393 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
4394 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
4395 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
4396 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
4397 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4398 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
4399 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4401 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 16, i1 false)
4405 define void @memcpy_p1_p5_sz31_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
4406 ; CHECK-LABEL: memcpy_p1_p5_sz31_align_8_8:
4407 ; CHECK: ; %bb.0: ; %entry
4408 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4409 ; CHECK-NEXT: s_clause 0x13
4410 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:27
4411 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:28
4412 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:29
4413 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:30
4414 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:19
4415 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:20
4416 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:21
4417 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:22
4418 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:23
4419 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:24
4420 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:25
4421 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:26
4422 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:15
4423 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:16
4424 ; CHECK-NEXT: buffer_load_ubyte v21, v2, s[0:3], 0 offen offset:17
4425 ; CHECK-NEXT: buffer_load_ubyte v22, v2, s[0:3], 0 offen offset:18
4426 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
4427 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
4428 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
4429 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
4430 ; CHECK-NEXT: s_waitcnt vmcnt(18)
4431 ; CHECK-NEXT: v_lshl_or_b32 v7, v8, 8, v7
4432 ; CHECK-NEXT: s_waitcnt vmcnt(16)
4433 ; CHECK-NEXT: v_lshl_or_b32 v2, v10, 8, v9
4434 ; CHECK-NEXT: s_waitcnt vmcnt(14)
4435 ; CHECK-NEXT: v_lshl_or_b32 v11, v12, 8, v11
4436 ; CHECK-NEXT: s_waitcnt vmcnt(12)
4437 ; CHECK-NEXT: v_lshl_or_b32 v12, v14, 8, v13
4438 ; CHECK-NEXT: v_lshl_or_b32 v10, v2, 16, v7
4439 ; CHECK-NEXT: s_waitcnt vmcnt(10)
4440 ; CHECK-NEXT: v_lshl_or_b32 v8, v16, 8, v15
4441 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4442 ; CHECK-NEXT: v_lshl_or_b32 v9, v18, 8, v17
4443 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4444 ; CHECK-NEXT: v_lshl_or_b32 v13, v20, 8, v19
4445 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4446 ; CHECK-NEXT: v_lshl_or_b32 v14, v22, 8, v21
4447 ; CHECK-NEXT: v_lshl_or_b32 v9, v9, 16, v8
4448 ; CHECK-NEXT: v_lshl_or_b32 v8, v12, 16, v11
4449 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 16, v13
4450 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4451 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
4452 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:15
4453 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4455 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 31, i1 false)
4459 define void @memcpy_p1_p5_sz32_align_8_8(ptr addrspace(1) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
4460 ; CHECK-LABEL: memcpy_p1_p5_sz32_align_8_8:
4461 ; CHECK: ; %bb.0: ; %entry
4462 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4463 ; CHECK-NEXT: s_clause 0x7
4464 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
4465 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
4466 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
4467 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
4468 ; CHECK-NEXT: buffer_load_dword v7, v2, s[0:3], 0 offen offset:16
4469 ; CHECK-NEXT: buffer_load_dword v8, v2, s[0:3], 0 offen offset:20
4470 ; CHECK-NEXT: buffer_load_dword v9, v2, s[0:3], 0 offen offset:24
4471 ; CHECK-NEXT: buffer_load_dword v10, v2, s[0:3], 0 offen offset:28
4472 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4473 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
4474 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4475 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:16
4476 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4478 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 32, i1 false)
4482 define void @memcpy_p1_p5_sz16_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
4483 ; CHECK-LABEL: memcpy_p1_p5_sz16_align_16_16:
4484 ; CHECK: ; %bb.0: ; %entry
4485 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4486 ; CHECK-NEXT: s_clause 0x3
4487 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
4488 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
4489 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
4490 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
4491 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4492 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
4493 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4495 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 16, i1 false)
4499 define void @memcpy_p1_p5_sz31_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
4500 ; CHECK-LABEL: memcpy_p1_p5_sz31_align_16_16:
4501 ; CHECK: ; %bb.0: ; %entry
4502 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4503 ; CHECK-NEXT: s_clause 0x13
4504 ; CHECK-NEXT: buffer_load_ubyte v7, v2, s[0:3], 0 offen offset:27
4505 ; CHECK-NEXT: buffer_load_ubyte v8, v2, s[0:3], 0 offen offset:28
4506 ; CHECK-NEXT: buffer_load_ubyte v9, v2, s[0:3], 0 offen offset:29
4507 ; CHECK-NEXT: buffer_load_ubyte v10, v2, s[0:3], 0 offen offset:30
4508 ; CHECK-NEXT: buffer_load_ubyte v11, v2, s[0:3], 0 offen offset:19
4509 ; CHECK-NEXT: buffer_load_ubyte v12, v2, s[0:3], 0 offen offset:20
4510 ; CHECK-NEXT: buffer_load_ubyte v13, v2, s[0:3], 0 offen offset:21
4511 ; CHECK-NEXT: buffer_load_ubyte v14, v2, s[0:3], 0 offen offset:22
4512 ; CHECK-NEXT: buffer_load_ubyte v15, v2, s[0:3], 0 offen offset:23
4513 ; CHECK-NEXT: buffer_load_ubyte v16, v2, s[0:3], 0 offen offset:24
4514 ; CHECK-NEXT: buffer_load_ubyte v17, v2, s[0:3], 0 offen offset:25
4515 ; CHECK-NEXT: buffer_load_ubyte v18, v2, s[0:3], 0 offen offset:26
4516 ; CHECK-NEXT: buffer_load_ubyte v19, v2, s[0:3], 0 offen offset:15
4517 ; CHECK-NEXT: buffer_load_ubyte v20, v2, s[0:3], 0 offen offset:16
4518 ; CHECK-NEXT: buffer_load_ubyte v21, v2, s[0:3], 0 offen offset:17
4519 ; CHECK-NEXT: buffer_load_ubyte v22, v2, s[0:3], 0 offen offset:18
4520 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
4521 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
4522 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
4523 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
4524 ; CHECK-NEXT: s_waitcnt vmcnt(18)
4525 ; CHECK-NEXT: v_lshl_or_b32 v7, v8, 8, v7
4526 ; CHECK-NEXT: s_waitcnt vmcnt(16)
4527 ; CHECK-NEXT: v_lshl_or_b32 v2, v10, 8, v9
4528 ; CHECK-NEXT: s_waitcnt vmcnt(14)
4529 ; CHECK-NEXT: v_lshl_or_b32 v11, v12, 8, v11
4530 ; CHECK-NEXT: s_waitcnt vmcnt(12)
4531 ; CHECK-NEXT: v_lshl_or_b32 v12, v14, 8, v13
4532 ; CHECK-NEXT: v_lshl_or_b32 v10, v2, 16, v7
4533 ; CHECK-NEXT: s_waitcnt vmcnt(10)
4534 ; CHECK-NEXT: v_lshl_or_b32 v8, v16, 8, v15
4535 ; CHECK-NEXT: s_waitcnt vmcnt(8)
4536 ; CHECK-NEXT: v_lshl_or_b32 v9, v18, 8, v17
4537 ; CHECK-NEXT: s_waitcnt vmcnt(6)
4538 ; CHECK-NEXT: v_lshl_or_b32 v13, v20, 8, v19
4539 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4540 ; CHECK-NEXT: v_lshl_or_b32 v14, v22, 8, v21
4541 ; CHECK-NEXT: v_lshl_or_b32 v9, v9, 16, v8
4542 ; CHECK-NEXT: v_lshl_or_b32 v8, v12, 16, v11
4543 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 16, v13
4544 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4545 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
4546 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:15
4547 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4549 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 31, i1 false)
4553 define void @memcpy_p1_p5_sz32_align_16_16(ptr addrspace(1) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
4554 ; CHECK-LABEL: memcpy_p1_p5_sz32_align_16_16:
4555 ; CHECK: ; %bb.0: ; %entry
4556 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4557 ; CHECK-NEXT: s_clause 0x7
4558 ; CHECK-NEXT: buffer_load_dword v3, v2, s[0:3], 0 offen
4559 ; CHECK-NEXT: buffer_load_dword v4, v2, s[0:3], 0 offen offset:4
4560 ; CHECK-NEXT: buffer_load_dword v5, v2, s[0:3], 0 offen offset:8
4561 ; CHECK-NEXT: buffer_load_dword v6, v2, s[0:3], 0 offen offset:12
4562 ; CHECK-NEXT: buffer_load_dword v7, v2, s[0:3], 0 offen offset:16
4563 ; CHECK-NEXT: buffer_load_dword v8, v2, s[0:3], 0 offen offset:20
4564 ; CHECK-NEXT: buffer_load_dword v9, v2, s[0:3], 0 offen offset:24
4565 ; CHECK-NEXT: buffer_load_dword v10, v2, s[0:3], 0 offen offset:28
4566 ; CHECK-NEXT: s_waitcnt vmcnt(4)
4567 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[3:6], off
4568 ; CHECK-NEXT: s_waitcnt vmcnt(0)
4569 ; CHECK-NEXT: global_store_dwordx4 v[0:1], v[7:10], off offset:16
4570 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4572 tail call void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 32, i1 false)
4576 define void @memcpy_p3_p0_sz16_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
4577 ; CHECK-LABEL: memcpy_p3_p0_sz16_align_1_1:
4578 ; CHECK: ; %bb.0: ; %entry
4579 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4580 ; CHECK-NEXT: s_clause 0xf
4581 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:5
4582 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:6
4583 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:7
4584 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2]
4585 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:1
4586 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:2
4587 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:4
4588 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:3
4589 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:15
4590 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:14
4591 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:13
4592 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:12
4593 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:9
4594 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:8
4595 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:11
4596 ; CHECK-NEXT: flat_load_ubyte v1, v[1:2] offset:10
4597 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
4598 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 8, v9
4599 ; CHECK-NEXT: v_lshl_or_b32 v3, v5, 8, v4
4600 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 8, v6
4601 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
4602 ; CHECK-NEXT: v_lshl_or_b32 v5, v10, 8, v8
4603 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
4604 ; CHECK-NEXT: v_lshl_or_b32 v7, v11, 8, v12
4605 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
4606 ; CHECK-NEXT: v_lshl_or_b32 v6, v13, 8, v14
4607 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 16, v2
4608 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4609 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 8, v16
4610 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4611 ; CHECK-NEXT: v_lshl_or_b32 v9, v17, 8, v1
4612 ; CHECK-NEXT: v_lshl_or_b32 v1, v5, 16, v4
4613 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 16, v6
4614 ; CHECK-NEXT: v_lshl_or_b32 v3, v9, 16, v8
4615 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
4616 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4617 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4619 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 16, i1 false)
4623 define void @memcpy_p3_p0_sz31_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
4624 ; CHECK-LABEL: memcpy_p3_p0_sz31_align_1_1:
4625 ; CHECK: ; %bb.0: ; %entry
4626 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4627 ; CHECK-NEXT: s_clause 0x1e
4628 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:28
4629 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:29
4630 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:30
4631 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:24
4632 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:25
4633 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:27
4634 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:26
4635 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:15
4636 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:14
4637 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:13
4638 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:12
4639 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:23
4640 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:22
4641 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:21
4642 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:20
4643 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2] offset:19
4644 ; CHECK-NEXT: flat_load_ubyte v19, v[1:2] offset:18
4645 ; CHECK-NEXT: flat_load_ubyte v20, v[1:2] offset:17
4646 ; CHECK-NEXT: flat_load_ubyte v21, v[1:2] offset:16
4647 ; CHECK-NEXT: flat_load_ubyte v22, v[1:2] offset:11
4648 ; CHECK-NEXT: flat_load_ubyte v23, v[1:2] offset:10
4649 ; CHECK-NEXT: flat_load_ubyte v24, v[1:2] offset:9
4650 ; CHECK-NEXT: flat_load_ubyte v25, v[1:2] offset:8
4651 ; CHECK-NEXT: flat_load_ubyte v26, v[1:2] offset:7
4652 ; CHECK-NEXT: flat_load_ubyte v27, v[1:2] offset:6
4653 ; CHECK-NEXT: flat_load_ubyte v28, v[1:2] offset:5
4654 ; CHECK-NEXT: flat_load_ubyte v29, v[1:2] offset:4
4655 ; CHECK-NEXT: flat_load_ubyte v30, v[1:2] offset:1
4656 ; CHECK-NEXT: flat_load_ubyte v31, v[1:2]
4657 ; CHECK-NEXT: flat_load_ubyte v32, v[1:2] offset:3
4658 ; CHECK-NEXT: flat_load_ubyte v1, v[1:2] offset:2
4659 ; CHECK-NEXT: s_waitcnt vmcnt(25) lgkmcnt(25)
4660 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 8, v8
4661 ; CHECK-NEXT: v_lshl_or_b32 v3, v5, 8, v4
4662 ; CHECK-NEXT: s_waitcnt vmcnt(24) lgkmcnt(24)
4663 ; CHECK-NEXT: v_lshl_or_b32 v5, v9, 8, v7
4664 ; CHECK-NEXT: s_waitcnt vmcnt(22) lgkmcnt(22)
4665 ; CHECK-NEXT: v_lshl_or_b32 v10, v10, 8, v11
4666 ; CHECK-NEXT: s_waitcnt vmcnt(20) lgkmcnt(20)
4667 ; CHECK-NEXT: v_lshl_or_b32 v12, v12, 8, v13
4668 ; CHECK-NEXT: s_waitcnt vmcnt(19) lgkmcnt(19)
4669 ; CHECK-NEXT: v_lshl_or_b32 v4, v6, 8, v14
4670 ; CHECK-NEXT: s_waitcnt vmcnt(18) lgkmcnt(18)
4671 ; CHECK-NEXT: v_lshl_or_b32 v7, v14, 8, v15
4672 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 16, v2
4673 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
4674 ; CHECK-NEXT: v_lshl_or_b32 v6, v16, 8, v17
4675 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
4676 ; CHECK-NEXT: v_lshl_or_b32 v9, v18, 8, v19
4677 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
4678 ; CHECK-NEXT: v_lshl_or_b32 v8, v20, 8, v21
4679 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
4680 ; CHECK-NEXT: v_lshl_or_b32 v13, v22, 8, v23
4681 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
4682 ; CHECK-NEXT: v_lshl_or_b32 v11, v24, 8, v25
4683 ; CHECK-NEXT: v_lshl_or_b32 v3, v9, 16, v8
4684 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
4685 ; CHECK-NEXT: v_lshl_or_b32 v15, v26, 8, v27
4686 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
4687 ; CHECK-NEXT: v_lshl_or_b32 v14, v28, 8, v29
4688 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4689 ; CHECK-NEXT: v_lshl_or_b32 v16, v30, 8, v31
4690 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4691 ; CHECK-NEXT: v_lshl_or_b32 v17, v32, 8, v1
4692 ; CHECK-NEXT: v_lshl_or_b32 v1, v5, 16, v4
4693 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 16, v6
4694 ; CHECK-NEXT: v_lshl_or_b32 v6, v10, 16, v12
4695 ; CHECK-NEXT: v_lshl_or_b32 v5, v13, 16, v11
4696 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 16, v14
4697 ; CHECK-NEXT: v_lshl_or_b32 v7, v17, 16, v16
4698 ; CHECK-NEXT: ds_write_b64 v0, v[1:2] offset:23
4699 ; CHECK-NEXT: ds_write_b64 v0, v[3:4] offset:16
4700 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[5:6] offset1:1
4701 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4702 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4704 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 31, i1 false)
4708 define void @memcpy_p3_p0_sz32_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
4709 ; CHECK-LABEL: memcpy_p3_p0_sz32_align_1_1:
4710 ; CHECK: ; %bb.0: ; %entry
4711 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4712 ; CHECK-NEXT: s_clause 0x1f
4713 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:29
4714 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:30
4715 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:31
4716 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:24
4717 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:25
4718 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:26
4719 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:28
4720 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:27
4721 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:15
4722 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:14
4723 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:13
4724 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:12
4725 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:23
4726 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:22
4727 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:21
4728 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2] offset:20
4729 ; CHECK-NEXT: flat_load_ubyte v19, v[1:2] offset:19
4730 ; CHECK-NEXT: flat_load_ubyte v20, v[1:2] offset:18
4731 ; CHECK-NEXT: flat_load_ubyte v21, v[1:2] offset:17
4732 ; CHECK-NEXT: flat_load_ubyte v22, v[1:2] offset:16
4733 ; CHECK-NEXT: flat_load_ubyte v23, v[1:2] offset:11
4734 ; CHECK-NEXT: flat_load_ubyte v24, v[1:2] offset:10
4735 ; CHECK-NEXT: flat_load_ubyte v25, v[1:2] offset:9
4736 ; CHECK-NEXT: flat_load_ubyte v26, v[1:2] offset:8
4737 ; CHECK-NEXT: flat_load_ubyte v27, v[1:2] offset:7
4738 ; CHECK-NEXT: flat_load_ubyte v28, v[1:2] offset:6
4739 ; CHECK-NEXT: flat_load_ubyte v29, v[1:2] offset:5
4740 ; CHECK-NEXT: flat_load_ubyte v30, v[1:2] offset:4
4741 ; CHECK-NEXT: flat_load_ubyte v31, v[1:2] offset:1
4742 ; CHECK-NEXT: flat_load_ubyte v32, v[1:2]
4743 ; CHECK-NEXT: flat_load_ubyte v33, v[1:2] offset:3
4744 ; CHECK-NEXT: flat_load_ubyte v1, v[1:2] offset:2
4745 ; CHECK-NEXT: s_waitcnt vmcnt(25) lgkmcnt(25)
4746 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 8, v9
4747 ; CHECK-NEXT: v_lshl_or_b32 v3, v5, 8, v4
4748 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 8, v6
4749 ; CHECK-NEXT: s_waitcnt vmcnt(24) lgkmcnt(24)
4750 ; CHECK-NEXT: v_lshl_or_b32 v5, v10, 8, v8
4751 ; CHECK-NEXT: s_waitcnt vmcnt(22) lgkmcnt(22)
4752 ; CHECK-NEXT: v_lshl_or_b32 v11, v11, 8, v12
4753 ; CHECK-NEXT: s_waitcnt vmcnt(20) lgkmcnt(20)
4754 ; CHECK-NEXT: v_lshl_or_b32 v10, v13, 8, v14
4755 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 16, v2
4756 ; CHECK-NEXT: s_waitcnt vmcnt(18) lgkmcnt(18)
4757 ; CHECK-NEXT: v_lshl_or_b32 v7, v15, 8, v16
4758 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
4759 ; CHECK-NEXT: v_lshl_or_b32 v6, v17, 8, v18
4760 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
4761 ; CHECK-NEXT: v_lshl_or_b32 v9, v19, 8, v20
4762 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
4763 ; CHECK-NEXT: v_lshl_or_b32 v8, v21, 8, v22
4764 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
4765 ; CHECK-NEXT: v_lshl_or_b32 v13, v23, 8, v24
4766 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
4767 ; CHECK-NEXT: v_lshl_or_b32 v12, v25, 8, v26
4768 ; CHECK-NEXT: v_lshl_or_b32 v3, v9, 16, v8
4769 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
4770 ; CHECK-NEXT: v_lshl_or_b32 v15, v27, 8, v28
4771 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
4772 ; CHECK-NEXT: v_lshl_or_b32 v14, v29, 8, v30
4773 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4774 ; CHECK-NEXT: v_lshl_or_b32 v16, v31, 8, v32
4775 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4776 ; CHECK-NEXT: v_lshl_or_b32 v17, v33, 8, v1
4777 ; CHECK-NEXT: v_lshl_or_b32 v1, v5, 16, v4
4778 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 16, v6
4779 ; CHECK-NEXT: v_lshl_or_b32 v6, v11, 16, v10
4780 ; CHECK-NEXT: v_lshl_or_b32 v5, v13, 16, v12
4781 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 16, v14
4782 ; CHECK-NEXT: v_lshl_or_b32 v7, v17, 16, v16
4783 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[1:2] offset0:2 offset1:3
4784 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[5:6] offset1:1
4785 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4786 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4788 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 32, i1 false)
4792 define void @memcpy_p3_p0_sz16_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
4793 ; CHECK-LABEL: memcpy_p3_p0_sz16_align_2_2:
4794 ; CHECK: ; %bb.0: ; %entry
4795 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4796 ; CHECK-NEXT: s_clause 0x7
4797 ; CHECK-NEXT: flat_load_ushort v3, v[1:2] offset:6
4798 ; CHECK-NEXT: flat_load_ushort v4, v[1:2]
4799 ; CHECK-NEXT: flat_load_ushort v5, v[1:2] offset:12
4800 ; CHECK-NEXT: flat_load_ushort v6, v[1:2] offset:8
4801 ; CHECK-NEXT: flat_load_ushort v7, v[1:2] offset:4
4802 ; CHECK-NEXT: flat_load_ushort v8, v[1:2] offset:2
4803 ; CHECK-NEXT: flat_load_ushort v9, v[1:2] offset:14
4804 ; CHECK-NEXT: flat_load_ushort v10, v[1:2] offset:10
4805 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
4806 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 16, v7
4807 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4808 ; CHECK-NEXT: v_lshl_or_b32 v1, v8, 16, v4
4809 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
4810 ; CHECK-NEXT: v_lshl_or_b32 v4, v9, 16, v5
4811 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4812 ; CHECK-NEXT: v_lshl_or_b32 v3, v10, 16, v6
4813 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
4814 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4815 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4817 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 16, i1 false)
4821 define void @memcpy_p3_p0_sz31_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
4822 ; CHECK-LABEL: memcpy_p3_p0_sz31_align_2_2:
4823 ; CHECK: ; %bb.0: ; %entry
4824 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4825 ; CHECK-NEXT: s_clause 0x13
4826 ; CHECK-NEXT: flat_load_ushort v3, v[1:2] offset:22
4827 ; CHECK-NEXT: flat_load_ushort v4, v[1:2] offset:16
4828 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:26
4829 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:25
4830 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:24
4831 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:23
4832 ; CHECK-NEXT: flat_load_ushort v9, v[1:2] offset:20
4833 ; CHECK-NEXT: flat_load_ushort v10, v[1:2] offset:18
4834 ; CHECK-NEXT: flat_load_ushort v11, v[1:2] offset:14
4835 ; CHECK-NEXT: flat_load_ushort v12, v[1:2] offset:12
4836 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:30
4837 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:29
4838 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:28
4839 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:27
4840 ; CHECK-NEXT: flat_load_ushort v17, v[1:2] offset:10
4841 ; CHECK-NEXT: flat_load_ushort v18, v[1:2] offset:8
4842 ; CHECK-NEXT: flat_load_ushort v19, v[1:2] offset:6
4843 ; CHECK-NEXT: flat_load_ushort v20, v[1:2] offset:4
4844 ; CHECK-NEXT: flat_load_ushort v21, v[1:2] offset:2
4845 ; CHECK-NEXT: flat_load_ushort v22, v[1:2]
4846 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
4847 ; CHECK-NEXT: v_lshl_or_b32 v7, v7, 8, v8
4848 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
4849 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 16, v9
4850 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
4851 ; CHECK-NEXT: v_lshl_or_b32 v1, v10, 16, v4
4852 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
4853 ; CHECK-NEXT: v_lshl_or_b32 v4, v11, 16, v12
4854 ; CHECK-NEXT: v_lshl_or_b32 v11, v5, 8, v6
4855 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
4856 ; CHECK-NEXT: v_lshl_or_b32 v10, v13, 8, v14
4857 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
4858 ; CHECK-NEXT: v_lshl_or_b32 v9, v15, 8, v16
4859 ; CHECK-NEXT: v_lshl_or_b32 v7, v11, 16, v7
4860 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
4861 ; CHECK-NEXT: v_lshl_or_b32 v3, v17, 16, v18
4862 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4863 ; CHECK-NEXT: v_lshl_or_b32 v6, v19, 16, v20
4864 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 16, v9
4865 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4866 ; CHECK-NEXT: v_lshl_or_b32 v5, v21, 16, v22
4867 ; CHECK-NEXT: ds_write_b64 v0, v[1:2] offset:16
4868 ; CHECK-NEXT: ds_write2_b64 v0, v[5:6], v[3:4] offset1:1
4869 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:23
4870 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4871 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4873 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 31, i1 false)
4877 define void @memcpy_p3_p0_sz32_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
4878 ; CHECK-LABEL: memcpy_p3_p0_sz32_align_2_2:
4879 ; CHECK: ; %bb.0: ; %entry
4880 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4881 ; CHECK-NEXT: s_clause 0xf
4882 ; CHECK-NEXT: flat_load_ushort v3, v[1:2] offset:30
4883 ; CHECK-NEXT: flat_load_ushort v4, v[1:2] offset:28
4884 ; CHECK-NEXT: flat_load_ushort v5, v[1:2] offset:26
4885 ; CHECK-NEXT: flat_load_ushort v6, v[1:2] offset:14
4886 ; CHECK-NEXT: flat_load_ushort v7, v[1:2] offset:12
4887 ; CHECK-NEXT: flat_load_ushort v8, v[1:2] offset:10
4888 ; CHECK-NEXT: flat_load_ushort v9, v[1:2] offset:8
4889 ; CHECK-NEXT: flat_load_ushort v10, v[1:2] offset:24
4890 ; CHECK-NEXT: flat_load_ushort v11, v[1:2] offset:22
4891 ; CHECK-NEXT: flat_load_ushort v12, v[1:2] offset:20
4892 ; CHECK-NEXT: flat_load_ushort v13, v[1:2] offset:18
4893 ; CHECK-NEXT: flat_load_ushort v14, v[1:2] offset:16
4894 ; CHECK-NEXT: flat_load_ushort v15, v[1:2] offset:6
4895 ; CHECK-NEXT: flat_load_ushort v16, v[1:2] offset:4
4896 ; CHECK-NEXT: flat_load_ushort v17, v[1:2] offset:2
4897 ; CHECK-NEXT: flat_load_ushort v18, v[1:2]
4898 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
4899 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 16, v4
4900 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
4901 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 16, v7
4902 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
4903 ; CHECK-NEXT: v_lshl_or_b32 v1, v5, 16, v10
4904 ; CHECK-NEXT: v_lshl_or_b32 v5, v8, 16, v9
4905 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
4906 ; CHECK-NEXT: v_lshl_or_b32 v4, v11, 16, v12
4907 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
4908 ; CHECK-NEXT: v_lshl_or_b32 v3, v13, 16, v14
4909 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4910 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 16, v16
4911 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4912 ; CHECK-NEXT: v_lshl_or_b32 v7, v17, 16, v18
4913 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[1:2] offset0:2 offset1:3
4914 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[5:6] offset1:1
4915 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4916 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4918 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 32, i1 false)
4922 define void @memcpy_p3_p0_sz16_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
4923 ; CHECK-LABEL: memcpy_p3_p0_sz16_align_8_8:
4924 ; CHECK: ; %bb.0: ; %entry
4925 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4926 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
4927 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4928 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
4929 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4930 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4932 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 16, i1 false)
4936 define void @memcpy_p3_p0_sz31_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
4937 ; CHECK-LABEL: memcpy_p3_p0_sz31_align_8_8:
4938 ; CHECK: ; %bb.0: ; %entry
4939 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4940 ; CHECK-NEXT: s_clause 0x10
4941 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:18
4942 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:26
4943 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:25
4944 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:24
4945 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:23
4946 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:30
4947 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:29
4948 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:28
4949 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:27
4950 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:22
4951 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:21
4952 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:20
4953 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:19
4954 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2] offset:16
4955 ; CHECK-NEXT: flat_load_ubyte v19, v[1:2] offset:15
4956 ; CHECK-NEXT: flat_load_ubyte v20, v[1:2] offset:17
4957 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
4958 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
4959 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 8, v7
4960 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
4961 ; CHECK-NEXT: v_lshl_or_b32 v9, v8, 8, v9
4962 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
4963 ; CHECK-NEXT: v_lshl_or_b32 v10, v10, 8, v11
4964 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
4965 ; CHECK-NEXT: v_lshl_or_b32 v12, v12, 8, v13
4966 ; CHECK-NEXT: v_lshl_or_b32 v7, v6, 16, v9
4967 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
4968 ; CHECK-NEXT: v_lshl_or_b32 v13, v14, 8, v15
4969 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
4970 ; CHECK-NEXT: v_lshl_or_b32 v11, v16, 8, v17
4971 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 16, v12
4972 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
4973 ; CHECK-NEXT: v_lshl_or_b32 v14, v18, 8, v19
4974 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
4975 ; CHECK-NEXT: v_lshl_or_b32 v5, v5, 8, v20
4976 ; CHECK-NEXT: v_lshl_or_b32 v6, v13, 16, v11
4977 ; CHECK-NEXT: v_lshl_or_b32 v5, v5, 16, v14
4978 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4979 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
4980 ; CHECK-NEXT: ds_write_b128 v0, v[5:8] offset:15
4981 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
4982 ; CHECK-NEXT: s_setpc_b64 s[30:31]
4984 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 31, i1 false)
4988 define void @memcpy_p3_p0_sz32_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
4989 ; CHECK-LABEL: memcpy_p3_p0_sz32_align_8_8:
4990 ; CHECK: ; %bb.0: ; %entry
4991 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4992 ; CHECK-NEXT: s_clause 0x1
4993 ; CHECK-NEXT: flat_load_dwordx4 v[3:6], v[1:2] offset:16
4994 ; CHECK-NEXT: flat_load_dwordx4 v[7:10], v[1:2]
4995 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
4996 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset0:2 offset1:3
4997 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(1)
4998 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset1:1
4999 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5000 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5002 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 32, i1 false)
5006 define void @memcpy_p3_p0_sz16_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
5007 ; CHECK-LABEL: memcpy_p3_p0_sz16_align_16_16:
5008 ; CHECK: ; %bb.0: ; %entry
5009 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5010 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
5011 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5012 ; CHECK-NEXT: ds_write_b128 v0, v[1:4]
5013 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5014 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5016 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 16, i1 false)
5020 define void @memcpy_p3_p0_sz31_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
5021 ; CHECK-LABEL: memcpy_p3_p0_sz31_align_16_16:
5022 ; CHECK: ; %bb.0: ; %entry
5023 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5024 ; CHECK-NEXT: s_clause 0x10
5025 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:18
5026 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:26
5027 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:25
5028 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:24
5029 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:23
5030 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:30
5031 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:29
5032 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:28
5033 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:27
5034 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:22
5035 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:21
5036 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:20
5037 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:19
5038 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2] offset:16
5039 ; CHECK-NEXT: flat_load_ubyte v19, v[1:2] offset:15
5040 ; CHECK-NEXT: flat_load_ubyte v20, v[1:2] offset:17
5041 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
5042 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
5043 ; CHECK-NEXT: v_lshl_or_b32 v6, v6, 8, v7
5044 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
5045 ; CHECK-NEXT: v_lshl_or_b32 v9, v8, 8, v9
5046 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
5047 ; CHECK-NEXT: v_lshl_or_b32 v10, v10, 8, v11
5048 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
5049 ; CHECK-NEXT: v_lshl_or_b32 v12, v12, 8, v13
5050 ; CHECK-NEXT: v_lshl_or_b32 v7, v6, 16, v9
5051 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
5052 ; CHECK-NEXT: v_lshl_or_b32 v13, v14, 8, v15
5053 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
5054 ; CHECK-NEXT: v_lshl_or_b32 v11, v16, 8, v17
5055 ; CHECK-NEXT: v_lshl_or_b32 v8, v10, 16, v12
5056 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
5057 ; CHECK-NEXT: v_lshl_or_b32 v14, v18, 8, v19
5058 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
5059 ; CHECK-NEXT: v_lshl_or_b32 v5, v5, 8, v20
5060 ; CHECK-NEXT: v_lshl_or_b32 v6, v13, 16, v11
5061 ; CHECK-NEXT: v_lshl_or_b32 v5, v5, 16, v14
5062 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5063 ; CHECK-NEXT: ds_write_b128 v0, v[1:4]
5064 ; CHECK-NEXT: ds_write_b128 v0, v[5:8] offset:15
5065 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5066 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5068 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 31, i1 false)
5072 define void @memcpy_p3_p0_sz32_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
5073 ; CHECK-LABEL: memcpy_p3_p0_sz32_align_16_16:
5074 ; CHECK: ; %bb.0: ; %entry
5075 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5076 ; CHECK-NEXT: s_clause 0x1
5077 ; CHECK-NEXT: flat_load_dwordx4 v[3:6], v[1:2] offset:16
5078 ; CHECK-NEXT: flat_load_dwordx4 v[7:10], v[1:2]
5079 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
5080 ; CHECK-NEXT: ds_write_b128 v0, v[3:6] offset:16
5081 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(1)
5082 ; CHECK-NEXT: ds_write_b128 v0, v[7:10]
5083 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5084 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5086 tail call void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 32, i1 false)
5090 define void @memcpy_p3_p1_sz16_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
5091 ; CHECK-LABEL: memcpy_p3_p1_sz16_align_1_1:
5092 ; CHECK: ; %bb.0: ; %entry
5093 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5094 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5095 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5096 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5097 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5098 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5100 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 16, i1 false)
5104 define void @memcpy_p3_p1_sz31_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
5105 ; CHECK-LABEL: memcpy_p3_p1_sz31_align_1_1:
5106 ; CHECK: ; %bb.0: ; %entry
5107 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5108 ; CHECK-NEXT: s_clause 0x2
5109 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5110 ; CHECK-NEXT: global_load_dwordx2 v[7:8], v[1:2], off offset:16
5111 ; CHECK-NEXT: global_load_dwordx2 v[1:2], v[1:2], off offset:23
5112 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5113 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5114 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5115 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:16
5116 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5117 ; CHECK-NEXT: ds_write_b64 v0, v[1:2] offset:23
5118 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5119 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5121 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 31, i1 false)
5125 define void @memcpy_p3_p1_sz32_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
5126 ; CHECK-LABEL: memcpy_p3_p1_sz32_align_1_1:
5127 ; CHECK: ; %bb.0: ; %entry
5128 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5129 ; CHECK-NEXT: s_clause 0x1
5130 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5131 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5132 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5133 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5134 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5135 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset0:2 offset1:3
5136 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5137 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5139 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 32, i1 false)
5143 define void @memcpy_p3_p1_sz16_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
5144 ; CHECK-LABEL: memcpy_p3_p1_sz16_align_2_2:
5145 ; CHECK: ; %bb.0: ; %entry
5146 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5147 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5148 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5149 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5150 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5151 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5153 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 16, i1 false)
5157 define void @memcpy_p3_p1_sz31_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
5158 ; CHECK-LABEL: memcpy_p3_p1_sz31_align_2_2:
5159 ; CHECK: ; %bb.0: ; %entry
5160 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5161 ; CHECK-NEXT: s_clause 0x2
5162 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5163 ; CHECK-NEXT: global_load_dwordx2 v[7:8], v[1:2], off offset:16
5164 ; CHECK-NEXT: global_load_dwordx2 v[1:2], v[1:2], off offset:23
5165 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5166 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5167 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5168 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:16
5169 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5170 ; CHECK-NEXT: ds_write_b64 v0, v[1:2] offset:23
5171 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5172 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5174 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 31, i1 false)
5178 define void @memcpy_p3_p1_sz32_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
5179 ; CHECK-LABEL: memcpy_p3_p1_sz32_align_2_2:
5180 ; CHECK: ; %bb.0: ; %entry
5181 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5182 ; CHECK-NEXT: s_clause 0x1
5183 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5184 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5185 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5186 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5187 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5188 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset0:2 offset1:3
5189 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5190 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5192 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 32, i1 false)
5196 define void @memcpy_p3_p1_sz16_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
5197 ; CHECK-LABEL: memcpy_p3_p1_sz16_align_8_8:
5198 ; CHECK: ; %bb.0: ; %entry
5199 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5200 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5201 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5202 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5203 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5204 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5206 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 16, i1 false)
5210 define void @memcpy_p3_p1_sz31_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
5211 ; CHECK-LABEL: memcpy_p3_p1_sz31_align_8_8:
5212 ; CHECK: ; %bb.0: ; %entry
5213 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5214 ; CHECK-NEXT: s_clause 0x1
5215 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5216 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
5217 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5218 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5219 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5220 ; CHECK-NEXT: ds_write_b128 v0, v[7:10] offset:15
5221 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5222 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5224 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 31, i1 false)
5228 define void @memcpy_p3_p1_sz32_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
5229 ; CHECK-LABEL: memcpy_p3_p1_sz32_align_8_8:
5230 ; CHECK: ; %bb.0: ; %entry
5231 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5232 ; CHECK-NEXT: s_clause 0x1
5233 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5234 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5235 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5236 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5237 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5238 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset0:2 offset1:3
5239 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5240 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5242 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 32, i1 false)
5246 define void @memcpy_p3_p1_sz16_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
5247 ; CHECK-LABEL: memcpy_p3_p1_sz16_align_16_16:
5248 ; CHECK: ; %bb.0: ; %entry
5249 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5250 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5251 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5252 ; CHECK-NEXT: ds_write_b128 v0, v[1:4]
5253 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5254 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5256 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 16, i1 false)
5260 define void @memcpy_p3_p1_sz31_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
5261 ; CHECK-LABEL: memcpy_p3_p1_sz31_align_16_16:
5262 ; CHECK: ; %bb.0: ; %entry
5263 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5264 ; CHECK-NEXT: s_clause 0x1
5265 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5266 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
5267 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5268 ; CHECK-NEXT: ds_write_b128 v0, v[3:6]
5269 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5270 ; CHECK-NEXT: ds_write_b128 v0, v[7:10] offset:15
5271 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5272 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5274 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 31, i1 false)
5278 define void @memcpy_p3_p1_sz32_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
5279 ; CHECK-LABEL: memcpy_p3_p1_sz32_align_16_16:
5280 ; CHECK: ; %bb.0: ; %entry
5281 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5282 ; CHECK-NEXT: s_clause 0x1
5283 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5284 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5285 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5286 ; CHECK-NEXT: ds_write_b128 v0, v[3:6]
5287 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5288 ; CHECK-NEXT: ds_write_b128 v0, v[7:10] offset:16
5289 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5290 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5292 tail call void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 32, i1 false)
5296 define void @memcpy_p3_p3_sz16_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
5297 ; CHECK-LABEL: memcpy_p3_p3_sz16_align_1_1:
5298 ; CHECK: ; %bb.0: ; %entry
5299 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5300 ; CHECK-NEXT: ds_read2_b64 v[1:4], v1 offset1:1
5301 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5302 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5303 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5304 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5306 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 16, i1 false)
5310 define void @memcpy_p3_p3_sz31_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
5311 ; CHECK-LABEL: memcpy_p3_p3_sz31_align_1_1:
5312 ; CHECK: ; %bb.0: ; %entry
5313 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5314 ; CHECK-NEXT: ds_read_b64 v[5:6], v1 offset:23
5315 ; CHECK-NEXT: ds_read_b64 v[7:8], v1 offset:16
5316 ; CHECK-NEXT: ds_read2_b64 v[1:4], v1 offset1:1
5317 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
5318 ; CHECK-NEXT: ds_write_b64 v0, v[5:6] offset:23
5319 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
5320 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:16
5321 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
5322 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5323 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5324 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5326 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 31, i1 false)
5330 define void @memcpy_p3_p3_sz32_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
5331 ; CHECK-LABEL: memcpy_p3_p3_sz32_align_1_1:
5332 ; CHECK: ; %bb.0: ; %entry
5333 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5334 ; CHECK-NEXT: ds_read2_b64 v[2:5], v1 offset0:2 offset1:3
5335 ; CHECK-NEXT: ds_read2_b64 v[6:9], v1 offset1:1
5336 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5337 ; CHECK-NEXT: ds_write2_b64 v0, v[2:3], v[4:5] offset0:2 offset1:3
5338 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5339 ; CHECK-NEXT: ds_write2_b64 v0, v[6:7], v[8:9] offset1:1
5340 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5341 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5343 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 32, i1 false)
5347 define void @memcpy_p3_p3_sz16_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
5348 ; CHECK-LABEL: memcpy_p3_p3_sz16_align_2_2:
5349 ; CHECK: ; %bb.0: ; %entry
5350 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5351 ; CHECK-NEXT: ds_read2_b64 v[1:4], v1 offset1:1
5352 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5353 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5354 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5355 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5357 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 16, i1 false)
5361 define void @memcpy_p3_p3_sz31_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
5362 ; CHECK-LABEL: memcpy_p3_p3_sz31_align_2_2:
5363 ; CHECK: ; %bb.0: ; %entry
5364 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5365 ; CHECK-NEXT: ds_read_b64 v[5:6], v1 offset:23
5366 ; CHECK-NEXT: ds_read_b64 v[7:8], v1 offset:16
5367 ; CHECK-NEXT: ds_read2_b64 v[1:4], v1 offset1:1
5368 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
5369 ; CHECK-NEXT: ds_write_b64 v0, v[5:6] offset:23
5370 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
5371 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:16
5372 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
5373 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5374 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5375 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5377 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 31, i1 false)
5381 define void @memcpy_p3_p3_sz32_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
5382 ; CHECK-LABEL: memcpy_p3_p3_sz32_align_2_2:
5383 ; CHECK: ; %bb.0: ; %entry
5384 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5385 ; CHECK-NEXT: ds_read2_b64 v[2:5], v1 offset0:2 offset1:3
5386 ; CHECK-NEXT: ds_read2_b64 v[6:9], v1 offset1:1
5387 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5388 ; CHECK-NEXT: ds_write2_b64 v0, v[2:3], v[4:5] offset0:2 offset1:3
5389 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5390 ; CHECK-NEXT: ds_write2_b64 v0, v[6:7], v[8:9] offset1:1
5391 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5392 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5394 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 32, i1 false)
5398 define void @memcpy_p3_p3_sz16_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
5399 ; CHECK-LABEL: memcpy_p3_p3_sz16_align_8_8:
5400 ; CHECK: ; %bb.0: ; %entry
5401 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5402 ; CHECK-NEXT: ds_read2_b64 v[1:4], v1 offset1:1
5403 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5404 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5405 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5406 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5408 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 16, i1 false)
5412 define void @memcpy_p3_p3_sz31_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
5413 ; CHECK-LABEL: memcpy_p3_p3_sz31_align_8_8:
5414 ; CHECK: ; %bb.0: ; %entry
5415 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5416 ; CHECK-NEXT: ds_read2_b64 v[2:5], v1 offset1:1
5417 ; CHECK-NEXT: ds_read_b128 v[6:9], v1 offset:15
5418 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5419 ; CHECK-NEXT: ds_write2_b64 v0, v[2:3], v[4:5] offset1:1
5420 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5421 ; CHECK-NEXT: ds_write_b128 v0, v[6:9] offset:15
5422 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5423 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5425 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 31, i1 false)
5429 define void @memcpy_p3_p3_sz32_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
5430 ; CHECK-LABEL: memcpy_p3_p3_sz32_align_8_8:
5431 ; CHECK: ; %bb.0: ; %entry
5432 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5433 ; CHECK-NEXT: ds_read2_b64 v[2:5], v1 offset0:2 offset1:3
5434 ; CHECK-NEXT: ds_read2_b64 v[6:9], v1 offset1:1
5435 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5436 ; CHECK-NEXT: ds_write2_b64 v0, v[2:3], v[4:5] offset0:2 offset1:3
5437 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5438 ; CHECK-NEXT: ds_write2_b64 v0, v[6:7], v[8:9] offset1:1
5439 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5440 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5442 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 32, i1 false)
5446 define void @memcpy_p3_p3_sz16_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
5447 ; CHECK-LABEL: memcpy_p3_p3_sz16_align_16_16:
5448 ; CHECK: ; %bb.0: ; %entry
5449 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5450 ; CHECK-NEXT: ds_read_b128 v[1:4], v1
5451 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5452 ; CHECK-NEXT: ds_write_b128 v0, v[1:4]
5453 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5454 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5456 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 16, i1 false)
5460 define void @memcpy_p3_p3_sz31_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
5461 ; CHECK-LABEL: memcpy_p3_p3_sz31_align_16_16:
5462 ; CHECK: ; %bb.0: ; %entry
5463 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5464 ; CHECK-NEXT: ds_read_b128 v[2:5], v1 offset:15
5465 ; CHECK-NEXT: ds_read_b128 v[6:9], v1
5466 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5467 ; CHECK-NEXT: ds_write_b128 v0, v[2:5] offset:15
5468 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5469 ; CHECK-NEXT: ds_write_b128 v0, v[6:9]
5470 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5471 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5473 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 31, i1 false)
5477 define void @memcpy_p3_p3_sz32_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
5478 ; CHECK-LABEL: memcpy_p3_p3_sz32_align_16_16:
5479 ; CHECK: ; %bb.0: ; %entry
5480 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5481 ; CHECK-NEXT: ds_read_b128 v[2:5], v1 offset:16
5482 ; CHECK-NEXT: ds_read_b128 v[6:9], v1
5483 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5484 ; CHECK-NEXT: ds_write_b128 v0, v[2:5] offset:16
5485 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
5486 ; CHECK-NEXT: ds_write_b128 v0, v[6:9]
5487 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5488 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5490 tail call void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 32, i1 false)
5494 define void @memcpy_p3_p4_sz16_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
5495 ; CHECK-LABEL: memcpy_p3_p4_sz16_align_1_1:
5496 ; CHECK: ; %bb.0: ; %entry
5497 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5498 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5499 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5500 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5501 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5502 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5504 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 16, i1 false)
5508 define void @memcpy_p3_p4_sz31_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
5509 ; CHECK-LABEL: memcpy_p3_p4_sz31_align_1_1:
5510 ; CHECK: ; %bb.0: ; %entry
5511 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5512 ; CHECK-NEXT: s_clause 0x2
5513 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5514 ; CHECK-NEXT: global_load_dwordx2 v[7:8], v[1:2], off offset:16
5515 ; CHECK-NEXT: global_load_dwordx2 v[1:2], v[1:2], off offset:23
5516 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5517 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5518 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5519 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:16
5520 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5521 ; CHECK-NEXT: ds_write_b64 v0, v[1:2] offset:23
5522 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5523 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5525 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 31, i1 false)
5529 define void @memcpy_p3_p4_sz32_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
5530 ; CHECK-LABEL: memcpy_p3_p4_sz32_align_1_1:
5531 ; CHECK: ; %bb.0: ; %entry
5532 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5533 ; CHECK-NEXT: s_clause 0x1
5534 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5535 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5536 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5537 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5538 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5539 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset0:2 offset1:3
5540 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5541 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5543 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 32, i1 false)
5547 define void @memcpy_p3_p4_sz16_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
5548 ; CHECK-LABEL: memcpy_p3_p4_sz16_align_2_2:
5549 ; CHECK: ; %bb.0: ; %entry
5550 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5551 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5552 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5553 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5554 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5555 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5557 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 16, i1 false)
5561 define void @memcpy_p3_p4_sz31_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
5562 ; CHECK-LABEL: memcpy_p3_p4_sz31_align_2_2:
5563 ; CHECK: ; %bb.0: ; %entry
5564 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5565 ; CHECK-NEXT: s_clause 0x2
5566 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5567 ; CHECK-NEXT: global_load_dwordx2 v[7:8], v[1:2], off offset:16
5568 ; CHECK-NEXT: global_load_dwordx2 v[1:2], v[1:2], off offset:23
5569 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5570 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5571 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5572 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:16
5573 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5574 ; CHECK-NEXT: ds_write_b64 v0, v[1:2] offset:23
5575 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5576 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5578 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 31, i1 false)
5582 define void @memcpy_p3_p4_sz32_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
5583 ; CHECK-LABEL: memcpy_p3_p4_sz32_align_2_2:
5584 ; CHECK: ; %bb.0: ; %entry
5585 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5586 ; CHECK-NEXT: s_clause 0x1
5587 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5588 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5589 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5590 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5591 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5592 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset0:2 offset1:3
5593 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5594 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5596 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 32, i1 false)
5600 define void @memcpy_p3_p4_sz16_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
5601 ; CHECK-LABEL: memcpy_p3_p4_sz16_align_8_8:
5602 ; CHECK: ; %bb.0: ; %entry
5603 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5604 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5605 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5606 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5607 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5608 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5610 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 16, i1 false)
5614 define void @memcpy_p3_p4_sz31_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
5615 ; CHECK-LABEL: memcpy_p3_p4_sz31_align_8_8:
5616 ; CHECK: ; %bb.0: ; %entry
5617 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5618 ; CHECK-NEXT: s_clause 0x1
5619 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5620 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
5621 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5622 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5623 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5624 ; CHECK-NEXT: ds_write_b128 v0, v[7:10] offset:15
5625 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5626 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5628 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 31, i1 false)
5632 define void @memcpy_p3_p4_sz32_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
5633 ; CHECK-LABEL: memcpy_p3_p4_sz32_align_8_8:
5634 ; CHECK: ; %bb.0: ; %entry
5635 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5636 ; CHECK-NEXT: s_clause 0x1
5637 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5638 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5639 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5640 ; CHECK-NEXT: ds_write2_b64 v0, v[3:4], v[5:6] offset1:1
5641 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5642 ; CHECK-NEXT: ds_write2_b64 v0, v[7:8], v[9:10] offset0:2 offset1:3
5643 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5644 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5646 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 32, i1 false)
5650 define void @memcpy_p3_p4_sz16_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
5651 ; CHECK-LABEL: memcpy_p3_p4_sz16_align_16_16:
5652 ; CHECK: ; %bb.0: ; %entry
5653 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5654 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
5655 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5656 ; CHECK-NEXT: ds_write_b128 v0, v[1:4]
5657 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5658 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5660 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 16, i1 false)
5664 define void @memcpy_p3_p4_sz31_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
5665 ; CHECK-LABEL: memcpy_p3_p4_sz31_align_16_16:
5666 ; CHECK: ; %bb.0: ; %entry
5667 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5668 ; CHECK-NEXT: s_clause 0x1
5669 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5670 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
5671 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5672 ; CHECK-NEXT: ds_write_b128 v0, v[3:6]
5673 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5674 ; CHECK-NEXT: ds_write_b128 v0, v[7:10] offset:15
5675 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5676 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5678 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 31, i1 false)
5682 define void @memcpy_p3_p4_sz32_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
5683 ; CHECK-LABEL: memcpy_p3_p4_sz32_align_16_16:
5684 ; CHECK: ; %bb.0: ; %entry
5685 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5686 ; CHECK-NEXT: s_clause 0x1
5687 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
5688 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
5689 ; CHECK-NEXT: s_waitcnt vmcnt(1)
5690 ; CHECK-NEXT: ds_write_b128 v0, v[3:6]
5691 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5692 ; CHECK-NEXT: ds_write_b128 v0, v[7:10] offset:16
5693 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5694 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5696 tail call void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 32, i1 false)
5700 define void @memcpy_p3_p5_sz16_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
5701 ; CHECK-LABEL: memcpy_p3_p5_sz16_align_1_1:
5702 ; CHECK: ; %bb.0: ; %entry
5703 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5704 ; CHECK-NEXT: s_clause 0xf
5705 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen
5706 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:1
5707 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:2
5708 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:3
5709 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:4
5710 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:5
5711 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:6
5712 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:7
5713 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:12
5714 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:13
5715 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:14
5716 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:15
5717 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:8
5718 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:9
5719 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:10
5720 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:11
5721 ; CHECK-NEXT: s_waitcnt vmcnt(14)
5722 ; CHECK-NEXT: v_lshl_or_b32 v3, v3, 8, v2
5723 ; CHECK-NEXT: s_waitcnt vmcnt(12)
5724 ; CHECK-NEXT: v_lshl_or_b32 v4, v5, 8, v4
5725 ; CHECK-NEXT: s_waitcnt vmcnt(10)
5726 ; CHECK-NEXT: v_lshl_or_b32 v6, v7, 8, v6
5727 ; CHECK-NEXT: s_waitcnt vmcnt(8)
5728 ; CHECK-NEXT: v_lshl_or_b32 v7, v9, 8, v8
5729 ; CHECK-NEXT: s_waitcnt vmcnt(6)
5730 ; CHECK-NEXT: v_lshl_or_b32 v5, v11, 8, v10
5731 ; CHECK-NEXT: s_waitcnt vmcnt(4)
5732 ; CHECK-NEXT: v_lshl_or_b32 v8, v13, 8, v12
5733 ; CHECK-NEXT: v_lshl_or_b32 v2, v7, 16, v6
5734 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5735 ; CHECK-NEXT: v_lshl_or_b32 v9, v15, 8, v14
5736 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5737 ; CHECK-NEXT: v_lshl_or_b32 v10, v1, 8, v16
5738 ; CHECK-NEXT: v_lshl_or_b32 v1, v4, 16, v3
5739 ; CHECK-NEXT: v_lshl_or_b32 v4, v8, 16, v5
5740 ; CHECK-NEXT: v_lshl_or_b32 v3, v10, 16, v9
5741 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5742 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5743 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5745 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 16, i1 false)
5749 define void @memcpy_p3_p5_sz31_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
5750 ; CHECK-LABEL: memcpy_p3_p5_sz31_align_1_1:
5751 ; CHECK: ; %bb.0: ; %entry
5752 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5753 ; CHECK-NEXT: s_clause 0x1e
5754 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen
5755 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:1
5756 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:2
5757 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:3
5758 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:4
5759 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:5
5760 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:6
5761 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:7
5762 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:8
5763 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:9
5764 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:10
5765 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:11
5766 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:12
5767 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:13
5768 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:14
5769 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen offset:15
5770 ; CHECK-NEXT: buffer_load_ubyte v18, v1, s[0:3], 0 offen offset:21
5771 ; CHECK-NEXT: buffer_load_ubyte v19, v1, s[0:3], 0 offen offset:22
5772 ; CHECK-NEXT: buffer_load_ubyte v20, v1, s[0:3], 0 offen offset:23
5773 ; CHECK-NEXT: buffer_load_ubyte v21, v1, s[0:3], 0 offen offset:16
5774 ; CHECK-NEXT: buffer_load_ubyte v22, v1, s[0:3], 0 offen offset:17
5775 ; CHECK-NEXT: buffer_load_ubyte v23, v1, s[0:3], 0 offen offset:18
5776 ; CHECK-NEXT: buffer_load_ubyte v24, v1, s[0:3], 0 offen offset:20
5777 ; CHECK-NEXT: buffer_load_ubyte v25, v1, s[0:3], 0 offen offset:19
5778 ; CHECK-NEXT: buffer_load_ubyte v26, v1, s[0:3], 0 offen offset:27
5779 ; CHECK-NEXT: buffer_load_ubyte v27, v1, s[0:3], 0 offen offset:28
5780 ; CHECK-NEXT: buffer_load_ubyte v28, v1, s[0:3], 0 offen offset:29
5781 ; CHECK-NEXT: buffer_load_ubyte v29, v1, s[0:3], 0 offen offset:30
5782 ; CHECK-NEXT: buffer_load_ubyte v30, v1, s[0:3], 0 offen offset:24
5783 ; CHECK-NEXT: buffer_load_ubyte v31, v1, s[0:3], 0 offen offset:25
5784 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:26
5785 ; CHECK-NEXT: s_waitcnt vmcnt(29)
5786 ; CHECK-NEXT: v_lshl_or_b32 v3, v3, 8, v2
5787 ; CHECK-NEXT: s_waitcnt vmcnt(27)
5788 ; CHECK-NEXT: v_lshl_or_b32 v4, v5, 8, v4
5789 ; CHECK-NEXT: s_waitcnt vmcnt(25)
5790 ; CHECK-NEXT: v_lshl_or_b32 v6, v7, 8, v6
5791 ; CHECK-NEXT: s_waitcnt vmcnt(23)
5792 ; CHECK-NEXT: v_lshl_or_b32 v7, v9, 8, v8
5793 ; CHECK-NEXT: s_waitcnt vmcnt(21)
5794 ; CHECK-NEXT: v_lshl_or_b32 v9, v11, 8, v10
5795 ; CHECK-NEXT: s_waitcnt vmcnt(19)
5796 ; CHECK-NEXT: v_lshl_or_b32 v10, v13, 8, v12
5797 ; CHECK-NEXT: v_lshl_or_b32 v2, v7, 16, v6
5798 ; CHECK-NEXT: s_waitcnt vmcnt(17)
5799 ; CHECK-NEXT: v_lshl_or_b32 v5, v15, 8, v14
5800 ; CHECK-NEXT: s_waitcnt vmcnt(15)
5801 ; CHECK-NEXT: v_lshl_or_b32 v8, v17, 8, v16
5802 ; CHECK-NEXT: s_waitcnt vmcnt(12)
5803 ; CHECK-NEXT: v_lshl_or_b32 v12, v20, 8, v19
5804 ; CHECK-NEXT: s_waitcnt vmcnt(10)
5805 ; CHECK-NEXT: v_lshl_or_b32 v14, v22, 8, v21
5806 ; CHECK-NEXT: s_waitcnt vmcnt(8)
5807 ; CHECK-NEXT: v_lshl_or_b32 v11, v18, 8, v24
5808 ; CHECK-NEXT: s_waitcnt vmcnt(7)
5809 ; CHECK-NEXT: v_lshl_or_b32 v13, v25, 8, v23
5810 ; CHECK-NEXT: s_waitcnt vmcnt(5)
5811 ; CHECK-NEXT: v_lshl_or_b32 v15, v27, 8, v26
5812 ; CHECK-NEXT: s_waitcnt vmcnt(3)
5813 ; CHECK-NEXT: v_lshl_or_b32 v16, v29, 8, v28
5814 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5815 ; CHECK-NEXT: v_lshl_or_b32 v17, v30, 8, v20
5816 ; CHECK-NEXT: v_lshl_or_b32 v6, v12, 16, v11
5817 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5818 ; CHECK-NEXT: v_lshl_or_b32 v18, v1, 8, v31
5819 ; CHECK-NEXT: v_lshl_or_b32 v1, v4, 16, v3
5820 ; CHECK-NEXT: v_lshl_or_b32 v4, v8, 16, v5
5821 ; CHECK-NEXT: v_lshl_or_b32 v3, v10, 16, v9
5822 ; CHECK-NEXT: v_lshl_or_b32 v5, v13, 16, v14
5823 ; CHECK-NEXT: v_lshl_or_b32 v8, v16, 16, v15
5824 ; CHECK-NEXT: v_lshl_or_b32 v7, v18, 16, v17
5825 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5826 ; CHECK-NEXT: ds_write_b64 v0, v[5:6] offset:16
5827 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:23
5828 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5829 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5831 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 31, i1 false)
5835 define void @memcpy_p3_p5_sz32_align_1_1(ptr addrspace(3) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
5836 ; CHECK-LABEL: memcpy_p3_p5_sz32_align_1_1:
5837 ; CHECK: ; %bb.0: ; %entry
5838 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5839 ; CHECK-NEXT: s_clause 0x1f
5840 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen
5841 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:1
5842 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:2
5843 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:3
5844 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:4
5845 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:5
5846 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:6
5847 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:7
5848 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:8
5849 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:9
5850 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:10
5851 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:11
5852 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:12
5853 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:13
5854 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:14
5855 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen offset:15
5856 ; CHECK-NEXT: buffer_load_ubyte v18, v1, s[0:3], 0 offen offset:21
5857 ; CHECK-NEXT: buffer_load_ubyte v19, v1, s[0:3], 0 offen offset:22
5858 ; CHECK-NEXT: buffer_load_ubyte v20, v1, s[0:3], 0 offen offset:23
5859 ; CHECK-NEXT: buffer_load_ubyte v21, v1, s[0:3], 0 offen offset:16
5860 ; CHECK-NEXT: buffer_load_ubyte v22, v1, s[0:3], 0 offen offset:17
5861 ; CHECK-NEXT: buffer_load_ubyte v23, v1, s[0:3], 0 offen offset:18
5862 ; CHECK-NEXT: buffer_load_ubyte v24, v1, s[0:3], 0 offen offset:20
5863 ; CHECK-NEXT: buffer_load_ubyte v25, v1, s[0:3], 0 offen offset:19
5864 ; CHECK-NEXT: buffer_load_ubyte v26, v1, s[0:3], 0 offen offset:28
5865 ; CHECK-NEXT: buffer_load_ubyte v27, v1, s[0:3], 0 offen offset:29
5866 ; CHECK-NEXT: buffer_load_ubyte v28, v1, s[0:3], 0 offen offset:30
5867 ; CHECK-NEXT: buffer_load_ubyte v29, v1, s[0:3], 0 offen offset:31
5868 ; CHECK-NEXT: buffer_load_ubyte v30, v1, s[0:3], 0 offen offset:24
5869 ; CHECK-NEXT: buffer_load_ubyte v31, v1, s[0:3], 0 offen offset:25
5870 ; CHECK-NEXT: buffer_load_ubyte v32, v1, s[0:3], 0 offen offset:26
5871 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:27
5872 ; CHECK-NEXT: s_waitcnt vmcnt(30)
5873 ; CHECK-NEXT: v_lshl_or_b32 v3, v3, 8, v2
5874 ; CHECK-NEXT: s_waitcnt vmcnt(28)
5875 ; CHECK-NEXT: v_lshl_or_b32 v4, v5, 8, v4
5876 ; CHECK-NEXT: s_waitcnt vmcnt(26)
5877 ; CHECK-NEXT: v_lshl_or_b32 v6, v7, 8, v6
5878 ; CHECK-NEXT: s_waitcnt vmcnt(24)
5879 ; CHECK-NEXT: v_lshl_or_b32 v7, v9, 8, v8
5880 ; CHECK-NEXT: s_waitcnt vmcnt(22)
5881 ; CHECK-NEXT: v_lshl_or_b32 v9, v11, 8, v10
5882 ; CHECK-NEXT: s_waitcnt vmcnt(20)
5883 ; CHECK-NEXT: v_lshl_or_b32 v10, v13, 8, v12
5884 ; CHECK-NEXT: v_lshl_or_b32 v2, v7, 16, v6
5885 ; CHECK-NEXT: s_waitcnt vmcnt(18)
5886 ; CHECK-NEXT: v_lshl_or_b32 v5, v15, 8, v14
5887 ; CHECK-NEXT: s_waitcnt vmcnt(16)
5888 ; CHECK-NEXT: v_lshl_or_b32 v8, v17, 8, v16
5889 ; CHECK-NEXT: s_waitcnt vmcnt(13)
5890 ; CHECK-NEXT: v_lshl_or_b32 v12, v20, 8, v19
5891 ; CHECK-NEXT: s_waitcnt vmcnt(11)
5892 ; CHECK-NEXT: v_lshl_or_b32 v14, v22, 8, v21
5893 ; CHECK-NEXT: s_waitcnt vmcnt(9)
5894 ; CHECK-NEXT: v_lshl_or_b32 v11, v18, 8, v24
5895 ; CHECK-NEXT: s_waitcnt vmcnt(8)
5896 ; CHECK-NEXT: v_lshl_or_b32 v13, v25, 8, v23
5897 ; CHECK-NEXT: s_waitcnt vmcnt(6)
5898 ; CHECK-NEXT: v_lshl_or_b32 v15, v27, 8, v26
5899 ; CHECK-NEXT: s_waitcnt vmcnt(4)
5900 ; CHECK-NEXT: v_lshl_or_b32 v16, v29, 8, v28
5901 ; CHECK-NEXT: v_lshl_or_b32 v6, v12, 16, v11
5902 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5903 ; CHECK-NEXT: v_lshl_or_b32 v17, v31, 8, v30
5904 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5905 ; CHECK-NEXT: v_lshl_or_b32 v18, v1, 8, v32
5906 ; CHECK-NEXT: v_lshl_or_b32 v1, v4, 16, v3
5907 ; CHECK-NEXT: v_lshl_or_b32 v4, v8, 16, v5
5908 ; CHECK-NEXT: v_lshl_or_b32 v3, v10, 16, v9
5909 ; CHECK-NEXT: v_lshl_or_b32 v5, v13, 16, v14
5910 ; CHECK-NEXT: v_lshl_or_b32 v8, v16, 16, v15
5911 ; CHECK-NEXT: v_lshl_or_b32 v7, v18, 16, v17
5912 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5913 ; CHECK-NEXT: ds_write2_b64 v0, v[5:6], v[7:8] offset0:2 offset1:3
5914 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5915 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5917 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 32, i1 false)
5921 define void @memcpy_p3_p5_sz16_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
5922 ; CHECK-LABEL: memcpy_p3_p5_sz16_align_2_2:
5923 ; CHECK: ; %bb.0: ; %entry
5924 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5925 ; CHECK-NEXT: s_clause 0x7
5926 ; CHECK-NEXT: buffer_load_ushort v3, v1, s[0:3], 0 offen
5927 ; CHECK-NEXT: buffer_load_ushort v4, v1, s[0:3], 0 offen offset:2
5928 ; CHECK-NEXT: buffer_load_ushort v2, v1, s[0:3], 0 offen offset:4
5929 ; CHECK-NEXT: buffer_load_ushort v5, v1, s[0:3], 0 offen offset:6
5930 ; CHECK-NEXT: buffer_load_ushort v6, v1, s[0:3], 0 offen offset:12
5931 ; CHECK-NEXT: buffer_load_ushort v7, v1, s[0:3], 0 offen offset:14
5932 ; CHECK-NEXT: buffer_load_ushort v8, v1, s[0:3], 0 offen offset:8
5933 ; CHECK-NEXT: buffer_load_ushort v9, v1, s[0:3], 0 offen offset:10
5934 ; CHECK-NEXT: s_waitcnt vmcnt(6)
5935 ; CHECK-NEXT: v_lshl_or_b32 v1, v4, 16, v3
5936 ; CHECK-NEXT: s_waitcnt vmcnt(4)
5937 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v2
5938 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5939 ; CHECK-NEXT: v_lshl_or_b32 v4, v7, 16, v6
5940 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5941 ; CHECK-NEXT: v_lshl_or_b32 v3, v9, 16, v8
5942 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5943 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
5944 ; CHECK-NEXT: s_setpc_b64 s[30:31]
5946 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 16, i1 false)
5950 define void @memcpy_p3_p5_sz31_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
5951 ; CHECK-LABEL: memcpy_p3_p5_sz31_align_2_2:
5952 ; CHECK: ; %bb.0: ; %entry
5953 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
5954 ; CHECK-NEXT: s_clause 0x13
5955 ; CHECK-NEXT: buffer_load_ushort v3, v1, s[0:3], 0 offen
5956 ; CHECK-NEXT: buffer_load_ushort v4, v1, s[0:3], 0 offen offset:2
5957 ; CHECK-NEXT: buffer_load_ushort v2, v1, s[0:3], 0 offen offset:4
5958 ; CHECK-NEXT: buffer_load_ushort v5, v1, s[0:3], 0 offen offset:6
5959 ; CHECK-NEXT: buffer_load_ushort v6, v1, s[0:3], 0 offen offset:8
5960 ; CHECK-NEXT: buffer_load_ushort v7, v1, s[0:3], 0 offen offset:10
5961 ; CHECK-NEXT: buffer_load_ushort v8, v1, s[0:3], 0 offen offset:12
5962 ; CHECK-NEXT: buffer_load_ushort v9, v1, s[0:3], 0 offen offset:14
5963 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:27
5964 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:28
5965 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:29
5966 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:30
5967 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:23
5968 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:24
5969 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:25
5970 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen offset:26
5971 ; CHECK-NEXT: buffer_load_ushort v18, v1, s[0:3], 0 offen offset:20
5972 ; CHECK-NEXT: buffer_load_ushort v19, v1, s[0:3], 0 offen offset:22
5973 ; CHECK-NEXT: buffer_load_ushort v20, v1, s[0:3], 0 offen offset:16
5974 ; CHECK-NEXT: buffer_load_ushort v21, v1, s[0:3], 0 offen offset:18
5975 ; CHECK-NEXT: s_waitcnt vmcnt(18)
5976 ; CHECK-NEXT: v_lshl_or_b32 v1, v4, 16, v3
5977 ; CHECK-NEXT: s_waitcnt vmcnt(16)
5978 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v2
5979 ; CHECK-NEXT: s_waitcnt vmcnt(14)
5980 ; CHECK-NEXT: v_lshl_or_b32 v3, v7, 16, v6
5981 ; CHECK-NEXT: s_waitcnt vmcnt(12)
5982 ; CHECK-NEXT: v_lshl_or_b32 v4, v9, 16, v8
5983 ; CHECK-NEXT: s_waitcnt vmcnt(10)
5984 ; CHECK-NEXT: v_lshl_or_b32 v9, v11, 8, v10
5985 ; CHECK-NEXT: s_waitcnt vmcnt(8)
5986 ; CHECK-NEXT: v_lshl_or_b32 v8, v13, 8, v12
5987 ; CHECK-NEXT: s_waitcnt vmcnt(6)
5988 ; CHECK-NEXT: v_lshl_or_b32 v10, v15, 8, v14
5989 ; CHECK-NEXT: s_waitcnt vmcnt(4)
5990 ; CHECK-NEXT: v_lshl_or_b32 v11, v17, 8, v16
5991 ; CHECK-NEXT: v_lshl_or_b32 v8, v8, 16, v9
5992 ; CHECK-NEXT: s_waitcnt vmcnt(2)
5993 ; CHECK-NEXT: v_lshl_or_b32 v6, v19, 16, v18
5994 ; CHECK-NEXT: s_waitcnt vmcnt(0)
5995 ; CHECK-NEXT: v_lshl_or_b32 v5, v21, 16, v20
5996 ; CHECK-NEXT: v_lshl_or_b32 v7, v11, 16, v10
5997 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
5998 ; CHECK-NEXT: ds_write_b64 v0, v[5:6] offset:16
5999 ; CHECK-NEXT: ds_write_b64 v0, v[7:8] offset:23
6000 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6001 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6003 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 31, i1 false)
6007 define void @memcpy_p3_p5_sz32_align_2_2(ptr addrspace(3) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
6008 ; CHECK-LABEL: memcpy_p3_p5_sz32_align_2_2:
6009 ; CHECK: ; %bb.0: ; %entry
6010 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6011 ; CHECK-NEXT: s_clause 0xf
6012 ; CHECK-NEXT: buffer_load_ushort v3, v1, s[0:3], 0 offen
6013 ; CHECK-NEXT: buffer_load_ushort v4, v1, s[0:3], 0 offen offset:2
6014 ; CHECK-NEXT: buffer_load_ushort v2, v1, s[0:3], 0 offen offset:4
6015 ; CHECK-NEXT: buffer_load_ushort v5, v1, s[0:3], 0 offen offset:6
6016 ; CHECK-NEXT: buffer_load_ushort v6, v1, s[0:3], 0 offen offset:8
6017 ; CHECK-NEXT: buffer_load_ushort v7, v1, s[0:3], 0 offen offset:10
6018 ; CHECK-NEXT: buffer_load_ushort v8, v1, s[0:3], 0 offen offset:12
6019 ; CHECK-NEXT: buffer_load_ushort v9, v1, s[0:3], 0 offen offset:14
6020 ; CHECK-NEXT: buffer_load_ushort v10, v1, s[0:3], 0 offen offset:16
6021 ; CHECK-NEXT: buffer_load_ushort v11, v1, s[0:3], 0 offen offset:18
6022 ; CHECK-NEXT: buffer_load_ushort v12, v1, s[0:3], 0 offen offset:20
6023 ; CHECK-NEXT: buffer_load_ushort v13, v1, s[0:3], 0 offen offset:22
6024 ; CHECK-NEXT: buffer_load_ushort v14, v1, s[0:3], 0 offen offset:28
6025 ; CHECK-NEXT: buffer_load_ushort v15, v1, s[0:3], 0 offen offset:30
6026 ; CHECK-NEXT: buffer_load_ushort v16, v1, s[0:3], 0 offen offset:24
6027 ; CHECK-NEXT: buffer_load_ushort v17, v1, s[0:3], 0 offen offset:26
6028 ; CHECK-NEXT: s_waitcnt vmcnt(14)
6029 ; CHECK-NEXT: v_lshl_or_b32 v1, v4, 16, v3
6030 ; CHECK-NEXT: s_waitcnt vmcnt(12)
6031 ; CHECK-NEXT: v_lshl_or_b32 v2, v5, 16, v2
6032 ; CHECK-NEXT: s_waitcnt vmcnt(10)
6033 ; CHECK-NEXT: v_lshl_or_b32 v3, v7, 16, v6
6034 ; CHECK-NEXT: s_waitcnt vmcnt(8)
6035 ; CHECK-NEXT: v_lshl_or_b32 v4, v9, 16, v8
6036 ; CHECK-NEXT: s_waitcnt vmcnt(6)
6037 ; CHECK-NEXT: v_lshl_or_b32 v5, v11, 16, v10
6038 ; CHECK-NEXT: s_waitcnt vmcnt(4)
6039 ; CHECK-NEXT: v_lshl_or_b32 v6, v13, 16, v12
6040 ; CHECK-NEXT: s_waitcnt vmcnt(2)
6041 ; CHECK-NEXT: v_lshl_or_b32 v8, v15, 16, v14
6042 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6043 ; CHECK-NEXT: v_lshl_or_b32 v7, v17, 16, v16
6044 ; CHECK-NEXT: ds_write2_b64 v0, v[1:2], v[3:4] offset1:1
6045 ; CHECK-NEXT: ds_write2_b64 v0, v[5:6], v[7:8] offset0:2 offset1:3
6046 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6047 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6049 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 32, i1 false)
6053 define void @memcpy_p3_p5_sz16_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
6054 ; CHECK-LABEL: memcpy_p3_p5_sz16_align_8_8:
6055 ; CHECK: ; %bb.0: ; %entry
6056 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6057 ; CHECK-NEXT: s_clause 0x3
6058 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
6059 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
6060 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
6061 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:12
6062 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6063 ; CHECK-NEXT: ds_write2_b64 v0, v[2:3], v[4:5] offset1:1
6064 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6065 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6067 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 16, i1 false)
6071 define void @memcpy_p3_p5_sz31_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
6072 ; CHECK-LABEL: memcpy_p3_p5_sz31_align_8_8:
6073 ; CHECK: ; %bb.0: ; %entry
6074 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6075 ; CHECK-NEXT: s_clause 0x13
6076 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:27
6077 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:28
6078 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:29
6079 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:30
6080 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:19
6081 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:20
6082 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:21
6083 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:22
6084 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:23
6085 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:24
6086 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:25
6087 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen offset:26
6088 ; CHECK-NEXT: buffer_load_ubyte v18, v1, s[0:3], 0 offen offset:15
6089 ; CHECK-NEXT: buffer_load_ubyte v19, v1, s[0:3], 0 offen offset:16
6090 ; CHECK-NEXT: buffer_load_ubyte v20, v1, s[0:3], 0 offen offset:17
6091 ; CHECK-NEXT: buffer_load_ubyte v21, v1, s[0:3], 0 offen offset:18
6092 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen
6093 ; CHECK-NEXT: buffer_load_dword v6, v1, s[0:3], 0 offen offset:4
6094 ; CHECK-NEXT: buffer_load_dword v7, v1, s[0:3], 0 offen offset:8
6095 ; CHECK-NEXT: buffer_load_dword v8, v1, s[0:3], 0 offen offset:12
6096 ; CHECK-NEXT: s_waitcnt vmcnt(18)
6097 ; CHECK-NEXT: v_lshl_or_b32 v2, v3, 8, v2
6098 ; CHECK-NEXT: s_waitcnt vmcnt(16)
6099 ; CHECK-NEXT: v_lshl_or_b32 v1, v9, 8, v4
6100 ; CHECK-NEXT: s_waitcnt vmcnt(14)
6101 ; CHECK-NEXT: v_lshl_or_b32 v10, v11, 8, v10
6102 ; CHECK-NEXT: s_waitcnt vmcnt(12)
6103 ; CHECK-NEXT: v_lshl_or_b32 v11, v13, 8, v12
6104 ; CHECK-NEXT: v_lshl_or_b32 v4, v1, 16, v2
6105 ; CHECK-NEXT: s_waitcnt vmcnt(10)
6106 ; CHECK-NEXT: v_lshl_or_b32 v3, v15, 8, v14
6107 ; CHECK-NEXT: s_waitcnt vmcnt(8)
6108 ; CHECK-NEXT: v_lshl_or_b32 v9, v17, 8, v16
6109 ; CHECK-NEXT: v_lshl_or_b32 v2, v11, 16, v10
6110 ; CHECK-NEXT: s_waitcnt vmcnt(6)
6111 ; CHECK-NEXT: v_lshl_or_b32 v12, v19, 8, v18
6112 ; CHECK-NEXT: s_waitcnt vmcnt(4)
6113 ; CHECK-NEXT: v_lshl_or_b32 v13, v21, 8, v20
6114 ; CHECK-NEXT: v_lshl_or_b32 v3, v9, 16, v3
6115 ; CHECK-NEXT: v_lshl_or_b32 v1, v13, 16, v12
6116 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6117 ; CHECK-NEXT: ds_write2_b64 v0, v[5:6], v[7:8] offset1:1
6118 ; CHECK-NEXT: ds_write_b128 v0, v[1:4] offset:15
6119 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6120 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6122 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 31, i1 false)
6126 define void @memcpy_p3_p5_sz32_align_8_8(ptr addrspace(3) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
6127 ; CHECK-LABEL: memcpy_p3_p5_sz32_align_8_8:
6128 ; CHECK: ; %bb.0: ; %entry
6129 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6130 ; CHECK-NEXT: s_clause 0x7
6131 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
6132 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
6133 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
6134 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:12
6135 ; CHECK-NEXT: buffer_load_dword v6, v1, s[0:3], 0 offen offset:16
6136 ; CHECK-NEXT: buffer_load_dword v7, v1, s[0:3], 0 offen offset:20
6137 ; CHECK-NEXT: buffer_load_dword v8, v1, s[0:3], 0 offen offset:24
6138 ; CHECK-NEXT: buffer_load_dword v9, v1, s[0:3], 0 offen offset:28
6139 ; CHECK-NEXT: s_waitcnt vmcnt(4)
6140 ; CHECK-NEXT: ds_write2_b64 v0, v[2:3], v[4:5] offset1:1
6141 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6142 ; CHECK-NEXT: ds_write2_b64 v0, v[6:7], v[8:9] offset0:2 offset1:3
6143 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6144 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6146 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 32, i1 false)
6150 define void @memcpy_p3_p5_sz16_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
6151 ; CHECK-LABEL: memcpy_p3_p5_sz16_align_16_16:
6152 ; CHECK: ; %bb.0: ; %entry
6153 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6154 ; CHECK-NEXT: s_clause 0x3
6155 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
6156 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
6157 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
6158 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:12
6159 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6160 ; CHECK-NEXT: ds_write_b128 v0, v[2:5]
6161 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6162 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6164 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 16, i1 false)
6168 define void @memcpy_p3_p5_sz31_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
6169 ; CHECK-LABEL: memcpy_p3_p5_sz31_align_16_16:
6170 ; CHECK: ; %bb.0: ; %entry
6171 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6172 ; CHECK-NEXT: s_clause 0x13
6173 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:27
6174 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:28
6175 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:29
6176 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:30
6177 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:19
6178 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:20
6179 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:21
6180 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:22
6181 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:23
6182 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:24
6183 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:25
6184 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen offset:26
6185 ; CHECK-NEXT: buffer_load_ubyte v18, v1, s[0:3], 0 offen offset:15
6186 ; CHECK-NEXT: buffer_load_ubyte v19, v1, s[0:3], 0 offen offset:16
6187 ; CHECK-NEXT: buffer_load_ubyte v20, v1, s[0:3], 0 offen offset:17
6188 ; CHECK-NEXT: buffer_load_ubyte v21, v1, s[0:3], 0 offen offset:18
6189 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
6190 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
6191 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
6192 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:12
6193 ; CHECK-NEXT: s_waitcnt vmcnt(18)
6194 ; CHECK-NEXT: v_lshl_or_b32 v6, v7, 8, v6
6195 ; CHECK-NEXT: s_waitcnt vmcnt(16)
6196 ; CHECK-NEXT: v_lshl_or_b32 v1, v9, 8, v8
6197 ; CHECK-NEXT: s_waitcnt vmcnt(14)
6198 ; CHECK-NEXT: v_lshl_or_b32 v10, v11, 8, v10
6199 ; CHECK-NEXT: s_waitcnt vmcnt(12)
6200 ; CHECK-NEXT: v_lshl_or_b32 v11, v13, 8, v12
6201 ; CHECK-NEXT: v_lshl_or_b32 v9, v1, 16, v6
6202 ; CHECK-NEXT: s_waitcnt vmcnt(10)
6203 ; CHECK-NEXT: v_lshl_or_b32 v7, v15, 8, v14
6204 ; CHECK-NEXT: s_waitcnt vmcnt(8)
6205 ; CHECK-NEXT: v_lshl_or_b32 v8, v17, 8, v16
6206 ; CHECK-NEXT: s_waitcnt vmcnt(6)
6207 ; CHECK-NEXT: v_lshl_or_b32 v12, v19, 8, v18
6208 ; CHECK-NEXT: s_waitcnt vmcnt(4)
6209 ; CHECK-NEXT: v_lshl_or_b32 v13, v21, 8, v20
6210 ; CHECK-NEXT: v_lshl_or_b32 v8, v8, 16, v7
6211 ; CHECK-NEXT: v_lshl_or_b32 v7, v11, 16, v10
6212 ; CHECK-NEXT: v_lshl_or_b32 v6, v13, 16, v12
6213 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6214 ; CHECK-NEXT: ds_write_b128 v0, v[2:5]
6215 ; CHECK-NEXT: ds_write_b128 v0, v[6:9] offset:15
6216 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6217 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6219 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 31, i1 false)
6223 define void @memcpy_p3_p5_sz32_align_16_16(ptr addrspace(3) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
6224 ; CHECK-LABEL: memcpy_p3_p5_sz32_align_16_16:
6225 ; CHECK: ; %bb.0: ; %entry
6226 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6227 ; CHECK-NEXT: s_clause 0x7
6228 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
6229 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
6230 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
6231 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:12
6232 ; CHECK-NEXT: buffer_load_dword v6, v1, s[0:3], 0 offen offset:16
6233 ; CHECK-NEXT: buffer_load_dword v7, v1, s[0:3], 0 offen offset:20
6234 ; CHECK-NEXT: buffer_load_dword v8, v1, s[0:3], 0 offen offset:24
6235 ; CHECK-NEXT: buffer_load_dword v9, v1, s[0:3], 0 offen offset:28
6236 ; CHECK-NEXT: s_waitcnt vmcnt(4)
6237 ; CHECK-NEXT: ds_write_b128 v0, v[2:5]
6238 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6239 ; CHECK-NEXT: ds_write_b128 v0, v[6:9] offset:16
6240 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
6241 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6243 tail call void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 32, i1 false)
6247 define void @memcpy_p5_p0_sz16_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
6248 ; CHECK-LABEL: memcpy_p5_p0_sz16_align_1_1:
6249 ; CHECK: ; %bb.0: ; %entry
6250 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6251 ; CHECK-NEXT: s_clause 0xf
6252 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:15
6253 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:14
6254 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:13
6255 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:12
6256 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:11
6257 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:10
6258 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:9
6259 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:8
6260 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:7
6261 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:6
6262 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:5
6263 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:4
6264 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:3
6265 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:2
6266 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:1
6267 ; CHECK-NEXT: flat_load_ubyte v1, v[1:2]
6268 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6269 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:15
6270 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6271 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:14
6272 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6273 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:13
6274 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6275 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:12
6276 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6277 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:11
6278 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6279 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:10
6280 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6281 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:9
6282 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6283 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
6284 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6285 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:7
6286 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6287 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:6
6288 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6289 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:5
6290 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6291 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
6292 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6293 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:3
6294 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6295 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:2
6296 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6297 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:1
6298 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6299 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen
6300 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6302 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 16, i1 false)
6306 define void @memcpy_p5_p0_sz31_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
6307 ; CHECK-LABEL: memcpy_p5_p0_sz31_align_1_1:
6308 ; CHECK: ; %bb.0: ; %entry
6309 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6310 ; CHECK-NEXT: s_clause 0xe
6311 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:14
6312 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:13
6313 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:12
6314 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:11
6315 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:10
6316 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:9
6317 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:8
6318 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:7
6319 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:6
6320 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:5
6321 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:4
6322 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:3
6323 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:2
6324 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:1
6325 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2]
6326 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6327 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:14
6328 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6329 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:13
6330 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6331 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:12
6332 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6333 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:11
6334 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6335 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:10
6336 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6337 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:9
6338 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6339 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:8
6340 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6341 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:7
6342 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6343 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:6
6344 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6345 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:5
6346 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6347 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:4
6348 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6349 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:3
6350 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6351 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:2
6352 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6353 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:1
6354 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6355 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen
6356 ; CHECK-NEXT: s_clause 0xf
6357 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:30
6358 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:29
6359 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:28
6360 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:27
6361 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:26
6362 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:25
6363 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:24
6364 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:23
6365 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:22
6366 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:21
6367 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:20
6368 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:19
6369 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:18
6370 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:17
6371 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:16
6372 ; CHECK-NEXT: flat_load_ubyte v1, v[1:2] offset:15
6373 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6374 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:30
6375 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6376 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:29
6377 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6378 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:28
6379 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6380 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:27
6381 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6382 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:26
6383 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6384 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:25
6385 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6386 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:24
6387 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6388 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:23
6389 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6390 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:22
6391 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6392 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:21
6393 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6394 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:20
6395 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6396 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:19
6397 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6398 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:18
6399 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6400 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:17
6401 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6402 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:16
6403 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6404 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:15
6405 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6407 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 31, i1 false)
6411 define void @memcpy_p5_p0_sz32_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(0) align 1 readonly %src) {
6412 ; CHECK-LABEL: memcpy_p5_p0_sz32_align_1_1:
6413 ; CHECK: ; %bb.0: ; %entry
6414 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6415 ; CHECK-NEXT: s_clause 0xf
6416 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:15
6417 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:14
6418 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:13
6419 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:12
6420 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:11
6421 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:10
6422 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:9
6423 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:8
6424 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:7
6425 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:6
6426 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:5
6427 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:4
6428 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:3
6429 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:2
6430 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:1
6431 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2]
6432 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6433 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:15
6434 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6435 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:14
6436 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6437 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:13
6438 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6439 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:12
6440 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6441 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:11
6442 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6443 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:10
6444 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6445 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:9
6446 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6447 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
6448 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6449 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:7
6450 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6451 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:6
6452 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6453 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:5
6454 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6455 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
6456 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6457 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:3
6458 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6459 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:2
6460 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6461 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:1
6462 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6463 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen
6464 ; CHECK-NEXT: s_clause 0xf
6465 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:31
6466 ; CHECK-NEXT: flat_load_ubyte v4, v[1:2] offset:30
6467 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:29
6468 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:28
6469 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:27
6470 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:26
6471 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:25
6472 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:24
6473 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:23
6474 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:22
6475 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:21
6476 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:20
6477 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:19
6478 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:18
6479 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:17
6480 ; CHECK-NEXT: flat_load_ubyte v1, v[1:2] offset:16
6481 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6482 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:31
6483 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6484 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:30
6485 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6486 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:29
6487 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6488 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:28
6489 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6490 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:27
6491 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6492 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:26
6493 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6494 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:25
6495 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6496 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:24
6497 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6498 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:23
6499 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6500 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:22
6501 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6502 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:21
6503 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6504 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:20
6505 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6506 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:19
6507 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6508 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:18
6509 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6510 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:17
6511 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6512 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:16
6513 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6515 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(0) noundef nonnull align 1 %src, i64 32, i1 false)
6519 define void @memcpy_p5_p0_sz16_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
6520 ; CHECK-LABEL: memcpy_p5_p0_sz16_align_2_2:
6521 ; CHECK: ; %bb.0: ; %entry
6522 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6523 ; CHECK-NEXT: s_clause 0x7
6524 ; CHECK-NEXT: flat_load_ushort v3, v[1:2] offset:14
6525 ; CHECK-NEXT: flat_load_ushort v4, v[1:2] offset:12
6526 ; CHECK-NEXT: flat_load_ushort v5, v[1:2] offset:10
6527 ; CHECK-NEXT: flat_load_ushort v6, v[1:2] offset:8
6528 ; CHECK-NEXT: flat_load_ushort v7, v[1:2] offset:6
6529 ; CHECK-NEXT: flat_load_ushort v8, v[1:2] offset:4
6530 ; CHECK-NEXT: flat_load_ushort v9, v[1:2] offset:2
6531 ; CHECK-NEXT: flat_load_ushort v1, v[1:2]
6532 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6533 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:14
6534 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6535 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:12
6536 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6537 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:10
6538 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6539 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:8
6540 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6541 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:6
6542 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6543 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:4
6544 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6545 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:2
6546 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6547 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
6548 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6550 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 16, i1 false)
6554 define void @memcpy_p5_p0_sz31_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
6555 ; CHECK-LABEL: memcpy_p5_p0_sz31_align_2_2:
6556 ; CHECK: ; %bb.0: ; %entry
6557 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6558 ; CHECK-NEXT: s_clause 0xf
6559 ; CHECK-NEXT: flat_load_ubyte v3, v[1:2] offset:30
6560 ; CHECK-NEXT: flat_load_ushort v4, v[1:2] offset:28
6561 ; CHECK-NEXT: flat_load_ushort v5, v[1:2] offset:26
6562 ; CHECK-NEXT: flat_load_ushort v6, v[1:2] offset:24
6563 ; CHECK-NEXT: flat_load_ushort v7, v[1:2] offset:22
6564 ; CHECK-NEXT: flat_load_ushort v8, v[1:2] offset:20
6565 ; CHECK-NEXT: flat_load_ushort v9, v[1:2] offset:18
6566 ; CHECK-NEXT: flat_load_ushort v10, v[1:2] offset:16
6567 ; CHECK-NEXT: flat_load_ushort v11, v[1:2] offset:14
6568 ; CHECK-NEXT: flat_load_ushort v12, v[1:2] offset:12
6569 ; CHECK-NEXT: flat_load_ushort v13, v[1:2] offset:10
6570 ; CHECK-NEXT: flat_load_ushort v14, v[1:2] offset:8
6571 ; CHECK-NEXT: flat_load_ushort v15, v[1:2] offset:6
6572 ; CHECK-NEXT: flat_load_ushort v16, v[1:2] offset:4
6573 ; CHECK-NEXT: flat_load_ushort v17, v[1:2] offset:2
6574 ; CHECK-NEXT: flat_load_ushort v1, v[1:2]
6575 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6576 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:30
6577 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6578 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:28
6579 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6580 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:26
6581 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6582 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:24
6583 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6584 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:22
6585 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6586 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:20
6587 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6588 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:18
6589 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6590 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:16
6591 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6592 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:14
6593 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6594 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:12
6595 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6596 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:10
6597 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6598 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:8
6599 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6600 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:6
6601 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6602 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:4
6603 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6604 ; CHECK-NEXT: buffer_store_short v17, v0, s[0:3], 0 offen offset:2
6605 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6606 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
6607 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6609 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 31, i1 false)
6613 define void @memcpy_p5_p0_sz32_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(0) align 2 readonly %src) {
6614 ; CHECK-LABEL: memcpy_p5_p0_sz32_align_2_2:
6615 ; CHECK: ; %bb.0: ; %entry
6616 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6617 ; CHECK-NEXT: s_clause 0xf
6618 ; CHECK-NEXT: flat_load_ushort v3, v[1:2] offset:30
6619 ; CHECK-NEXT: flat_load_ushort v4, v[1:2] offset:28
6620 ; CHECK-NEXT: flat_load_ushort v5, v[1:2] offset:26
6621 ; CHECK-NEXT: flat_load_ushort v6, v[1:2] offset:24
6622 ; CHECK-NEXT: flat_load_ushort v7, v[1:2] offset:22
6623 ; CHECK-NEXT: flat_load_ushort v8, v[1:2] offset:20
6624 ; CHECK-NEXT: flat_load_ushort v9, v[1:2] offset:18
6625 ; CHECK-NEXT: flat_load_ushort v10, v[1:2] offset:16
6626 ; CHECK-NEXT: flat_load_ushort v11, v[1:2] offset:14
6627 ; CHECK-NEXT: flat_load_ushort v12, v[1:2] offset:12
6628 ; CHECK-NEXT: flat_load_ushort v13, v[1:2] offset:10
6629 ; CHECK-NEXT: flat_load_ushort v14, v[1:2] offset:8
6630 ; CHECK-NEXT: flat_load_ushort v15, v[1:2] offset:6
6631 ; CHECK-NEXT: flat_load_ushort v16, v[1:2] offset:4
6632 ; CHECK-NEXT: flat_load_ushort v17, v[1:2] offset:2
6633 ; CHECK-NEXT: flat_load_ushort v1, v[1:2]
6634 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6635 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:30
6636 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6637 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:28
6638 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6639 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:26
6640 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6641 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:24
6642 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6643 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:22
6644 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6645 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:20
6646 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6647 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:18
6648 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6649 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:16
6650 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6651 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:14
6652 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6653 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:12
6654 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6655 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:10
6656 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6657 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:8
6658 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6659 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:6
6660 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6661 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:4
6662 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6663 ; CHECK-NEXT: buffer_store_short v17, v0, s[0:3], 0 offen offset:2
6664 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6665 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
6666 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6668 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(0) noundef nonnull align 2 %src, i64 32, i1 false)
6672 define void @memcpy_p5_p0_sz16_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
6673 ; CHECK-LABEL: memcpy_p5_p0_sz16_align_8_8:
6674 ; CHECK: ; %bb.0: ; %entry
6675 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6676 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
6677 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6678 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
6679 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
6680 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
6681 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
6682 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6684 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 16, i1 false)
6688 define void @memcpy_p5_p0_sz31_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
6689 ; CHECK-LABEL: memcpy_p5_p0_sz31_align_8_8:
6690 ; CHECK: ; %bb.0: ; %entry
6691 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6692 ; CHECK-NEXT: s_clause 0x10
6693 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:17
6694 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:18
6695 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:15
6696 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:16
6697 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:21
6698 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:22
6699 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:19
6700 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:20
6701 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:25
6702 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:26
6703 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:23
6704 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:24
6705 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:29
6706 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2] offset:30
6707 ; CHECK-NEXT: flat_load_ubyte v19, v[1:2] offset:27
6708 ; CHECK-NEXT: flat_load_ubyte v20, v[1:2] offset:28
6709 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
6710 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
6711 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:17
6712 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6713 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:18
6714 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6715 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:15
6716 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6717 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:16
6718 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6719 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:21
6720 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6721 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:22
6722 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6723 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:19
6724 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6725 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:20
6726 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6727 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:25
6728 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6729 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:26
6730 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6731 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:23
6732 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6733 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:24
6734 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6735 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:29
6736 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6737 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:30
6738 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6739 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:27
6740 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6741 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:28
6742 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6743 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
6744 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
6745 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
6746 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
6747 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6749 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 31, i1 false)
6753 define void @memcpy_p5_p0_sz32_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(0) align 8 readonly %src) {
6754 ; CHECK-LABEL: memcpy_p5_p0_sz32_align_8_8:
6755 ; CHECK: ; %bb.0: ; %entry
6756 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6757 ; CHECK-NEXT: s_clause 0x1
6758 ; CHECK-NEXT: flat_load_dwordx4 v[3:6], v[1:2] offset:16
6759 ; CHECK-NEXT: flat_load_dwordx4 v[7:10], v[1:2]
6760 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6761 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:28
6762 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:24
6763 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:20
6764 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:16
6765 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6766 ; CHECK-NEXT: buffer_store_dword v10, v0, s[0:3], 0 offen offset:12
6767 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:8
6768 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:4
6769 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen
6770 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6772 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(0) noundef nonnull align 8 %src, i64 32, i1 false)
6776 define void @memcpy_p5_p0_sz16_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
6777 ; CHECK-LABEL: memcpy_p5_p0_sz16_align_16_16:
6778 ; CHECK: ; %bb.0: ; %entry
6779 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6780 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
6781 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6782 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
6783 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
6784 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
6785 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
6786 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6788 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 16, i1 false)
6792 define void @memcpy_p5_p0_sz31_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
6793 ; CHECK-LABEL: memcpy_p5_p0_sz31_align_16_16:
6794 ; CHECK: ; %bb.0: ; %entry
6795 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6796 ; CHECK-NEXT: s_clause 0x10
6797 ; CHECK-NEXT: flat_load_ubyte v5, v[1:2] offset:17
6798 ; CHECK-NEXT: flat_load_ubyte v6, v[1:2] offset:18
6799 ; CHECK-NEXT: flat_load_ubyte v7, v[1:2] offset:15
6800 ; CHECK-NEXT: flat_load_ubyte v8, v[1:2] offset:16
6801 ; CHECK-NEXT: flat_load_ubyte v9, v[1:2] offset:21
6802 ; CHECK-NEXT: flat_load_ubyte v10, v[1:2] offset:22
6803 ; CHECK-NEXT: flat_load_ubyte v11, v[1:2] offset:19
6804 ; CHECK-NEXT: flat_load_ubyte v12, v[1:2] offset:20
6805 ; CHECK-NEXT: flat_load_ubyte v13, v[1:2] offset:25
6806 ; CHECK-NEXT: flat_load_ubyte v14, v[1:2] offset:26
6807 ; CHECK-NEXT: flat_load_ubyte v15, v[1:2] offset:23
6808 ; CHECK-NEXT: flat_load_ubyte v16, v[1:2] offset:24
6809 ; CHECK-NEXT: flat_load_ubyte v17, v[1:2] offset:29
6810 ; CHECK-NEXT: flat_load_ubyte v18, v[1:2] offset:30
6811 ; CHECK-NEXT: flat_load_ubyte v19, v[1:2] offset:27
6812 ; CHECK-NEXT: flat_load_ubyte v20, v[1:2] offset:28
6813 ; CHECK-NEXT: flat_load_dwordx4 v[1:4], v[1:2]
6814 ; CHECK-NEXT: s_waitcnt vmcnt(16) lgkmcnt(16)
6815 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:17
6816 ; CHECK-NEXT: s_waitcnt vmcnt(15) lgkmcnt(15)
6817 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:18
6818 ; CHECK-NEXT: s_waitcnt vmcnt(14) lgkmcnt(14)
6819 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:15
6820 ; CHECK-NEXT: s_waitcnt vmcnt(13) lgkmcnt(13)
6821 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:16
6822 ; CHECK-NEXT: s_waitcnt vmcnt(12) lgkmcnt(12)
6823 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:21
6824 ; CHECK-NEXT: s_waitcnt vmcnt(11) lgkmcnt(11)
6825 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:22
6826 ; CHECK-NEXT: s_waitcnt vmcnt(10) lgkmcnt(10)
6827 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:19
6828 ; CHECK-NEXT: s_waitcnt vmcnt(9) lgkmcnt(9)
6829 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:20
6830 ; CHECK-NEXT: s_waitcnt vmcnt(8) lgkmcnt(8)
6831 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:25
6832 ; CHECK-NEXT: s_waitcnt vmcnt(7) lgkmcnt(7)
6833 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:26
6834 ; CHECK-NEXT: s_waitcnt vmcnt(6) lgkmcnt(6)
6835 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:23
6836 ; CHECK-NEXT: s_waitcnt vmcnt(5) lgkmcnt(5)
6837 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:24
6838 ; CHECK-NEXT: s_waitcnt vmcnt(4) lgkmcnt(4)
6839 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:29
6840 ; CHECK-NEXT: s_waitcnt vmcnt(3) lgkmcnt(3)
6841 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:30
6842 ; CHECK-NEXT: s_waitcnt vmcnt(2) lgkmcnt(2)
6843 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:27
6844 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6845 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:28
6846 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6847 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
6848 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
6849 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
6850 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
6851 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6853 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 31, i1 false)
6857 define void @memcpy_p5_p0_sz32_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(0) align 16 readonly %src) {
6858 ; CHECK-LABEL: memcpy_p5_p0_sz32_align_16_16:
6859 ; CHECK: ; %bb.0: ; %entry
6860 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6861 ; CHECK-NEXT: s_clause 0x1
6862 ; CHECK-NEXT: flat_load_dwordx4 v[3:6], v[1:2] offset:16
6863 ; CHECK-NEXT: flat_load_dwordx4 v[7:10], v[1:2]
6864 ; CHECK-NEXT: s_waitcnt vmcnt(1) lgkmcnt(1)
6865 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:28
6866 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:24
6867 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:20
6868 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:16
6869 ; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6870 ; CHECK-NEXT: buffer_store_dword v10, v0, s[0:3], 0 offen offset:12
6871 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:8
6872 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:4
6873 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen
6874 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6876 tail call void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(0) noundef nonnull align 16 %src, i64 32, i1 false)
6880 define void @memcpy_p5_p1_sz16_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
6881 ; CHECK-LABEL: memcpy_p5_p1_sz16_align_1_1:
6882 ; CHECK: ; %bb.0: ; %entry
6883 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6884 ; CHECK-NEXT: s_clause 0xf
6885 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off offset:15
6886 ; CHECK-NEXT: global_load_ubyte v4, v[1:2], off offset:14
6887 ; CHECK-NEXT: global_load_ubyte v5, v[1:2], off offset:13
6888 ; CHECK-NEXT: global_load_ubyte v6, v[1:2], off offset:12
6889 ; CHECK-NEXT: global_load_ubyte v7, v[1:2], off offset:11
6890 ; CHECK-NEXT: global_load_ubyte v8, v[1:2], off offset:10
6891 ; CHECK-NEXT: global_load_ubyte v9, v[1:2], off offset:9
6892 ; CHECK-NEXT: global_load_ubyte v10, v[1:2], off offset:8
6893 ; CHECK-NEXT: global_load_ubyte v11, v[1:2], off offset:7
6894 ; CHECK-NEXT: global_load_ubyte v12, v[1:2], off offset:6
6895 ; CHECK-NEXT: global_load_ubyte v13, v[1:2], off offset:5
6896 ; CHECK-NEXT: global_load_ubyte v14, v[1:2], off offset:4
6897 ; CHECK-NEXT: global_load_ubyte v15, v[1:2], off offset:3
6898 ; CHECK-NEXT: global_load_ubyte v16, v[1:2], off offset:2
6899 ; CHECK-NEXT: global_load_ubyte v17, v[1:2], off offset:1
6900 ; CHECK-NEXT: global_load_ubyte v1, v[1:2], off
6901 ; CHECK-NEXT: s_waitcnt vmcnt(15)
6902 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:15
6903 ; CHECK-NEXT: s_waitcnt vmcnt(14)
6904 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:14
6905 ; CHECK-NEXT: s_waitcnt vmcnt(13)
6906 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:13
6907 ; CHECK-NEXT: s_waitcnt vmcnt(12)
6908 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:12
6909 ; CHECK-NEXT: s_waitcnt vmcnt(11)
6910 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:11
6911 ; CHECK-NEXT: s_waitcnt vmcnt(10)
6912 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:10
6913 ; CHECK-NEXT: s_waitcnt vmcnt(9)
6914 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:9
6915 ; CHECK-NEXT: s_waitcnt vmcnt(8)
6916 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
6917 ; CHECK-NEXT: s_waitcnt vmcnt(7)
6918 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:7
6919 ; CHECK-NEXT: s_waitcnt vmcnt(6)
6920 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:6
6921 ; CHECK-NEXT: s_waitcnt vmcnt(5)
6922 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:5
6923 ; CHECK-NEXT: s_waitcnt vmcnt(4)
6924 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
6925 ; CHECK-NEXT: s_waitcnt vmcnt(3)
6926 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:3
6927 ; CHECK-NEXT: s_waitcnt vmcnt(2)
6928 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:2
6929 ; CHECK-NEXT: s_waitcnt vmcnt(1)
6930 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:1
6931 ; CHECK-NEXT: s_waitcnt vmcnt(0)
6932 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen
6933 ; CHECK-NEXT: s_setpc_b64 s[30:31]
6935 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 16, i1 false)
6939 define void @memcpy_p5_p1_sz31_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
6940 ; CHECK-LABEL: memcpy_p5_p1_sz31_align_1_1:
6941 ; CHECK: ; %bb.0: ; %entry
6942 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
6943 ; CHECK-NEXT: s_clause 0x1e
6944 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off
6945 ; CHECK-NEXT: global_load_ubyte v4, v[1:2], off offset:1
6946 ; CHECK-NEXT: global_load_ubyte v5, v[1:2], off offset:2
6947 ; CHECK-NEXT: global_load_ubyte v6, v[1:2], off offset:3
6948 ; CHECK-NEXT: global_load_ubyte v7, v[1:2], off offset:4
6949 ; CHECK-NEXT: global_load_ubyte v8, v[1:2], off offset:5
6950 ; CHECK-NEXT: global_load_ubyte v9, v[1:2], off offset:6
6951 ; CHECK-NEXT: global_load_ubyte v10, v[1:2], off offset:7
6952 ; CHECK-NEXT: global_load_ubyte v11, v[1:2], off offset:8
6953 ; CHECK-NEXT: global_load_ubyte v12, v[1:2], off offset:9
6954 ; CHECK-NEXT: global_load_ubyte v13, v[1:2], off offset:10
6955 ; CHECK-NEXT: global_load_ubyte v14, v[1:2], off offset:11
6956 ; CHECK-NEXT: global_load_ubyte v15, v[1:2], off offset:12
6957 ; CHECK-NEXT: global_load_ubyte v16, v[1:2], off offset:13
6958 ; CHECK-NEXT: global_load_ubyte v17, v[1:2], off offset:14
6959 ; CHECK-NEXT: global_load_ubyte v18, v[1:2], off offset:30
6960 ; CHECK-NEXT: global_load_ubyte v19, v[1:2], off offset:29
6961 ; CHECK-NEXT: global_load_ubyte v20, v[1:2], off offset:28
6962 ; CHECK-NEXT: global_load_ubyte v21, v[1:2], off offset:27
6963 ; CHECK-NEXT: global_load_ubyte v22, v[1:2], off offset:26
6964 ; CHECK-NEXT: global_load_ubyte v23, v[1:2], off offset:25
6965 ; CHECK-NEXT: global_load_ubyte v24, v[1:2], off offset:24
6966 ; CHECK-NEXT: global_load_ubyte v25, v[1:2], off offset:23
6967 ; CHECK-NEXT: global_load_ubyte v26, v[1:2], off offset:22
6968 ; CHECK-NEXT: global_load_ubyte v27, v[1:2], off offset:21
6969 ; CHECK-NEXT: global_load_ubyte v28, v[1:2], off offset:20
6970 ; CHECK-NEXT: global_load_ubyte v29, v[1:2], off offset:19
6971 ; CHECK-NEXT: global_load_ubyte v30, v[1:2], off offset:18
6972 ; CHECK-NEXT: global_load_ubyte v31, v[1:2], off offset:17
6973 ; CHECK-NEXT: global_load_ubyte v32, v[1:2], off offset:16
6974 ; CHECK-NEXT: global_load_ubyte v1, v[1:2], off offset:15
6975 ; CHECK-NEXT: s_waitcnt vmcnt(30)
6976 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen
6977 ; CHECK-NEXT: s_waitcnt vmcnt(29)
6978 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:1
6979 ; CHECK-NEXT: s_waitcnt vmcnt(28)
6980 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:2
6981 ; CHECK-NEXT: s_waitcnt vmcnt(27)
6982 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:3
6983 ; CHECK-NEXT: s_waitcnt vmcnt(26)
6984 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:4
6985 ; CHECK-NEXT: s_waitcnt vmcnt(25)
6986 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:5
6987 ; CHECK-NEXT: s_waitcnt vmcnt(24)
6988 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:6
6989 ; CHECK-NEXT: s_waitcnt vmcnt(23)
6990 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:7
6991 ; CHECK-NEXT: s_waitcnt vmcnt(22)
6992 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:8
6993 ; CHECK-NEXT: s_waitcnt vmcnt(21)
6994 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:9
6995 ; CHECK-NEXT: s_waitcnt vmcnt(20)
6996 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:10
6997 ; CHECK-NEXT: s_waitcnt vmcnt(19)
6998 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:11
6999 ; CHECK-NEXT: s_waitcnt vmcnt(18)
7000 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:12
7001 ; CHECK-NEXT: s_waitcnt vmcnt(17)
7002 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:13
7003 ; CHECK-NEXT: s_waitcnt vmcnt(16)
7004 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:14
7005 ; CHECK-NEXT: s_waitcnt vmcnt(15)
7006 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:30
7007 ; CHECK-NEXT: s_waitcnt vmcnt(14)
7008 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:29
7009 ; CHECK-NEXT: s_waitcnt vmcnt(13)
7010 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:28
7011 ; CHECK-NEXT: s_waitcnt vmcnt(12)
7012 ; CHECK-NEXT: buffer_store_byte v21, v0, s[0:3], 0 offen offset:27
7013 ; CHECK-NEXT: s_waitcnt vmcnt(11)
7014 ; CHECK-NEXT: buffer_store_byte v22, v0, s[0:3], 0 offen offset:26
7015 ; CHECK-NEXT: s_waitcnt vmcnt(10)
7016 ; CHECK-NEXT: buffer_store_byte v23, v0, s[0:3], 0 offen offset:25
7017 ; CHECK-NEXT: s_waitcnt vmcnt(9)
7018 ; CHECK-NEXT: buffer_store_byte v24, v0, s[0:3], 0 offen offset:24
7019 ; CHECK-NEXT: s_waitcnt vmcnt(8)
7020 ; CHECK-NEXT: buffer_store_byte v25, v0, s[0:3], 0 offen offset:23
7021 ; CHECK-NEXT: s_waitcnt vmcnt(7)
7022 ; CHECK-NEXT: buffer_store_byte v26, v0, s[0:3], 0 offen offset:22
7023 ; CHECK-NEXT: s_waitcnt vmcnt(6)
7024 ; CHECK-NEXT: buffer_store_byte v27, v0, s[0:3], 0 offen offset:21
7025 ; CHECK-NEXT: s_waitcnt vmcnt(5)
7026 ; CHECK-NEXT: buffer_store_byte v28, v0, s[0:3], 0 offen offset:20
7027 ; CHECK-NEXT: s_waitcnt vmcnt(4)
7028 ; CHECK-NEXT: buffer_store_byte v29, v0, s[0:3], 0 offen offset:19
7029 ; CHECK-NEXT: s_waitcnt vmcnt(3)
7030 ; CHECK-NEXT: buffer_store_byte v30, v0, s[0:3], 0 offen offset:18
7031 ; CHECK-NEXT: s_waitcnt vmcnt(2)
7032 ; CHECK-NEXT: buffer_store_byte v31, v0, s[0:3], 0 offen offset:17
7033 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7034 ; CHECK-NEXT: buffer_store_byte v32, v0, s[0:3], 0 offen offset:16
7035 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7036 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:15
7037 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7039 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 31, i1 false)
7043 define void @memcpy_p5_p1_sz32_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(1) align 1 readonly %src) {
7044 ; CHECK-LABEL: memcpy_p5_p1_sz32_align_1_1:
7045 ; CHECK: ; %bb.0: ; %entry
7046 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7047 ; CHECK-NEXT: s_clause 0x1f
7048 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off offset:15
7049 ; CHECK-NEXT: global_load_ubyte v4, v[1:2], off offset:14
7050 ; CHECK-NEXT: global_load_ubyte v5, v[1:2], off offset:13
7051 ; CHECK-NEXT: global_load_ubyte v6, v[1:2], off offset:12
7052 ; CHECK-NEXT: global_load_ubyte v7, v[1:2], off offset:11
7053 ; CHECK-NEXT: global_load_ubyte v8, v[1:2], off offset:10
7054 ; CHECK-NEXT: global_load_ubyte v9, v[1:2], off offset:9
7055 ; CHECK-NEXT: global_load_ubyte v10, v[1:2], off offset:8
7056 ; CHECK-NEXT: global_load_ubyte v11, v[1:2], off offset:7
7057 ; CHECK-NEXT: global_load_ubyte v12, v[1:2], off offset:6
7058 ; CHECK-NEXT: global_load_ubyte v13, v[1:2], off offset:5
7059 ; CHECK-NEXT: global_load_ubyte v14, v[1:2], off offset:4
7060 ; CHECK-NEXT: global_load_ubyte v15, v[1:2], off offset:3
7061 ; CHECK-NEXT: global_load_ubyte v16, v[1:2], off offset:2
7062 ; CHECK-NEXT: global_load_ubyte v17, v[1:2], off offset:1
7063 ; CHECK-NEXT: global_load_ubyte v18, v[1:2], off
7064 ; CHECK-NEXT: global_load_ubyte v19, v[1:2], off offset:31
7065 ; CHECK-NEXT: global_load_ubyte v20, v[1:2], off offset:30
7066 ; CHECK-NEXT: global_load_ubyte v21, v[1:2], off offset:29
7067 ; CHECK-NEXT: global_load_ubyte v22, v[1:2], off offset:28
7068 ; CHECK-NEXT: global_load_ubyte v23, v[1:2], off offset:27
7069 ; CHECK-NEXT: global_load_ubyte v24, v[1:2], off offset:26
7070 ; CHECK-NEXT: global_load_ubyte v25, v[1:2], off offset:25
7071 ; CHECK-NEXT: global_load_ubyte v26, v[1:2], off offset:24
7072 ; CHECK-NEXT: global_load_ubyte v27, v[1:2], off offset:23
7073 ; CHECK-NEXT: global_load_ubyte v28, v[1:2], off offset:22
7074 ; CHECK-NEXT: global_load_ubyte v29, v[1:2], off offset:21
7075 ; CHECK-NEXT: global_load_ubyte v30, v[1:2], off offset:20
7076 ; CHECK-NEXT: global_load_ubyte v31, v[1:2], off offset:19
7077 ; CHECK-NEXT: global_load_ubyte v32, v[1:2], off offset:18
7078 ; CHECK-NEXT: global_load_ubyte v33, v[1:2], off offset:17
7079 ; CHECK-NEXT: global_load_ubyte v1, v[1:2], off offset:16
7080 ; CHECK-NEXT: s_waitcnt vmcnt(31)
7081 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:15
7082 ; CHECK-NEXT: s_waitcnt vmcnt(30)
7083 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:14
7084 ; CHECK-NEXT: s_waitcnt vmcnt(29)
7085 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:13
7086 ; CHECK-NEXT: s_waitcnt vmcnt(28)
7087 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:12
7088 ; CHECK-NEXT: s_waitcnt vmcnt(27)
7089 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:11
7090 ; CHECK-NEXT: s_waitcnt vmcnt(26)
7091 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:10
7092 ; CHECK-NEXT: s_waitcnt vmcnt(25)
7093 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:9
7094 ; CHECK-NEXT: s_waitcnt vmcnt(24)
7095 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
7096 ; CHECK-NEXT: s_waitcnt vmcnt(23)
7097 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:7
7098 ; CHECK-NEXT: s_waitcnt vmcnt(22)
7099 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:6
7100 ; CHECK-NEXT: s_waitcnt vmcnt(21)
7101 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:5
7102 ; CHECK-NEXT: s_waitcnt vmcnt(20)
7103 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
7104 ; CHECK-NEXT: s_waitcnt vmcnt(19)
7105 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:3
7106 ; CHECK-NEXT: s_waitcnt vmcnt(18)
7107 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:2
7108 ; CHECK-NEXT: s_waitcnt vmcnt(17)
7109 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:1
7110 ; CHECK-NEXT: s_waitcnt vmcnt(16)
7111 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen
7112 ; CHECK-NEXT: s_waitcnt vmcnt(15)
7113 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:31
7114 ; CHECK-NEXT: s_waitcnt vmcnt(14)
7115 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:30
7116 ; CHECK-NEXT: s_waitcnt vmcnt(13)
7117 ; CHECK-NEXT: buffer_store_byte v21, v0, s[0:3], 0 offen offset:29
7118 ; CHECK-NEXT: s_waitcnt vmcnt(12)
7119 ; CHECK-NEXT: buffer_store_byte v22, v0, s[0:3], 0 offen offset:28
7120 ; CHECK-NEXT: s_waitcnt vmcnt(11)
7121 ; CHECK-NEXT: buffer_store_byte v23, v0, s[0:3], 0 offen offset:27
7122 ; CHECK-NEXT: s_waitcnt vmcnt(10)
7123 ; CHECK-NEXT: buffer_store_byte v24, v0, s[0:3], 0 offen offset:26
7124 ; CHECK-NEXT: s_waitcnt vmcnt(9)
7125 ; CHECK-NEXT: buffer_store_byte v25, v0, s[0:3], 0 offen offset:25
7126 ; CHECK-NEXT: s_waitcnt vmcnt(8)
7127 ; CHECK-NEXT: buffer_store_byte v26, v0, s[0:3], 0 offen offset:24
7128 ; CHECK-NEXT: s_waitcnt vmcnt(7)
7129 ; CHECK-NEXT: buffer_store_byte v27, v0, s[0:3], 0 offen offset:23
7130 ; CHECK-NEXT: s_waitcnt vmcnt(6)
7131 ; CHECK-NEXT: buffer_store_byte v28, v0, s[0:3], 0 offen offset:22
7132 ; CHECK-NEXT: s_waitcnt vmcnt(5)
7133 ; CHECK-NEXT: buffer_store_byte v29, v0, s[0:3], 0 offen offset:21
7134 ; CHECK-NEXT: s_waitcnt vmcnt(4)
7135 ; CHECK-NEXT: buffer_store_byte v30, v0, s[0:3], 0 offen offset:20
7136 ; CHECK-NEXT: s_waitcnt vmcnt(3)
7137 ; CHECK-NEXT: buffer_store_byte v31, v0, s[0:3], 0 offen offset:19
7138 ; CHECK-NEXT: s_waitcnt vmcnt(2)
7139 ; CHECK-NEXT: buffer_store_byte v32, v0, s[0:3], 0 offen offset:18
7140 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7141 ; CHECK-NEXT: buffer_store_byte v33, v0, s[0:3], 0 offen offset:17
7142 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7143 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:16
7144 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7146 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(1) noundef nonnull align 1 %src, i64 32, i1 false)
7150 define void @memcpy_p5_p1_sz16_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
7151 ; CHECK-LABEL: memcpy_p5_p1_sz16_align_2_2:
7152 ; CHECK: ; %bb.0: ; %entry
7153 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7154 ; CHECK-NEXT: s_clause 0x7
7155 ; CHECK-NEXT: global_load_ushort v3, v[1:2], off
7156 ; CHECK-NEXT: global_load_ushort v4, v[1:2], off offset:2
7157 ; CHECK-NEXT: global_load_ushort v5, v[1:2], off offset:4
7158 ; CHECK-NEXT: global_load_ushort v6, v[1:2], off offset:6
7159 ; CHECK-NEXT: global_load_ushort v7, v[1:2], off offset:8
7160 ; CHECK-NEXT: global_load_ushort v8, v[1:2], off offset:10
7161 ; CHECK-NEXT: global_load_ushort v9, v[1:2], off offset:12
7162 ; CHECK-NEXT: global_load_ushort v1, v[1:2], off offset:14
7163 ; CHECK-NEXT: s_waitcnt vmcnt(7)
7164 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen
7165 ; CHECK-NEXT: s_waitcnt vmcnt(6)
7166 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:2
7167 ; CHECK-NEXT: s_waitcnt vmcnt(5)
7168 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:4
7169 ; CHECK-NEXT: s_waitcnt vmcnt(4)
7170 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:6
7171 ; CHECK-NEXT: s_waitcnt vmcnt(3)
7172 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:8
7173 ; CHECK-NEXT: s_waitcnt vmcnt(2)
7174 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:10
7175 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7176 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:12
7177 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7178 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen offset:14
7179 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7181 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 16, i1 false)
7185 define void @memcpy_p5_p1_sz31_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
7186 ; CHECK-LABEL: memcpy_p5_p1_sz31_align_2_2:
7187 ; CHECK: ; %bb.0: ; %entry
7188 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7189 ; CHECK-NEXT: s_clause 0xf
7190 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off offset:30
7191 ; CHECK-NEXT: global_load_ushort v4, v[1:2], off offset:28
7192 ; CHECK-NEXT: global_load_ushort v5, v[1:2], off offset:26
7193 ; CHECK-NEXT: global_load_ushort v6, v[1:2], off offset:24
7194 ; CHECK-NEXT: global_load_ushort v7, v[1:2], off offset:22
7195 ; CHECK-NEXT: global_load_ushort v8, v[1:2], off offset:20
7196 ; CHECK-NEXT: global_load_ushort v9, v[1:2], off offset:18
7197 ; CHECK-NEXT: global_load_ushort v10, v[1:2], off offset:16
7198 ; CHECK-NEXT: global_load_ushort v11, v[1:2], off offset:14
7199 ; CHECK-NEXT: global_load_ushort v12, v[1:2], off offset:12
7200 ; CHECK-NEXT: global_load_ushort v13, v[1:2], off offset:10
7201 ; CHECK-NEXT: global_load_ushort v14, v[1:2], off offset:8
7202 ; CHECK-NEXT: global_load_ushort v15, v[1:2], off offset:6
7203 ; CHECK-NEXT: global_load_ushort v16, v[1:2], off offset:4
7204 ; CHECK-NEXT: global_load_ushort v17, v[1:2], off offset:2
7205 ; CHECK-NEXT: global_load_ushort v1, v[1:2], off
7206 ; CHECK-NEXT: s_waitcnt vmcnt(15)
7207 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:30
7208 ; CHECK-NEXT: s_waitcnt vmcnt(14)
7209 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:28
7210 ; CHECK-NEXT: s_waitcnt vmcnt(13)
7211 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:26
7212 ; CHECK-NEXT: s_waitcnt vmcnt(12)
7213 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:24
7214 ; CHECK-NEXT: s_waitcnt vmcnt(11)
7215 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:22
7216 ; CHECK-NEXT: s_waitcnt vmcnt(10)
7217 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:20
7218 ; CHECK-NEXT: s_waitcnt vmcnt(9)
7219 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:18
7220 ; CHECK-NEXT: s_waitcnt vmcnt(8)
7221 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:16
7222 ; CHECK-NEXT: s_waitcnt vmcnt(7)
7223 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:14
7224 ; CHECK-NEXT: s_waitcnt vmcnt(6)
7225 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:12
7226 ; CHECK-NEXT: s_waitcnt vmcnt(5)
7227 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:10
7228 ; CHECK-NEXT: s_waitcnt vmcnt(4)
7229 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:8
7230 ; CHECK-NEXT: s_waitcnt vmcnt(3)
7231 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:6
7232 ; CHECK-NEXT: s_waitcnt vmcnt(2)
7233 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:4
7234 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7235 ; CHECK-NEXT: buffer_store_short v17, v0, s[0:3], 0 offen offset:2
7236 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7237 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
7238 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7240 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 31, i1 false)
7244 define void @memcpy_p5_p1_sz32_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(1) align 2 readonly %src) {
7245 ; CHECK-LABEL: memcpy_p5_p1_sz32_align_2_2:
7246 ; CHECK: ; %bb.0: ; %entry
7247 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7248 ; CHECK-NEXT: s_clause 0xf
7249 ; CHECK-NEXT: global_load_ushort v3, v[1:2], off offset:30
7250 ; CHECK-NEXT: global_load_ushort v4, v[1:2], off offset:28
7251 ; CHECK-NEXT: global_load_ushort v5, v[1:2], off offset:26
7252 ; CHECK-NEXT: global_load_ushort v6, v[1:2], off offset:24
7253 ; CHECK-NEXT: global_load_ushort v7, v[1:2], off offset:22
7254 ; CHECK-NEXT: global_load_ushort v8, v[1:2], off offset:20
7255 ; CHECK-NEXT: global_load_ushort v9, v[1:2], off offset:18
7256 ; CHECK-NEXT: global_load_ushort v10, v[1:2], off offset:16
7257 ; CHECK-NEXT: global_load_ushort v11, v[1:2], off offset:14
7258 ; CHECK-NEXT: global_load_ushort v12, v[1:2], off offset:12
7259 ; CHECK-NEXT: global_load_ushort v13, v[1:2], off offset:10
7260 ; CHECK-NEXT: global_load_ushort v14, v[1:2], off offset:8
7261 ; CHECK-NEXT: global_load_ushort v15, v[1:2], off offset:6
7262 ; CHECK-NEXT: global_load_ushort v16, v[1:2], off offset:4
7263 ; CHECK-NEXT: global_load_ushort v17, v[1:2], off offset:2
7264 ; CHECK-NEXT: global_load_ushort v1, v[1:2], off
7265 ; CHECK-NEXT: s_waitcnt vmcnt(15)
7266 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:30
7267 ; CHECK-NEXT: s_waitcnt vmcnt(14)
7268 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:28
7269 ; CHECK-NEXT: s_waitcnt vmcnt(13)
7270 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:26
7271 ; CHECK-NEXT: s_waitcnt vmcnt(12)
7272 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:24
7273 ; CHECK-NEXT: s_waitcnt vmcnt(11)
7274 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:22
7275 ; CHECK-NEXT: s_waitcnt vmcnt(10)
7276 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:20
7277 ; CHECK-NEXT: s_waitcnt vmcnt(9)
7278 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:18
7279 ; CHECK-NEXT: s_waitcnt vmcnt(8)
7280 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:16
7281 ; CHECK-NEXT: s_waitcnt vmcnt(7)
7282 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:14
7283 ; CHECK-NEXT: s_waitcnt vmcnt(6)
7284 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:12
7285 ; CHECK-NEXT: s_waitcnt vmcnt(5)
7286 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:10
7287 ; CHECK-NEXT: s_waitcnt vmcnt(4)
7288 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:8
7289 ; CHECK-NEXT: s_waitcnt vmcnt(3)
7290 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:6
7291 ; CHECK-NEXT: s_waitcnt vmcnt(2)
7292 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:4
7293 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7294 ; CHECK-NEXT: buffer_store_short v17, v0, s[0:3], 0 offen offset:2
7295 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7296 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
7297 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7299 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(1) noundef nonnull align 2 %src, i64 32, i1 false)
7303 define void @memcpy_p5_p1_sz16_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
7304 ; CHECK-LABEL: memcpy_p5_p1_sz16_align_8_8:
7305 ; CHECK: ; %bb.0: ; %entry
7306 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7307 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
7308 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7309 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
7310 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
7311 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
7312 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
7313 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7315 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 16, i1 false)
7319 define void @memcpy_p5_p1_sz31_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
7320 ; CHECK-LABEL: memcpy_p5_p1_sz31_align_8_8:
7321 ; CHECK: ; %bb.0: ; %entry
7322 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7323 ; CHECK-NEXT: s_clause 0x1
7324 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
7325 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
7326 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7327 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
7328 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
7329 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
7330 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
7331 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7332 ; CHECK-NEXT: buffer_store_byte_d16_hi v7, v0, s[0:3], 0 offen offset:17
7333 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:15
7334 ; CHECK-NEXT: buffer_store_byte_d16_hi v8, v0, s[0:3], 0 offen offset:21
7335 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:19
7336 ; CHECK-NEXT: buffer_store_byte_d16_hi v9, v0, s[0:3], 0 offen offset:25
7337 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:23
7338 ; CHECK-NEXT: buffer_store_byte_d16_hi v10, v0, s[0:3], 0 offen offset:29
7339 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:27
7340 ; CHECK-NEXT: v_lshrrev_b32_e32 v1, 24, v7
7341 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v7
7342 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 24, v8
7343 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v8
7344 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v9
7345 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 8, v9
7346 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v10
7347 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 8, v10
7348 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
7349 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:16
7350 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:22
7351 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:20
7352 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:26
7353 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:24
7354 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:30
7355 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:28
7356 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7358 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 31, i1 false)
7362 define void @memcpy_p5_p1_sz32_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(1) align 8 readonly %src) {
7363 ; CHECK-LABEL: memcpy_p5_p1_sz32_align_8_8:
7364 ; CHECK: ; %bb.0: ; %entry
7365 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7366 ; CHECK-NEXT: s_clause 0x1
7367 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
7368 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
7369 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7370 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
7371 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
7372 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
7373 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
7374 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7375 ; CHECK-NEXT: buffer_store_dword v10, v0, s[0:3], 0 offen offset:28
7376 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:24
7377 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:20
7378 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:16
7379 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7381 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(1) noundef nonnull align 8 %src, i64 32, i1 false)
7385 define void @memcpy_p5_p1_sz16_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
7386 ; CHECK-LABEL: memcpy_p5_p1_sz16_align_16_16:
7387 ; CHECK: ; %bb.0: ; %entry
7388 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7389 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
7390 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7391 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
7392 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
7393 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
7394 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
7395 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7397 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 16, i1 false)
7401 define void @memcpy_p5_p1_sz31_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
7402 ; CHECK-LABEL: memcpy_p5_p1_sz31_align_16_16:
7403 ; CHECK: ; %bb.0: ; %entry
7404 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7405 ; CHECK-NEXT: s_clause 0x1
7406 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
7407 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
7408 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7409 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
7410 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
7411 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
7412 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
7413 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7414 ; CHECK-NEXT: buffer_store_byte_d16_hi v7, v0, s[0:3], 0 offen offset:17
7415 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:15
7416 ; CHECK-NEXT: buffer_store_byte_d16_hi v8, v0, s[0:3], 0 offen offset:21
7417 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:19
7418 ; CHECK-NEXT: buffer_store_byte_d16_hi v9, v0, s[0:3], 0 offen offset:25
7419 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:23
7420 ; CHECK-NEXT: buffer_store_byte_d16_hi v10, v0, s[0:3], 0 offen offset:29
7421 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:27
7422 ; CHECK-NEXT: v_lshrrev_b32_e32 v1, 24, v7
7423 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v7
7424 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 24, v8
7425 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v8
7426 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v9
7427 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 8, v9
7428 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v10
7429 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 8, v10
7430 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
7431 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:16
7432 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:22
7433 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:20
7434 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:26
7435 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:24
7436 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:30
7437 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:28
7438 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7440 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 31, i1 false)
7444 define void @memcpy_p5_p1_sz32_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(1) align 16 readonly %src) {
7445 ; CHECK-LABEL: memcpy_p5_p1_sz32_align_16_16:
7446 ; CHECK: ; %bb.0: ; %entry
7447 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7448 ; CHECK-NEXT: s_clause 0x1
7449 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
7450 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
7451 ; CHECK-NEXT: s_waitcnt vmcnt(1)
7452 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
7453 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
7454 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
7455 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
7456 ; CHECK-NEXT: s_waitcnt vmcnt(0)
7457 ; CHECK-NEXT: buffer_store_dword v10, v0, s[0:3], 0 offen offset:28
7458 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:24
7459 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:20
7460 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:16
7461 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7463 tail call void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(1) noundef nonnull align 16 %src, i64 32, i1 false)
7467 define void @memcpy_p5_p3_sz16_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
7468 ; CHECK-LABEL: memcpy_p5_p3_sz16_align_1_1:
7469 ; CHECK: ; %bb.0: ; %entry
7470 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7471 ; CHECK-NEXT: ds_read_u8 v2, v1 offset:15
7472 ; CHECK-NEXT: ds_read_u8 v3, v1 offset:14
7473 ; CHECK-NEXT: ds_read_u8 v4, v1 offset:13
7474 ; CHECK-NEXT: ds_read_u8 v5, v1 offset:12
7475 ; CHECK-NEXT: ds_read_u8 v6, v1 offset:11
7476 ; CHECK-NEXT: ds_read_u8 v7, v1 offset:10
7477 ; CHECK-NEXT: ds_read_u8 v8, v1 offset:9
7478 ; CHECK-NEXT: ds_read_u8 v9, v1 offset:8
7479 ; CHECK-NEXT: ds_read_u8 v10, v1 offset:7
7480 ; CHECK-NEXT: ds_read_u8 v11, v1 offset:6
7481 ; CHECK-NEXT: ds_read_u8 v12, v1 offset:5
7482 ; CHECK-NEXT: ds_read_u8 v13, v1 offset:4
7483 ; CHECK-NEXT: ds_read_u8 v14, v1 offset:3
7484 ; CHECK-NEXT: ds_read_u8 v15, v1 offset:2
7485 ; CHECK-NEXT: ds_read_u8 v16, v1 offset:1
7486 ; CHECK-NEXT: ds_read_u8 v1, v1
7487 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
7488 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:15
7489 ; CHECK-NEXT: s_waitcnt lgkmcnt(14)
7490 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:14
7491 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
7492 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:13
7493 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
7494 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:12
7495 ; CHECK-NEXT: s_waitcnt lgkmcnt(11)
7496 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:11
7497 ; CHECK-NEXT: s_waitcnt lgkmcnt(10)
7498 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:10
7499 ; CHECK-NEXT: s_waitcnt lgkmcnt(9)
7500 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:9
7501 ; CHECK-NEXT: s_waitcnt lgkmcnt(8)
7502 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:8
7503 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
7504 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:7
7505 ; CHECK-NEXT: s_waitcnt lgkmcnt(6)
7506 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:6
7507 ; CHECK-NEXT: s_waitcnt lgkmcnt(5)
7508 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:5
7509 ; CHECK-NEXT: s_waitcnt lgkmcnt(4)
7510 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:4
7511 ; CHECK-NEXT: s_waitcnt lgkmcnt(3)
7512 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:3
7513 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
7514 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:2
7515 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7516 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:1
7517 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7518 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen
7519 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7521 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 16, i1 false)
7525 define void @memcpy_p5_p3_sz31_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
7526 ; CHECK-LABEL: memcpy_p5_p3_sz31_align_1_1:
7527 ; CHECK: ; %bb.0: ; %entry
7528 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7529 ; CHECK-NEXT: ds_read_u8 v2, v1
7530 ; CHECK-NEXT: ds_read_u8 v3, v1 offset:1
7531 ; CHECK-NEXT: ds_read_u8 v4, v1 offset:2
7532 ; CHECK-NEXT: ds_read_u8 v5, v1 offset:3
7533 ; CHECK-NEXT: ds_read_u8 v6, v1 offset:4
7534 ; CHECK-NEXT: ds_read_u8 v7, v1 offset:5
7535 ; CHECK-NEXT: ds_read_u8 v8, v1 offset:6
7536 ; CHECK-NEXT: ds_read_u8 v9, v1 offset:7
7537 ; CHECK-NEXT: ds_read_u8 v10, v1 offset:8
7538 ; CHECK-NEXT: ds_read_u8 v11, v1 offset:9
7539 ; CHECK-NEXT: ds_read_u8 v12, v1 offset:10
7540 ; CHECK-NEXT: ds_read_u8 v13, v1 offset:11
7541 ; CHECK-NEXT: ds_read_u8 v14, v1 offset:12
7542 ; CHECK-NEXT: ds_read_u8 v15, v1 offset:13
7543 ; CHECK-NEXT: ds_read_u8 v16, v1 offset:14
7544 ; CHECK-NEXT: ds_read_u8 v17, v1 offset:15
7545 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
7546 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen
7547 ; CHECK-NEXT: s_waitcnt lgkmcnt(14)
7548 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:1
7549 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
7550 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:2
7551 ; CHECK-NEXT: ds_read_u8 v2, v1 offset:24
7552 ; CHECK-NEXT: ds_read_u8 v3, v1 offset:25
7553 ; CHECK-NEXT: ds_read_u8 v4, v1 offset:26
7554 ; CHECK-NEXT: ds_read_u8 v18, v1 offset:27
7555 ; CHECK-NEXT: ds_read_u8 v19, v1 offset:28
7556 ; CHECK-NEXT: ds_read_u8 v20, v1 offset:29
7557 ; CHECK-NEXT: ds_read_u8 v21, v1 offset:30
7558 ; CHECK-NEXT: ds_read_u8 v22, v1 offset:16
7559 ; CHECK-NEXT: ds_read_u8 v23, v1 offset:17
7560 ; CHECK-NEXT: ds_read_u8 v24, v1 offset:18
7561 ; CHECK-NEXT: ds_read_u8 v25, v1 offset:19
7562 ; CHECK-NEXT: ds_read_u8 v26, v1 offset:20
7563 ; CHECK-NEXT: ds_read_u8 v27, v1 offset:21
7564 ; CHECK-NEXT: ds_read_u8 v28, v1 offset:22
7565 ; CHECK-NEXT: ds_read_u8 v1, v1 offset:23
7566 ; CHECK-NEXT: s_waitcnt lgkmcnt(27)
7567 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:3
7568 ; CHECK-NEXT: s_waitcnt lgkmcnt(26)
7569 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:4
7570 ; CHECK-NEXT: s_waitcnt lgkmcnt(25)
7571 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:5
7572 ; CHECK-NEXT: s_waitcnt lgkmcnt(24)
7573 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:6
7574 ; CHECK-NEXT: s_waitcnt lgkmcnt(23)
7575 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:7
7576 ; CHECK-NEXT: s_waitcnt lgkmcnt(22)
7577 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
7578 ; CHECK-NEXT: s_waitcnt lgkmcnt(21)
7579 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:9
7580 ; CHECK-NEXT: s_waitcnt lgkmcnt(20)
7581 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:10
7582 ; CHECK-NEXT: s_waitcnt lgkmcnt(19)
7583 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:11
7584 ; CHECK-NEXT: s_waitcnt lgkmcnt(18)
7585 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:12
7586 ; CHECK-NEXT: s_waitcnt lgkmcnt(17)
7587 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:13
7588 ; CHECK-NEXT: s_waitcnt lgkmcnt(16)
7589 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:14
7590 ; CHECK-NEXT: s_waitcnt lgkmcnt(8)
7591 ; CHECK-NEXT: buffer_store_byte v21, v0, s[0:3], 0 offen offset:30
7592 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:29
7593 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:28
7594 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:27
7595 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:26
7596 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:25
7597 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:24
7598 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7599 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:23
7600 ; CHECK-NEXT: buffer_store_byte v28, v0, s[0:3], 0 offen offset:22
7601 ; CHECK-NEXT: buffer_store_byte v27, v0, s[0:3], 0 offen offset:21
7602 ; CHECK-NEXT: buffer_store_byte v26, v0, s[0:3], 0 offen offset:20
7603 ; CHECK-NEXT: buffer_store_byte v25, v0, s[0:3], 0 offen offset:19
7604 ; CHECK-NEXT: buffer_store_byte v24, v0, s[0:3], 0 offen offset:18
7605 ; CHECK-NEXT: buffer_store_byte v23, v0, s[0:3], 0 offen offset:17
7606 ; CHECK-NEXT: buffer_store_byte v22, v0, s[0:3], 0 offen offset:16
7607 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:15
7608 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7610 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 31, i1 false)
7614 define void @memcpy_p5_p3_sz32_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(3) align 1 readonly %src) {
7615 ; CHECK-LABEL: memcpy_p5_p3_sz32_align_1_1:
7616 ; CHECK: ; %bb.0: ; %entry
7617 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7618 ; CHECK-NEXT: ds_read_u8 v2, v1 offset:15
7619 ; CHECK-NEXT: ds_read_u8 v3, v1 offset:14
7620 ; CHECK-NEXT: ds_read_u8 v4, v1 offset:13
7621 ; CHECK-NEXT: ds_read_u8 v5, v1 offset:12
7622 ; CHECK-NEXT: ds_read_u8 v6, v1 offset:11
7623 ; CHECK-NEXT: ds_read_u8 v7, v1 offset:8
7624 ; CHECK-NEXT: ds_read_u8 v8, v1 offset:9
7625 ; CHECK-NEXT: ds_read_u8 v9, v1 offset:10
7626 ; CHECK-NEXT: ds_read_u8 v10, v1
7627 ; CHECK-NEXT: ds_read_u8 v11, v1 offset:1
7628 ; CHECK-NEXT: ds_read_u8 v12, v1 offset:2
7629 ; CHECK-NEXT: ds_read_u8 v13, v1 offset:3
7630 ; CHECK-NEXT: ds_read_u8 v14, v1 offset:4
7631 ; CHECK-NEXT: ds_read_u8 v15, v1 offset:5
7632 ; CHECK-NEXT: ds_read_u8 v16, v1 offset:6
7633 ; CHECK-NEXT: ds_read_u8 v17, v1 offset:7
7634 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
7635 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:15
7636 ; CHECK-NEXT: s_waitcnt lgkmcnt(14)
7637 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:14
7638 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
7639 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:13
7640 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
7641 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:12
7642 ; CHECK-NEXT: s_waitcnt lgkmcnt(11)
7643 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:11
7644 ; CHECK-NEXT: ds_read_u8 v2, v1 offset:24
7645 ; CHECK-NEXT: ds_read_u8 v3, v1 offset:25
7646 ; CHECK-NEXT: ds_read_u8 v4, v1 offset:26
7647 ; CHECK-NEXT: ds_read_u8 v5, v1 offset:27
7648 ; CHECK-NEXT: ds_read_u8 v6, v1 offset:28
7649 ; CHECK-NEXT: ds_read_u8 v18, v1 offset:29
7650 ; CHECK-NEXT: ds_read_u8 v19, v1 offset:30
7651 ; CHECK-NEXT: ds_read_u8 v20, v1 offset:31
7652 ; CHECK-NEXT: ds_read_u8 v21, v1 offset:16
7653 ; CHECK-NEXT: ds_read_u8 v22, v1 offset:17
7654 ; CHECK-NEXT: ds_read_u8 v23, v1 offset:18
7655 ; CHECK-NEXT: ds_read_u8 v24, v1 offset:19
7656 ; CHECK-NEXT: ds_read_u8 v25, v1 offset:20
7657 ; CHECK-NEXT: ds_read_u8 v26, v1 offset:21
7658 ; CHECK-NEXT: ds_read_u8 v27, v1 offset:22
7659 ; CHECK-NEXT: ds_read_u8 v1, v1 offset:23
7660 ; CHECK-NEXT: s_waitcnt lgkmcnt(24)
7661 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:10
7662 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:9
7663 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:8
7664 ; CHECK-NEXT: s_waitcnt lgkmcnt(16)
7665 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:7
7666 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:6
7667 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:5
7668 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
7669 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:3
7670 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:2
7671 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:1
7672 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen
7673 ; CHECK-NEXT: s_waitcnt lgkmcnt(8)
7674 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:31
7675 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:30
7676 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:29
7677 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:28
7678 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:27
7679 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:26
7680 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:25
7681 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:24
7682 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7683 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:23
7684 ; CHECK-NEXT: buffer_store_byte v27, v0, s[0:3], 0 offen offset:22
7685 ; CHECK-NEXT: buffer_store_byte v26, v0, s[0:3], 0 offen offset:21
7686 ; CHECK-NEXT: buffer_store_byte v25, v0, s[0:3], 0 offen offset:20
7687 ; CHECK-NEXT: buffer_store_byte v24, v0, s[0:3], 0 offen offset:19
7688 ; CHECK-NEXT: buffer_store_byte v23, v0, s[0:3], 0 offen offset:18
7689 ; CHECK-NEXT: buffer_store_byte v22, v0, s[0:3], 0 offen offset:17
7690 ; CHECK-NEXT: buffer_store_byte v21, v0, s[0:3], 0 offen offset:16
7691 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7693 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(3) noundef nonnull align 1 %src, i64 32, i1 false)
7697 define void @memcpy_p5_p3_sz16_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
7698 ; CHECK-LABEL: memcpy_p5_p3_sz16_align_2_2:
7699 ; CHECK: ; %bb.0: ; %entry
7700 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7701 ; CHECK-NEXT: ds_read_u16 v2, v1
7702 ; CHECK-NEXT: ds_read_u16 v3, v1 offset:2
7703 ; CHECK-NEXT: ds_read_u16 v4, v1 offset:4
7704 ; CHECK-NEXT: ds_read_u16 v5, v1 offset:6
7705 ; CHECK-NEXT: ds_read_u16 v6, v1 offset:8
7706 ; CHECK-NEXT: ds_read_u16 v7, v1 offset:10
7707 ; CHECK-NEXT: ds_read_u16 v8, v1 offset:12
7708 ; CHECK-NEXT: ds_read_u16 v1, v1 offset:14
7709 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
7710 ; CHECK-NEXT: buffer_store_short v2, v0, s[0:3], 0 offen
7711 ; CHECK-NEXT: s_waitcnt lgkmcnt(6)
7712 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:2
7713 ; CHECK-NEXT: s_waitcnt lgkmcnt(5)
7714 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:4
7715 ; CHECK-NEXT: s_waitcnt lgkmcnt(4)
7716 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:6
7717 ; CHECK-NEXT: s_waitcnt lgkmcnt(3)
7718 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:8
7719 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
7720 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:10
7721 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7722 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:12
7723 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7724 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen offset:14
7725 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7727 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 16, i1 false)
7731 define void @memcpy_p5_p3_sz31_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
7732 ; CHECK-LABEL: memcpy_p5_p3_sz31_align_2_2:
7733 ; CHECK: ; %bb.0: ; %entry
7734 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7735 ; CHECK-NEXT: ds_read_u8 v2, v1 offset:30
7736 ; CHECK-NEXT: ds_read_u16 v3, v1 offset:28
7737 ; CHECK-NEXT: ds_read_u16 v4, v1 offset:26
7738 ; CHECK-NEXT: ds_read_u16 v5, v1 offset:24
7739 ; CHECK-NEXT: ds_read_u16 v6, v1 offset:22
7740 ; CHECK-NEXT: ds_read_u16 v7, v1 offset:20
7741 ; CHECK-NEXT: ds_read_u16 v8, v1 offset:18
7742 ; CHECK-NEXT: ds_read_u16 v9, v1 offset:16
7743 ; CHECK-NEXT: ds_read_u16 v10, v1 offset:14
7744 ; CHECK-NEXT: ds_read_u16 v11, v1 offset:12
7745 ; CHECK-NEXT: ds_read_u16 v12, v1 offset:10
7746 ; CHECK-NEXT: ds_read_u16 v13, v1 offset:8
7747 ; CHECK-NEXT: ds_read_u16 v14, v1 offset:6
7748 ; CHECK-NEXT: ds_read_u16 v15, v1 offset:4
7749 ; CHECK-NEXT: ds_read_u16 v16, v1 offset:2
7750 ; CHECK-NEXT: ds_read_u16 v1, v1
7751 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
7752 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:30
7753 ; CHECK-NEXT: s_waitcnt lgkmcnt(14)
7754 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:28
7755 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
7756 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:26
7757 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
7758 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:24
7759 ; CHECK-NEXT: s_waitcnt lgkmcnt(11)
7760 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:22
7761 ; CHECK-NEXT: s_waitcnt lgkmcnt(10)
7762 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:20
7763 ; CHECK-NEXT: s_waitcnt lgkmcnt(9)
7764 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:18
7765 ; CHECK-NEXT: s_waitcnt lgkmcnt(8)
7766 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:16
7767 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
7768 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:14
7769 ; CHECK-NEXT: s_waitcnt lgkmcnt(6)
7770 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:12
7771 ; CHECK-NEXT: s_waitcnt lgkmcnt(5)
7772 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:10
7773 ; CHECK-NEXT: s_waitcnt lgkmcnt(4)
7774 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:8
7775 ; CHECK-NEXT: s_waitcnt lgkmcnt(3)
7776 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:6
7777 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
7778 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:4
7779 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7780 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:2
7781 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7782 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
7783 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7785 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 31, i1 false)
7789 define void @memcpy_p5_p3_sz32_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(3) align 2 readonly %src) {
7790 ; CHECK-LABEL: memcpy_p5_p3_sz32_align_2_2:
7791 ; CHECK: ; %bb.0: ; %entry
7792 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7793 ; CHECK-NEXT: ds_read_u16 v2, v1 offset:30
7794 ; CHECK-NEXT: ds_read_u16 v3, v1 offset:28
7795 ; CHECK-NEXT: ds_read_u16 v4, v1 offset:26
7796 ; CHECK-NEXT: ds_read_u16 v5, v1 offset:24
7797 ; CHECK-NEXT: ds_read_u16 v6, v1 offset:22
7798 ; CHECK-NEXT: ds_read_u16 v7, v1 offset:20
7799 ; CHECK-NEXT: ds_read_u16 v8, v1 offset:18
7800 ; CHECK-NEXT: ds_read_u16 v9, v1 offset:16
7801 ; CHECK-NEXT: ds_read_u16 v10, v1 offset:14
7802 ; CHECK-NEXT: ds_read_u16 v11, v1 offset:12
7803 ; CHECK-NEXT: ds_read_u16 v12, v1 offset:10
7804 ; CHECK-NEXT: ds_read_u16 v13, v1 offset:8
7805 ; CHECK-NEXT: ds_read_u16 v14, v1 offset:6
7806 ; CHECK-NEXT: ds_read_u16 v15, v1 offset:4
7807 ; CHECK-NEXT: ds_read_u16 v16, v1 offset:2
7808 ; CHECK-NEXT: ds_read_u16 v1, v1
7809 ; CHECK-NEXT: s_waitcnt lgkmcnt(15)
7810 ; CHECK-NEXT: buffer_store_short v2, v0, s[0:3], 0 offen offset:30
7811 ; CHECK-NEXT: s_waitcnt lgkmcnt(14)
7812 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:28
7813 ; CHECK-NEXT: s_waitcnt lgkmcnt(13)
7814 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:26
7815 ; CHECK-NEXT: s_waitcnt lgkmcnt(12)
7816 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:24
7817 ; CHECK-NEXT: s_waitcnt lgkmcnt(11)
7818 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:22
7819 ; CHECK-NEXT: s_waitcnt lgkmcnt(10)
7820 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:20
7821 ; CHECK-NEXT: s_waitcnt lgkmcnt(9)
7822 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:18
7823 ; CHECK-NEXT: s_waitcnt lgkmcnt(8)
7824 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:16
7825 ; CHECK-NEXT: s_waitcnt lgkmcnt(7)
7826 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:14
7827 ; CHECK-NEXT: s_waitcnt lgkmcnt(6)
7828 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:12
7829 ; CHECK-NEXT: s_waitcnt lgkmcnt(5)
7830 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:10
7831 ; CHECK-NEXT: s_waitcnt lgkmcnt(4)
7832 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:8
7833 ; CHECK-NEXT: s_waitcnt lgkmcnt(3)
7834 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:6
7835 ; CHECK-NEXT: s_waitcnt lgkmcnt(2)
7836 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:4
7837 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7838 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:2
7839 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7840 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
7841 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7843 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(3) noundef nonnull align 2 %src, i64 32, i1 false)
7847 define void @memcpy_p5_p3_sz16_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
7848 ; CHECK-LABEL: memcpy_p5_p3_sz16_align_8_8:
7849 ; CHECK: ; %bb.0: ; %entry
7850 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7851 ; CHECK-NEXT: ds_read2_b64 v[1:4], v1 offset1:1
7852 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7853 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
7854 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
7855 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
7856 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
7857 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7859 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 16, i1 false)
7863 define void @memcpy_p5_p3_sz31_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
7864 ; CHECK-LABEL: memcpy_p5_p3_sz31_align_8_8:
7865 ; CHECK: ; %bb.0: ; %entry
7866 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7867 ; CHECK-NEXT: ds_read2_b64 v[2:5], v1 offset1:1
7868 ; CHECK-NEXT: ds_read_b128 v[6:9], v1 offset:15
7869 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7870 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:12
7871 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:8
7872 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:4
7873 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen
7874 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7875 ; CHECK-NEXT: buffer_store_byte_d16_hi v6, v0, s[0:3], 0 offen offset:17
7876 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:15
7877 ; CHECK-NEXT: buffer_store_byte_d16_hi v7, v0, s[0:3], 0 offen offset:21
7878 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:19
7879 ; CHECK-NEXT: buffer_store_byte_d16_hi v8, v0, s[0:3], 0 offen offset:25
7880 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:23
7881 ; CHECK-NEXT: buffer_store_byte_d16_hi v9, v0, s[0:3], 0 offen offset:29
7882 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:27
7883 ; CHECK-NEXT: v_lshrrev_b32_e32 v1, 24, v6
7884 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v6
7885 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 24, v7
7886 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v7
7887 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v8
7888 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 8, v8
7889 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v9
7890 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 8, v9
7891 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
7892 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:16
7893 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:22
7894 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:20
7895 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:26
7896 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:24
7897 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:30
7898 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:28
7899 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7901 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 31, i1 false)
7905 define void @memcpy_p5_p3_sz32_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(3) align 8 readonly %src) {
7906 ; CHECK-LABEL: memcpy_p5_p3_sz32_align_8_8:
7907 ; CHECK: ; %bb.0: ; %entry
7908 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7909 ; CHECK-NEXT: ds_read2_b64 v[2:5], v1 offset1:1
7910 ; CHECK-NEXT: ds_read2_b64 v[6:9], v1 offset0:2 offset1:3
7911 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7912 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:12
7913 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:8
7914 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:4
7915 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen
7916 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7917 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:28
7918 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:24
7919 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:20
7920 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:16
7921 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7923 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(3) noundef nonnull align 8 %src, i64 32, i1 false)
7927 define void @memcpy_p5_p3_sz16_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
7928 ; CHECK-LABEL: memcpy_p5_p3_sz16_align_16_16:
7929 ; CHECK: ; %bb.0: ; %entry
7930 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7931 ; CHECK-NEXT: ds_read_b128 v[1:4], v1
7932 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7933 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
7934 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
7935 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
7936 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
7937 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7939 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 16, i1 false)
7943 define void @memcpy_p5_p3_sz31_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
7944 ; CHECK-LABEL: memcpy_p5_p3_sz31_align_16_16:
7945 ; CHECK: ; %bb.0: ; %entry
7946 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7947 ; CHECK-NEXT: ds_read_b128 v[2:5], v1
7948 ; CHECK-NEXT: ds_read_b128 v[6:9], v1 offset:15
7949 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7950 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:12
7951 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:8
7952 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:4
7953 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen
7954 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7955 ; CHECK-NEXT: buffer_store_byte_d16_hi v6, v0, s[0:3], 0 offen offset:17
7956 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:15
7957 ; CHECK-NEXT: buffer_store_byte_d16_hi v7, v0, s[0:3], 0 offen offset:21
7958 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:19
7959 ; CHECK-NEXT: buffer_store_byte_d16_hi v8, v0, s[0:3], 0 offen offset:25
7960 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:23
7961 ; CHECK-NEXT: buffer_store_byte_d16_hi v9, v0, s[0:3], 0 offen offset:29
7962 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:27
7963 ; CHECK-NEXT: v_lshrrev_b32_e32 v1, 24, v6
7964 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v6
7965 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 24, v7
7966 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v7
7967 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v8
7968 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 8, v8
7969 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v9
7970 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 8, v9
7971 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
7972 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:16
7973 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:22
7974 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:20
7975 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:26
7976 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:24
7977 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:30
7978 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:28
7979 ; CHECK-NEXT: s_setpc_b64 s[30:31]
7981 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 31, i1 false)
7985 define void @memcpy_p5_p3_sz32_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(3) align 16 readonly %src) {
7986 ; CHECK-LABEL: memcpy_p5_p3_sz32_align_16_16:
7987 ; CHECK: ; %bb.0: ; %entry
7988 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
7989 ; CHECK-NEXT: ds_read_b128 v[2:5], v1
7990 ; CHECK-NEXT: ds_read_b128 v[6:9], v1 offset:16
7991 ; CHECK-NEXT: s_waitcnt lgkmcnt(1)
7992 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:12
7993 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:8
7994 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:4
7995 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen
7996 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
7997 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:28
7998 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:24
7999 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:20
8000 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:16
8001 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8003 tail call void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(3) noundef nonnull align 16 %src, i64 32, i1 false)
8007 define void @memcpy_p5_p4_sz16_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
8008 ; CHECK-LABEL: memcpy_p5_p4_sz16_align_1_1:
8009 ; CHECK: ; %bb.0: ; %entry
8010 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8011 ; CHECK-NEXT: s_clause 0xf
8012 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off offset:15
8013 ; CHECK-NEXT: global_load_ubyte v4, v[1:2], off offset:14
8014 ; CHECK-NEXT: global_load_ubyte v5, v[1:2], off offset:13
8015 ; CHECK-NEXT: global_load_ubyte v6, v[1:2], off offset:12
8016 ; CHECK-NEXT: global_load_ubyte v7, v[1:2], off offset:11
8017 ; CHECK-NEXT: global_load_ubyte v8, v[1:2], off offset:10
8018 ; CHECK-NEXT: global_load_ubyte v9, v[1:2], off offset:9
8019 ; CHECK-NEXT: global_load_ubyte v10, v[1:2], off offset:8
8020 ; CHECK-NEXT: global_load_ubyte v11, v[1:2], off offset:7
8021 ; CHECK-NEXT: global_load_ubyte v12, v[1:2], off offset:6
8022 ; CHECK-NEXT: global_load_ubyte v13, v[1:2], off offset:5
8023 ; CHECK-NEXT: global_load_ubyte v14, v[1:2], off offset:4
8024 ; CHECK-NEXT: global_load_ubyte v15, v[1:2], off offset:3
8025 ; CHECK-NEXT: global_load_ubyte v16, v[1:2], off offset:2
8026 ; CHECK-NEXT: global_load_ubyte v17, v[1:2], off offset:1
8027 ; CHECK-NEXT: global_load_ubyte v1, v[1:2], off
8028 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8029 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:15
8030 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8031 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:14
8032 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8033 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:13
8034 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8035 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:12
8036 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8037 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:11
8038 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8039 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:10
8040 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8041 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:9
8042 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8043 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
8044 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8045 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:7
8046 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8047 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:6
8048 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8049 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:5
8050 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8051 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
8052 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8053 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:3
8054 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8055 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:2
8056 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8057 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:1
8058 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8059 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen
8060 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8062 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 16, i1 false)
8066 define void @memcpy_p5_p4_sz31_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
8067 ; CHECK-LABEL: memcpy_p5_p4_sz31_align_1_1:
8068 ; CHECK: ; %bb.0: ; %entry
8069 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8070 ; CHECK-NEXT: s_clause 0x1e
8071 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off
8072 ; CHECK-NEXT: global_load_ubyte v4, v[1:2], off offset:1
8073 ; CHECK-NEXT: global_load_ubyte v5, v[1:2], off offset:2
8074 ; CHECK-NEXT: global_load_ubyte v6, v[1:2], off offset:3
8075 ; CHECK-NEXT: global_load_ubyte v7, v[1:2], off offset:4
8076 ; CHECK-NEXT: global_load_ubyte v8, v[1:2], off offset:5
8077 ; CHECK-NEXT: global_load_ubyte v9, v[1:2], off offset:6
8078 ; CHECK-NEXT: global_load_ubyte v10, v[1:2], off offset:7
8079 ; CHECK-NEXT: global_load_ubyte v11, v[1:2], off offset:8
8080 ; CHECK-NEXT: global_load_ubyte v12, v[1:2], off offset:9
8081 ; CHECK-NEXT: global_load_ubyte v13, v[1:2], off offset:10
8082 ; CHECK-NEXT: global_load_ubyte v14, v[1:2], off offset:11
8083 ; CHECK-NEXT: global_load_ubyte v15, v[1:2], off offset:12
8084 ; CHECK-NEXT: global_load_ubyte v16, v[1:2], off offset:13
8085 ; CHECK-NEXT: global_load_ubyte v17, v[1:2], off offset:14
8086 ; CHECK-NEXT: global_load_ubyte v18, v[1:2], off offset:30
8087 ; CHECK-NEXT: global_load_ubyte v19, v[1:2], off offset:29
8088 ; CHECK-NEXT: global_load_ubyte v20, v[1:2], off offset:28
8089 ; CHECK-NEXT: global_load_ubyte v21, v[1:2], off offset:27
8090 ; CHECK-NEXT: global_load_ubyte v22, v[1:2], off offset:26
8091 ; CHECK-NEXT: global_load_ubyte v23, v[1:2], off offset:25
8092 ; CHECK-NEXT: global_load_ubyte v24, v[1:2], off offset:24
8093 ; CHECK-NEXT: global_load_ubyte v25, v[1:2], off offset:23
8094 ; CHECK-NEXT: global_load_ubyte v26, v[1:2], off offset:22
8095 ; CHECK-NEXT: global_load_ubyte v27, v[1:2], off offset:21
8096 ; CHECK-NEXT: global_load_ubyte v28, v[1:2], off offset:20
8097 ; CHECK-NEXT: global_load_ubyte v29, v[1:2], off offset:19
8098 ; CHECK-NEXT: global_load_ubyte v30, v[1:2], off offset:18
8099 ; CHECK-NEXT: global_load_ubyte v31, v[1:2], off offset:17
8100 ; CHECK-NEXT: global_load_ubyte v32, v[1:2], off offset:16
8101 ; CHECK-NEXT: global_load_ubyte v1, v[1:2], off offset:15
8102 ; CHECK-NEXT: s_waitcnt vmcnt(30)
8103 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen
8104 ; CHECK-NEXT: s_waitcnt vmcnt(29)
8105 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:1
8106 ; CHECK-NEXT: s_waitcnt vmcnt(28)
8107 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:2
8108 ; CHECK-NEXT: s_waitcnt vmcnt(27)
8109 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:3
8110 ; CHECK-NEXT: s_waitcnt vmcnt(26)
8111 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:4
8112 ; CHECK-NEXT: s_waitcnt vmcnt(25)
8113 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:5
8114 ; CHECK-NEXT: s_waitcnt vmcnt(24)
8115 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:6
8116 ; CHECK-NEXT: s_waitcnt vmcnt(23)
8117 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:7
8118 ; CHECK-NEXT: s_waitcnt vmcnt(22)
8119 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:8
8120 ; CHECK-NEXT: s_waitcnt vmcnt(21)
8121 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:9
8122 ; CHECK-NEXT: s_waitcnt vmcnt(20)
8123 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:10
8124 ; CHECK-NEXT: s_waitcnt vmcnt(19)
8125 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:11
8126 ; CHECK-NEXT: s_waitcnt vmcnt(18)
8127 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:12
8128 ; CHECK-NEXT: s_waitcnt vmcnt(17)
8129 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:13
8130 ; CHECK-NEXT: s_waitcnt vmcnt(16)
8131 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:14
8132 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8133 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:30
8134 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8135 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:29
8136 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8137 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:28
8138 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8139 ; CHECK-NEXT: buffer_store_byte v21, v0, s[0:3], 0 offen offset:27
8140 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8141 ; CHECK-NEXT: buffer_store_byte v22, v0, s[0:3], 0 offen offset:26
8142 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8143 ; CHECK-NEXT: buffer_store_byte v23, v0, s[0:3], 0 offen offset:25
8144 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8145 ; CHECK-NEXT: buffer_store_byte v24, v0, s[0:3], 0 offen offset:24
8146 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8147 ; CHECK-NEXT: buffer_store_byte v25, v0, s[0:3], 0 offen offset:23
8148 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8149 ; CHECK-NEXT: buffer_store_byte v26, v0, s[0:3], 0 offen offset:22
8150 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8151 ; CHECK-NEXT: buffer_store_byte v27, v0, s[0:3], 0 offen offset:21
8152 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8153 ; CHECK-NEXT: buffer_store_byte v28, v0, s[0:3], 0 offen offset:20
8154 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8155 ; CHECK-NEXT: buffer_store_byte v29, v0, s[0:3], 0 offen offset:19
8156 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8157 ; CHECK-NEXT: buffer_store_byte v30, v0, s[0:3], 0 offen offset:18
8158 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8159 ; CHECK-NEXT: buffer_store_byte v31, v0, s[0:3], 0 offen offset:17
8160 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8161 ; CHECK-NEXT: buffer_store_byte v32, v0, s[0:3], 0 offen offset:16
8162 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8163 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:15
8164 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8166 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 31, i1 false)
8170 define void @memcpy_p5_p4_sz32_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(4) align 1 readonly %src) {
8171 ; CHECK-LABEL: memcpy_p5_p4_sz32_align_1_1:
8172 ; CHECK: ; %bb.0: ; %entry
8173 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8174 ; CHECK-NEXT: s_clause 0x1f
8175 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off offset:15
8176 ; CHECK-NEXT: global_load_ubyte v4, v[1:2], off offset:14
8177 ; CHECK-NEXT: global_load_ubyte v5, v[1:2], off offset:13
8178 ; CHECK-NEXT: global_load_ubyte v6, v[1:2], off offset:12
8179 ; CHECK-NEXT: global_load_ubyte v7, v[1:2], off offset:11
8180 ; CHECK-NEXT: global_load_ubyte v8, v[1:2], off offset:10
8181 ; CHECK-NEXT: global_load_ubyte v9, v[1:2], off offset:9
8182 ; CHECK-NEXT: global_load_ubyte v10, v[1:2], off offset:8
8183 ; CHECK-NEXT: global_load_ubyte v11, v[1:2], off offset:7
8184 ; CHECK-NEXT: global_load_ubyte v12, v[1:2], off offset:6
8185 ; CHECK-NEXT: global_load_ubyte v13, v[1:2], off offset:5
8186 ; CHECK-NEXT: global_load_ubyte v14, v[1:2], off offset:4
8187 ; CHECK-NEXT: global_load_ubyte v15, v[1:2], off offset:3
8188 ; CHECK-NEXT: global_load_ubyte v16, v[1:2], off offset:2
8189 ; CHECK-NEXT: global_load_ubyte v17, v[1:2], off offset:1
8190 ; CHECK-NEXT: global_load_ubyte v18, v[1:2], off
8191 ; CHECK-NEXT: global_load_ubyte v19, v[1:2], off offset:31
8192 ; CHECK-NEXT: global_load_ubyte v20, v[1:2], off offset:30
8193 ; CHECK-NEXT: global_load_ubyte v21, v[1:2], off offset:29
8194 ; CHECK-NEXT: global_load_ubyte v22, v[1:2], off offset:28
8195 ; CHECK-NEXT: global_load_ubyte v23, v[1:2], off offset:27
8196 ; CHECK-NEXT: global_load_ubyte v24, v[1:2], off offset:26
8197 ; CHECK-NEXT: global_load_ubyte v25, v[1:2], off offset:25
8198 ; CHECK-NEXT: global_load_ubyte v26, v[1:2], off offset:24
8199 ; CHECK-NEXT: global_load_ubyte v27, v[1:2], off offset:23
8200 ; CHECK-NEXT: global_load_ubyte v28, v[1:2], off offset:22
8201 ; CHECK-NEXT: global_load_ubyte v29, v[1:2], off offset:21
8202 ; CHECK-NEXT: global_load_ubyte v30, v[1:2], off offset:20
8203 ; CHECK-NEXT: global_load_ubyte v31, v[1:2], off offset:19
8204 ; CHECK-NEXT: global_load_ubyte v32, v[1:2], off offset:18
8205 ; CHECK-NEXT: global_load_ubyte v33, v[1:2], off offset:17
8206 ; CHECK-NEXT: global_load_ubyte v1, v[1:2], off offset:16
8207 ; CHECK-NEXT: s_waitcnt vmcnt(31)
8208 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:15
8209 ; CHECK-NEXT: s_waitcnt vmcnt(30)
8210 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:14
8211 ; CHECK-NEXT: s_waitcnt vmcnt(29)
8212 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:13
8213 ; CHECK-NEXT: s_waitcnt vmcnt(28)
8214 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:12
8215 ; CHECK-NEXT: s_waitcnt vmcnt(27)
8216 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:11
8217 ; CHECK-NEXT: s_waitcnt vmcnt(26)
8218 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:10
8219 ; CHECK-NEXT: s_waitcnt vmcnt(25)
8220 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:9
8221 ; CHECK-NEXT: s_waitcnt vmcnt(24)
8222 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:8
8223 ; CHECK-NEXT: s_waitcnt vmcnt(23)
8224 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:7
8225 ; CHECK-NEXT: s_waitcnt vmcnt(22)
8226 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:6
8227 ; CHECK-NEXT: s_waitcnt vmcnt(21)
8228 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:5
8229 ; CHECK-NEXT: s_waitcnt vmcnt(20)
8230 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:4
8231 ; CHECK-NEXT: s_waitcnt vmcnt(19)
8232 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:3
8233 ; CHECK-NEXT: s_waitcnt vmcnt(18)
8234 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:2
8235 ; CHECK-NEXT: s_waitcnt vmcnt(17)
8236 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:1
8237 ; CHECK-NEXT: s_waitcnt vmcnt(16)
8238 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen
8239 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8240 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:31
8241 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8242 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:30
8243 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8244 ; CHECK-NEXT: buffer_store_byte v21, v0, s[0:3], 0 offen offset:29
8245 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8246 ; CHECK-NEXT: buffer_store_byte v22, v0, s[0:3], 0 offen offset:28
8247 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8248 ; CHECK-NEXT: buffer_store_byte v23, v0, s[0:3], 0 offen offset:27
8249 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8250 ; CHECK-NEXT: buffer_store_byte v24, v0, s[0:3], 0 offen offset:26
8251 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8252 ; CHECK-NEXT: buffer_store_byte v25, v0, s[0:3], 0 offen offset:25
8253 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8254 ; CHECK-NEXT: buffer_store_byte v26, v0, s[0:3], 0 offen offset:24
8255 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8256 ; CHECK-NEXT: buffer_store_byte v27, v0, s[0:3], 0 offen offset:23
8257 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8258 ; CHECK-NEXT: buffer_store_byte v28, v0, s[0:3], 0 offen offset:22
8259 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8260 ; CHECK-NEXT: buffer_store_byte v29, v0, s[0:3], 0 offen offset:21
8261 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8262 ; CHECK-NEXT: buffer_store_byte v30, v0, s[0:3], 0 offen offset:20
8263 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8264 ; CHECK-NEXT: buffer_store_byte v31, v0, s[0:3], 0 offen offset:19
8265 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8266 ; CHECK-NEXT: buffer_store_byte v32, v0, s[0:3], 0 offen offset:18
8267 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8268 ; CHECK-NEXT: buffer_store_byte v33, v0, s[0:3], 0 offen offset:17
8269 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8270 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:16
8271 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8273 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(4) noundef nonnull align 1 %src, i64 32, i1 false)
8277 define void @memcpy_p5_p4_sz16_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
8278 ; CHECK-LABEL: memcpy_p5_p4_sz16_align_2_2:
8279 ; CHECK: ; %bb.0: ; %entry
8280 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8281 ; CHECK-NEXT: s_clause 0x7
8282 ; CHECK-NEXT: global_load_ushort v3, v[1:2], off
8283 ; CHECK-NEXT: global_load_ushort v4, v[1:2], off offset:2
8284 ; CHECK-NEXT: global_load_ushort v5, v[1:2], off offset:4
8285 ; CHECK-NEXT: global_load_ushort v6, v[1:2], off offset:6
8286 ; CHECK-NEXT: global_load_ushort v7, v[1:2], off offset:8
8287 ; CHECK-NEXT: global_load_ushort v8, v[1:2], off offset:10
8288 ; CHECK-NEXT: global_load_ushort v9, v[1:2], off offset:12
8289 ; CHECK-NEXT: global_load_ushort v1, v[1:2], off offset:14
8290 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8291 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen
8292 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8293 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:2
8294 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8295 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:4
8296 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8297 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:6
8298 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8299 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:8
8300 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8301 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:10
8302 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8303 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:12
8304 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8305 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen offset:14
8306 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8308 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 16, i1 false)
8312 define void @memcpy_p5_p4_sz31_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
8313 ; CHECK-LABEL: memcpy_p5_p4_sz31_align_2_2:
8314 ; CHECK: ; %bb.0: ; %entry
8315 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8316 ; CHECK-NEXT: s_clause 0xf
8317 ; CHECK-NEXT: global_load_ubyte v3, v[1:2], off offset:30
8318 ; CHECK-NEXT: global_load_ushort v4, v[1:2], off offset:28
8319 ; CHECK-NEXT: global_load_ushort v5, v[1:2], off offset:26
8320 ; CHECK-NEXT: global_load_ushort v6, v[1:2], off offset:24
8321 ; CHECK-NEXT: global_load_ushort v7, v[1:2], off offset:22
8322 ; CHECK-NEXT: global_load_ushort v8, v[1:2], off offset:20
8323 ; CHECK-NEXT: global_load_ushort v9, v[1:2], off offset:18
8324 ; CHECK-NEXT: global_load_ushort v10, v[1:2], off offset:16
8325 ; CHECK-NEXT: global_load_ushort v11, v[1:2], off offset:14
8326 ; CHECK-NEXT: global_load_ushort v12, v[1:2], off offset:12
8327 ; CHECK-NEXT: global_load_ushort v13, v[1:2], off offset:10
8328 ; CHECK-NEXT: global_load_ushort v14, v[1:2], off offset:8
8329 ; CHECK-NEXT: global_load_ushort v15, v[1:2], off offset:6
8330 ; CHECK-NEXT: global_load_ushort v16, v[1:2], off offset:4
8331 ; CHECK-NEXT: global_load_ushort v17, v[1:2], off offset:2
8332 ; CHECK-NEXT: global_load_ushort v1, v[1:2], off
8333 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8334 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:30
8335 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8336 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:28
8337 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8338 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:26
8339 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8340 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:24
8341 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8342 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:22
8343 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8344 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:20
8345 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8346 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:18
8347 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8348 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:16
8349 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8350 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:14
8351 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8352 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:12
8353 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8354 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:10
8355 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8356 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:8
8357 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8358 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:6
8359 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8360 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:4
8361 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8362 ; CHECK-NEXT: buffer_store_short v17, v0, s[0:3], 0 offen offset:2
8363 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8364 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
8365 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8367 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 31, i1 false)
8371 define void @memcpy_p5_p4_sz32_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(4) align 2 readonly %src) {
8372 ; CHECK-LABEL: memcpy_p5_p4_sz32_align_2_2:
8373 ; CHECK: ; %bb.0: ; %entry
8374 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8375 ; CHECK-NEXT: s_clause 0xf
8376 ; CHECK-NEXT: global_load_ushort v3, v[1:2], off offset:30
8377 ; CHECK-NEXT: global_load_ushort v4, v[1:2], off offset:28
8378 ; CHECK-NEXT: global_load_ushort v5, v[1:2], off offset:26
8379 ; CHECK-NEXT: global_load_ushort v6, v[1:2], off offset:24
8380 ; CHECK-NEXT: global_load_ushort v7, v[1:2], off offset:22
8381 ; CHECK-NEXT: global_load_ushort v8, v[1:2], off offset:20
8382 ; CHECK-NEXT: global_load_ushort v9, v[1:2], off offset:18
8383 ; CHECK-NEXT: global_load_ushort v10, v[1:2], off offset:16
8384 ; CHECK-NEXT: global_load_ushort v11, v[1:2], off offset:14
8385 ; CHECK-NEXT: global_load_ushort v12, v[1:2], off offset:12
8386 ; CHECK-NEXT: global_load_ushort v13, v[1:2], off offset:10
8387 ; CHECK-NEXT: global_load_ushort v14, v[1:2], off offset:8
8388 ; CHECK-NEXT: global_load_ushort v15, v[1:2], off offset:6
8389 ; CHECK-NEXT: global_load_ushort v16, v[1:2], off offset:4
8390 ; CHECK-NEXT: global_load_ushort v17, v[1:2], off offset:2
8391 ; CHECK-NEXT: global_load_ushort v1, v[1:2], off
8392 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8393 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:30
8394 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8395 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:28
8396 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8397 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:26
8398 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8399 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:24
8400 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8401 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:22
8402 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8403 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:20
8404 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8405 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:18
8406 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8407 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:16
8408 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8409 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:14
8410 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8411 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:12
8412 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8413 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:10
8414 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8415 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:8
8416 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8417 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:6
8418 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8419 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:4
8420 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8421 ; CHECK-NEXT: buffer_store_short v17, v0, s[0:3], 0 offen offset:2
8422 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8423 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
8424 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8426 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(4) noundef nonnull align 2 %src, i64 32, i1 false)
8430 define void @memcpy_p5_p4_sz16_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
8431 ; CHECK-LABEL: memcpy_p5_p4_sz16_align_8_8:
8432 ; CHECK: ; %bb.0: ; %entry
8433 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8434 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
8435 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8436 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
8437 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
8438 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
8439 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
8440 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8442 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 16, i1 false)
8446 define void @memcpy_p5_p4_sz31_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
8447 ; CHECK-LABEL: memcpy_p5_p4_sz31_align_8_8:
8448 ; CHECK: ; %bb.0: ; %entry
8449 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8450 ; CHECK-NEXT: s_clause 0x1
8451 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
8452 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
8453 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8454 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
8455 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
8456 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
8457 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
8458 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8459 ; CHECK-NEXT: buffer_store_byte_d16_hi v7, v0, s[0:3], 0 offen offset:17
8460 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:15
8461 ; CHECK-NEXT: buffer_store_byte_d16_hi v8, v0, s[0:3], 0 offen offset:21
8462 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:19
8463 ; CHECK-NEXT: buffer_store_byte_d16_hi v9, v0, s[0:3], 0 offen offset:25
8464 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:23
8465 ; CHECK-NEXT: buffer_store_byte_d16_hi v10, v0, s[0:3], 0 offen offset:29
8466 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:27
8467 ; CHECK-NEXT: v_lshrrev_b32_e32 v1, 24, v7
8468 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v7
8469 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 24, v8
8470 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v8
8471 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v9
8472 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 8, v9
8473 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v10
8474 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 8, v10
8475 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
8476 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:16
8477 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:22
8478 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:20
8479 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:26
8480 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:24
8481 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:30
8482 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:28
8483 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8485 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 31, i1 false)
8489 define void @memcpy_p5_p4_sz32_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(4) align 8 readonly %src) {
8490 ; CHECK-LABEL: memcpy_p5_p4_sz32_align_8_8:
8491 ; CHECK: ; %bb.0: ; %entry
8492 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8493 ; CHECK-NEXT: s_clause 0x1
8494 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
8495 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
8496 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8497 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
8498 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
8499 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
8500 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
8501 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8502 ; CHECK-NEXT: buffer_store_dword v10, v0, s[0:3], 0 offen offset:28
8503 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:24
8504 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:20
8505 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:16
8506 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8508 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(4) noundef nonnull align 8 %src, i64 32, i1 false)
8512 define void @memcpy_p5_p4_sz16_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
8513 ; CHECK-LABEL: memcpy_p5_p4_sz16_align_16_16:
8514 ; CHECK: ; %bb.0: ; %entry
8515 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8516 ; CHECK-NEXT: global_load_dwordx4 v[1:4], v[1:2], off
8517 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8518 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:12
8519 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:8
8520 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:4
8521 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen
8522 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8524 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 16, i1 false)
8528 define void @memcpy_p5_p4_sz31_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
8529 ; CHECK-LABEL: memcpy_p5_p4_sz31_align_16_16:
8530 ; CHECK: ; %bb.0: ; %entry
8531 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8532 ; CHECK-NEXT: s_clause 0x1
8533 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
8534 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:15
8535 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8536 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
8537 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
8538 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
8539 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
8540 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8541 ; CHECK-NEXT: buffer_store_byte_d16_hi v7, v0, s[0:3], 0 offen offset:17
8542 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:15
8543 ; CHECK-NEXT: buffer_store_byte_d16_hi v8, v0, s[0:3], 0 offen offset:21
8544 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:19
8545 ; CHECK-NEXT: buffer_store_byte_d16_hi v9, v0, s[0:3], 0 offen offset:25
8546 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:23
8547 ; CHECK-NEXT: buffer_store_byte_d16_hi v10, v0, s[0:3], 0 offen offset:29
8548 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:27
8549 ; CHECK-NEXT: v_lshrrev_b32_e32 v1, 24, v7
8550 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 8, v7
8551 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 24, v8
8552 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v8
8553 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v9
8554 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 8, v9
8555 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 24, v10
8556 ; CHECK-NEXT: v_lshrrev_b32_e32 v8, 8, v10
8557 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
8558 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:16
8559 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:22
8560 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:20
8561 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:26
8562 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:24
8563 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:30
8564 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:28
8565 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8567 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 31, i1 false)
8571 define void @memcpy_p5_p4_sz32_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(4) align 16 readonly %src) {
8572 ; CHECK-LABEL: memcpy_p5_p4_sz32_align_16_16:
8573 ; CHECK: ; %bb.0: ; %entry
8574 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8575 ; CHECK-NEXT: s_clause 0x1
8576 ; CHECK-NEXT: global_load_dwordx4 v[3:6], v[1:2], off
8577 ; CHECK-NEXT: global_load_dwordx4 v[7:10], v[1:2], off offset:16
8578 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8579 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen offset:12
8580 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:8
8581 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:4
8582 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen
8583 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8584 ; CHECK-NEXT: buffer_store_dword v10, v0, s[0:3], 0 offen offset:28
8585 ; CHECK-NEXT: buffer_store_dword v9, v0, s[0:3], 0 offen offset:24
8586 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:20
8587 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:16
8588 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8590 tail call void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(4) noundef nonnull align 16 %src, i64 32, i1 false)
8594 define void @memcpy_p5_p5_sz16_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
8595 ; CHECK-LABEL: memcpy_p5_p5_sz16_align_1_1:
8596 ; CHECK: ; %bb.0: ; %entry
8597 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8598 ; CHECK-NEXT: s_clause 0xf
8599 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:15
8600 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:14
8601 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:13
8602 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:12
8603 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:11
8604 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:10
8605 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:9
8606 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:8
8607 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:7
8608 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:6
8609 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:5
8610 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:4
8611 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:3
8612 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:2
8613 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:1
8614 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen
8615 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8616 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:15
8617 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8618 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:14
8619 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8620 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:13
8621 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8622 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:12
8623 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8624 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:11
8625 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8626 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:10
8627 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8628 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:9
8629 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8630 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:8
8631 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8632 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:7
8633 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8634 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:6
8635 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8636 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:5
8637 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8638 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:4
8639 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8640 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:3
8641 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8642 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:2
8643 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8644 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:1
8645 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8646 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen
8647 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8649 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 16, i1 false)
8653 define void @memcpy_p5_p5_sz31_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
8654 ; CHECK-LABEL: memcpy_p5_p5_sz31_align_1_1:
8655 ; CHECK: ; %bb.0: ; %entry
8656 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8657 ; CHECK-NEXT: s_clause 0x11
8658 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:14
8659 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:13
8660 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:12
8661 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:11
8662 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:10
8663 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:9
8664 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:8
8665 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:7
8666 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:6
8667 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:5
8668 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:4
8669 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:3
8670 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:2
8671 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:1
8672 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen
8673 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen offset:15
8674 ; CHECK-NEXT: buffer_load_ubyte v18, v1, s[0:3], 0 offen offset:16
8675 ; CHECK-NEXT: buffer_load_ubyte v19, v1, s[0:3], 0 offen offset:17
8676 ; CHECK-NEXT: s_waitcnt vmcnt(17)
8677 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:14
8678 ; CHECK-NEXT: s_waitcnt vmcnt(16)
8679 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:13
8680 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8681 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:12
8682 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8683 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:11
8684 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8685 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:10
8686 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8687 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:9
8688 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8689 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:8
8690 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8691 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:7
8692 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8693 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:6
8694 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8695 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:5
8696 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8697 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:4
8698 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8699 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:3
8700 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8701 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:2
8702 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8703 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:1
8704 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8705 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen
8706 ; CHECK-NEXT: s_clause 0xc
8707 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:30
8708 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:29
8709 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:28
8710 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:27
8711 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:26
8712 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:25
8713 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:24
8714 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:23
8715 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:22
8716 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:21
8717 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:20
8718 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:19
8719 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:18
8720 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8721 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:17
8722 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:16
8723 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8724 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:30
8725 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8726 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:29
8727 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8728 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:28
8729 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8730 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:27
8731 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8732 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:26
8733 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8734 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:25
8735 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8736 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:24
8737 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8738 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:23
8739 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8740 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:22
8741 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8742 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:21
8743 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8744 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:20
8745 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8746 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:19
8747 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8748 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
8749 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen offset:15
8750 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8752 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 31, i1 false)
8756 define void @memcpy_p5_p5_sz32_align_1_1(ptr addrspace(5) align 1 %dst, ptr addrspace(5) align 1 readonly %src) {
8757 ; CHECK-LABEL: memcpy_p5_p5_sz32_align_1_1:
8758 ; CHECK: ; %bb.0: ; %entry
8759 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8760 ; CHECK-NEXT: s_clause 0x11
8761 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:15
8762 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:14
8763 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:13
8764 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:12
8765 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:11
8766 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:10
8767 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:9
8768 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:8
8769 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:7
8770 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:6
8771 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:5
8772 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:4
8773 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:3
8774 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:2
8775 ; CHECK-NEXT: buffer_load_ubyte v16, v1, s[0:3], 0 offen offset:1
8776 ; CHECK-NEXT: buffer_load_ubyte v17, v1, s[0:3], 0 offen
8777 ; CHECK-NEXT: buffer_load_ubyte v18, v1, s[0:3], 0 offen offset:16
8778 ; CHECK-NEXT: buffer_load_ubyte v19, v1, s[0:3], 0 offen offset:17
8779 ; CHECK-NEXT: s_waitcnt vmcnt(17)
8780 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:15
8781 ; CHECK-NEXT: s_waitcnt vmcnt(16)
8782 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:14
8783 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8784 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:13
8785 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8786 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:12
8787 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8788 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:11
8789 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8790 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:10
8791 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8792 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:9
8793 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8794 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:8
8795 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8796 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:7
8797 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8798 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:6
8799 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8800 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:5
8801 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8802 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:4
8803 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8804 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:3
8805 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8806 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:2
8807 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8808 ; CHECK-NEXT: buffer_store_byte v16, v0, s[0:3], 0 offen offset:1
8809 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8810 ; CHECK-NEXT: buffer_store_byte v17, v0, s[0:3], 0 offen
8811 ; CHECK-NEXT: s_clause 0xd
8812 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:31
8813 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:30
8814 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:29
8815 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:28
8816 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:27
8817 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:26
8818 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:25
8819 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:24
8820 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:23
8821 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:22
8822 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:21
8823 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:20
8824 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:19
8825 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:18
8826 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8827 ; CHECK-NEXT: buffer_store_byte v19, v0, s[0:3], 0 offen offset:17
8828 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8829 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:31
8830 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8831 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:30
8832 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8833 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:29
8834 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8835 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:28
8836 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8837 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:27
8838 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8839 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:26
8840 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8841 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:25
8842 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8843 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:24
8844 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8845 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:23
8846 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8847 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:22
8848 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8849 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:21
8850 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8851 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:20
8852 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8853 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:19
8854 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8855 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:18
8856 ; CHECK-NEXT: buffer_store_byte v18, v0, s[0:3], 0 offen offset:16
8857 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8859 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 1 %dst, ptr addrspace(5) noundef nonnull align 1 %src, i64 32, i1 false)
8863 define void @memcpy_p5_p5_sz16_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
8864 ; CHECK-LABEL: memcpy_p5_p5_sz16_align_2_2:
8865 ; CHECK: ; %bb.0: ; %entry
8866 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8867 ; CHECK-NEXT: s_clause 0x7
8868 ; CHECK-NEXT: buffer_load_ushort v2, v1, s[0:3], 0 offen offset:14
8869 ; CHECK-NEXT: buffer_load_ushort v3, v1, s[0:3], 0 offen offset:12
8870 ; CHECK-NEXT: buffer_load_ushort v4, v1, s[0:3], 0 offen offset:10
8871 ; CHECK-NEXT: buffer_load_ushort v5, v1, s[0:3], 0 offen offset:8
8872 ; CHECK-NEXT: buffer_load_ushort v6, v1, s[0:3], 0 offen offset:6
8873 ; CHECK-NEXT: buffer_load_ushort v7, v1, s[0:3], 0 offen offset:4
8874 ; CHECK-NEXT: buffer_load_ushort v8, v1, s[0:3], 0 offen offset:2
8875 ; CHECK-NEXT: buffer_load_ushort v1, v1, s[0:3], 0 offen
8876 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8877 ; CHECK-NEXT: buffer_store_short v2, v0, s[0:3], 0 offen offset:14
8878 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8879 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:12
8880 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8881 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:10
8882 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8883 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:8
8884 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8885 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:6
8886 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8887 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:4
8888 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8889 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:2
8890 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8891 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
8892 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8894 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 16, i1 false)
8898 define void @memcpy_p5_p5_sz31_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
8899 ; CHECK-LABEL: memcpy_p5_p5_sz31_align_2_2:
8900 ; CHECK: ; %bb.0: ; %entry
8901 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8902 ; CHECK-NEXT: s_clause 0xf
8903 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:30
8904 ; CHECK-NEXT: buffer_load_ushort v3, v1, s[0:3], 0 offen offset:28
8905 ; CHECK-NEXT: buffer_load_ushort v4, v1, s[0:3], 0 offen offset:26
8906 ; CHECK-NEXT: buffer_load_ushort v5, v1, s[0:3], 0 offen offset:24
8907 ; CHECK-NEXT: buffer_load_ushort v6, v1, s[0:3], 0 offen offset:22
8908 ; CHECK-NEXT: buffer_load_ushort v7, v1, s[0:3], 0 offen offset:20
8909 ; CHECK-NEXT: buffer_load_ushort v8, v1, s[0:3], 0 offen offset:18
8910 ; CHECK-NEXT: buffer_load_ushort v9, v1, s[0:3], 0 offen offset:16
8911 ; CHECK-NEXT: buffer_load_ushort v10, v1, s[0:3], 0 offen offset:14
8912 ; CHECK-NEXT: buffer_load_ushort v11, v1, s[0:3], 0 offen offset:12
8913 ; CHECK-NEXT: buffer_load_ushort v12, v1, s[0:3], 0 offen offset:10
8914 ; CHECK-NEXT: buffer_load_ushort v13, v1, s[0:3], 0 offen offset:8
8915 ; CHECK-NEXT: buffer_load_ushort v14, v1, s[0:3], 0 offen offset:6
8916 ; CHECK-NEXT: buffer_load_ushort v15, v1, s[0:3], 0 offen offset:4
8917 ; CHECK-NEXT: buffer_load_ushort v16, v1, s[0:3], 0 offen offset:2
8918 ; CHECK-NEXT: buffer_load_ushort v1, v1, s[0:3], 0 offen
8919 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8920 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:30
8921 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8922 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:28
8923 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8924 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:26
8925 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8926 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:24
8927 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8928 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:22
8929 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8930 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:20
8931 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8932 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:18
8933 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8934 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:16
8935 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8936 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:14
8937 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8938 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:12
8939 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8940 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:10
8941 ; CHECK-NEXT: s_waitcnt vmcnt(4)
8942 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:8
8943 ; CHECK-NEXT: s_waitcnt vmcnt(3)
8944 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:6
8945 ; CHECK-NEXT: s_waitcnt vmcnt(2)
8946 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:4
8947 ; CHECK-NEXT: s_waitcnt vmcnt(1)
8948 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:2
8949 ; CHECK-NEXT: s_waitcnt vmcnt(0)
8950 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
8951 ; CHECK-NEXT: s_setpc_b64 s[30:31]
8953 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 31, i1 false)
8957 define void @memcpy_p5_p5_sz32_align_2_2(ptr addrspace(5) align 2 %dst, ptr addrspace(5) align 2 readonly %src) {
8958 ; CHECK-LABEL: memcpy_p5_p5_sz32_align_2_2:
8959 ; CHECK: ; %bb.0: ; %entry
8960 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8961 ; CHECK-NEXT: s_clause 0xf
8962 ; CHECK-NEXT: buffer_load_ushort v2, v1, s[0:3], 0 offen offset:30
8963 ; CHECK-NEXT: buffer_load_ushort v3, v1, s[0:3], 0 offen offset:28
8964 ; CHECK-NEXT: buffer_load_ushort v4, v1, s[0:3], 0 offen offset:26
8965 ; CHECK-NEXT: buffer_load_ushort v5, v1, s[0:3], 0 offen offset:24
8966 ; CHECK-NEXT: buffer_load_ushort v6, v1, s[0:3], 0 offen offset:22
8967 ; CHECK-NEXT: buffer_load_ushort v7, v1, s[0:3], 0 offen offset:20
8968 ; CHECK-NEXT: buffer_load_ushort v8, v1, s[0:3], 0 offen offset:18
8969 ; CHECK-NEXT: buffer_load_ushort v9, v1, s[0:3], 0 offen offset:16
8970 ; CHECK-NEXT: buffer_load_ushort v10, v1, s[0:3], 0 offen offset:14
8971 ; CHECK-NEXT: buffer_load_ushort v11, v1, s[0:3], 0 offen offset:12
8972 ; CHECK-NEXT: buffer_load_ushort v12, v1, s[0:3], 0 offen offset:10
8973 ; CHECK-NEXT: buffer_load_ushort v13, v1, s[0:3], 0 offen offset:8
8974 ; CHECK-NEXT: buffer_load_ushort v14, v1, s[0:3], 0 offen offset:6
8975 ; CHECK-NEXT: buffer_load_ushort v15, v1, s[0:3], 0 offen offset:4
8976 ; CHECK-NEXT: buffer_load_ushort v16, v1, s[0:3], 0 offen offset:2
8977 ; CHECK-NEXT: buffer_load_ushort v1, v1, s[0:3], 0 offen
8978 ; CHECK-NEXT: s_waitcnt vmcnt(15)
8979 ; CHECK-NEXT: buffer_store_short v2, v0, s[0:3], 0 offen offset:30
8980 ; CHECK-NEXT: s_waitcnt vmcnt(14)
8981 ; CHECK-NEXT: buffer_store_short v3, v0, s[0:3], 0 offen offset:28
8982 ; CHECK-NEXT: s_waitcnt vmcnt(13)
8983 ; CHECK-NEXT: buffer_store_short v4, v0, s[0:3], 0 offen offset:26
8984 ; CHECK-NEXT: s_waitcnt vmcnt(12)
8985 ; CHECK-NEXT: buffer_store_short v5, v0, s[0:3], 0 offen offset:24
8986 ; CHECK-NEXT: s_waitcnt vmcnt(11)
8987 ; CHECK-NEXT: buffer_store_short v6, v0, s[0:3], 0 offen offset:22
8988 ; CHECK-NEXT: s_waitcnt vmcnt(10)
8989 ; CHECK-NEXT: buffer_store_short v7, v0, s[0:3], 0 offen offset:20
8990 ; CHECK-NEXT: s_waitcnt vmcnt(9)
8991 ; CHECK-NEXT: buffer_store_short v8, v0, s[0:3], 0 offen offset:18
8992 ; CHECK-NEXT: s_waitcnt vmcnt(8)
8993 ; CHECK-NEXT: buffer_store_short v9, v0, s[0:3], 0 offen offset:16
8994 ; CHECK-NEXT: s_waitcnt vmcnt(7)
8995 ; CHECK-NEXT: buffer_store_short v10, v0, s[0:3], 0 offen offset:14
8996 ; CHECK-NEXT: s_waitcnt vmcnt(6)
8997 ; CHECK-NEXT: buffer_store_short v11, v0, s[0:3], 0 offen offset:12
8998 ; CHECK-NEXT: s_waitcnt vmcnt(5)
8999 ; CHECK-NEXT: buffer_store_short v12, v0, s[0:3], 0 offen offset:10
9000 ; CHECK-NEXT: s_waitcnt vmcnt(4)
9001 ; CHECK-NEXT: buffer_store_short v13, v0, s[0:3], 0 offen offset:8
9002 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9003 ; CHECK-NEXT: buffer_store_short v14, v0, s[0:3], 0 offen offset:6
9004 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9005 ; CHECK-NEXT: buffer_store_short v15, v0, s[0:3], 0 offen offset:4
9006 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9007 ; CHECK-NEXT: buffer_store_short v16, v0, s[0:3], 0 offen offset:2
9008 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9009 ; CHECK-NEXT: buffer_store_short v1, v0, s[0:3], 0 offen
9010 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9012 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 2 %dst, ptr addrspace(5) noundef nonnull align 2 %src, i64 32, i1 false)
9016 define void @memcpy_p5_p5_sz16_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
9017 ; CHECK-LABEL: memcpy_p5_p5_sz16_align_8_8:
9018 ; CHECK: ; %bb.0: ; %entry
9019 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9020 ; CHECK-NEXT: s_clause 0x3
9021 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
9022 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
9023 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
9024 ; CHECK-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen offset:12
9025 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9026 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen
9027 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9028 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:4
9029 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9030 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:8
9031 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9032 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen offset:12
9033 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9035 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 16, i1 false)
9039 define void @memcpy_p5_p5_sz31_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
9040 ; CHECK-LABEL: memcpy_p5_p5_sz31_align_8_8:
9041 ; CHECK: ; %bb.0: ; %entry
9042 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9043 ; CHECK-NEXT: s_clause 0x13
9044 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:17
9045 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:18
9046 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:15
9047 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:16
9048 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:21
9049 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:22
9050 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:19
9051 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:20
9052 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:25
9053 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:26
9054 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:23
9055 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:24
9056 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:29
9057 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:30
9058 ; CHECK-NEXT: buffer_load_dword v16, v1, s[0:3], 0 offen
9059 ; CHECK-NEXT: buffer_load_dword v17, v1, s[0:3], 0 offen offset:4
9060 ; CHECK-NEXT: buffer_load_dword v18, v1, s[0:3], 0 offen offset:8
9061 ; CHECK-NEXT: buffer_load_dword v19, v1, s[0:3], 0 offen offset:12
9062 ; CHECK-NEXT: buffer_load_ubyte v20, v1, s[0:3], 0 offen offset:27
9063 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:28
9064 ; CHECK-NEXT: s_waitcnt vmcnt(19)
9065 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:17
9066 ; CHECK-NEXT: s_waitcnt vmcnt(18)
9067 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:18
9068 ; CHECK-NEXT: s_waitcnt vmcnt(17)
9069 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:15
9070 ; CHECK-NEXT: s_waitcnt vmcnt(16)
9071 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:16
9072 ; CHECK-NEXT: s_waitcnt vmcnt(15)
9073 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:21
9074 ; CHECK-NEXT: s_waitcnt vmcnt(14)
9075 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:22
9076 ; CHECK-NEXT: s_waitcnt vmcnt(13)
9077 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:19
9078 ; CHECK-NEXT: s_waitcnt vmcnt(12)
9079 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:20
9080 ; CHECK-NEXT: s_waitcnt vmcnt(11)
9081 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:25
9082 ; CHECK-NEXT: s_waitcnt vmcnt(10)
9083 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:26
9084 ; CHECK-NEXT: s_waitcnt vmcnt(9)
9085 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:23
9086 ; CHECK-NEXT: s_waitcnt vmcnt(8)
9087 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:24
9088 ; CHECK-NEXT: s_waitcnt vmcnt(7)
9089 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:29
9090 ; CHECK-NEXT: s_waitcnt vmcnt(6)
9091 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:30
9092 ; CHECK-NEXT: s_waitcnt vmcnt(5)
9093 ; CHECK-NEXT: buffer_store_dword v16, v0, s[0:3], 0 offen
9094 ; CHECK-NEXT: s_waitcnt vmcnt(4)
9095 ; CHECK-NEXT: buffer_store_dword v17, v0, s[0:3], 0 offen offset:4
9096 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9097 ; CHECK-NEXT: buffer_store_dword v18, v0, s[0:3], 0 offen offset:8
9098 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9099 ; CHECK-NEXT: buffer_store_dword v19, v0, s[0:3], 0 offen offset:12
9100 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9101 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:27
9102 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9103 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:28
9104 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9106 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 31, i1 false)
9110 define void @memcpy_p5_p5_sz32_align_8_8(ptr addrspace(5) align 8 %dst, ptr addrspace(5) align 8 readonly %src) {
9111 ; CHECK-LABEL: memcpy_p5_p5_sz32_align_8_8:
9112 ; CHECK: ; %bb.0: ; %entry
9113 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9114 ; CHECK-NEXT: s_clause 0x7
9115 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen offset:16
9116 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:20
9117 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:24
9118 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:28
9119 ; CHECK-NEXT: buffer_load_dword v6, v1, s[0:3], 0 offen
9120 ; CHECK-NEXT: buffer_load_dword v7, v1, s[0:3], 0 offen offset:4
9121 ; CHECK-NEXT: buffer_load_dword v8, v1, s[0:3], 0 offen offset:8
9122 ; CHECK-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen offset:12
9123 ; CHECK-NEXT: s_waitcnt vmcnt(7)
9124 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:16
9125 ; CHECK-NEXT: s_waitcnt vmcnt(6)
9126 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:20
9127 ; CHECK-NEXT: s_waitcnt vmcnt(5)
9128 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:24
9129 ; CHECK-NEXT: s_waitcnt vmcnt(4)
9130 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:28
9131 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9132 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen
9133 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9134 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:4
9135 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9136 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:8
9137 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9138 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen offset:12
9139 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9141 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 8 %dst, ptr addrspace(5) noundef nonnull align 8 %src, i64 32, i1 false)
9145 define void @memcpy_p5_p5_sz16_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
9146 ; CHECK-LABEL: memcpy_p5_p5_sz16_align_16_16:
9147 ; CHECK: ; %bb.0: ; %entry
9148 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9149 ; CHECK-NEXT: s_clause 0x3
9150 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen
9151 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:4
9152 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:8
9153 ; CHECK-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen offset:12
9154 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9155 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen
9156 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9157 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:4
9158 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9159 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:8
9160 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9161 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen offset:12
9162 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9164 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 16, i1 false)
9168 define void @memcpy_p5_p5_sz31_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
9169 ; CHECK-LABEL: memcpy_p5_p5_sz31_align_16_16:
9170 ; CHECK: ; %bb.0: ; %entry
9171 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9172 ; CHECK-NEXT: s_clause 0x13
9173 ; CHECK-NEXT: buffer_load_ubyte v2, v1, s[0:3], 0 offen offset:17
9174 ; CHECK-NEXT: buffer_load_ubyte v3, v1, s[0:3], 0 offen offset:18
9175 ; CHECK-NEXT: buffer_load_ubyte v4, v1, s[0:3], 0 offen offset:15
9176 ; CHECK-NEXT: buffer_load_ubyte v5, v1, s[0:3], 0 offen offset:16
9177 ; CHECK-NEXT: buffer_load_ubyte v6, v1, s[0:3], 0 offen offset:21
9178 ; CHECK-NEXT: buffer_load_ubyte v7, v1, s[0:3], 0 offen offset:22
9179 ; CHECK-NEXT: buffer_load_ubyte v8, v1, s[0:3], 0 offen offset:19
9180 ; CHECK-NEXT: buffer_load_ubyte v9, v1, s[0:3], 0 offen offset:20
9181 ; CHECK-NEXT: buffer_load_ubyte v10, v1, s[0:3], 0 offen offset:25
9182 ; CHECK-NEXT: buffer_load_ubyte v11, v1, s[0:3], 0 offen offset:26
9183 ; CHECK-NEXT: buffer_load_ubyte v12, v1, s[0:3], 0 offen offset:23
9184 ; CHECK-NEXT: buffer_load_ubyte v13, v1, s[0:3], 0 offen offset:24
9185 ; CHECK-NEXT: buffer_load_ubyte v14, v1, s[0:3], 0 offen offset:29
9186 ; CHECK-NEXT: buffer_load_ubyte v15, v1, s[0:3], 0 offen offset:30
9187 ; CHECK-NEXT: buffer_load_dword v16, v1, s[0:3], 0 offen
9188 ; CHECK-NEXT: buffer_load_dword v17, v1, s[0:3], 0 offen offset:4
9189 ; CHECK-NEXT: buffer_load_dword v18, v1, s[0:3], 0 offen offset:8
9190 ; CHECK-NEXT: buffer_load_dword v19, v1, s[0:3], 0 offen offset:12
9191 ; CHECK-NEXT: buffer_load_ubyte v20, v1, s[0:3], 0 offen offset:27
9192 ; CHECK-NEXT: buffer_load_ubyte v1, v1, s[0:3], 0 offen offset:28
9193 ; CHECK-NEXT: s_waitcnt vmcnt(19)
9194 ; CHECK-NEXT: buffer_store_byte v2, v0, s[0:3], 0 offen offset:17
9195 ; CHECK-NEXT: s_waitcnt vmcnt(18)
9196 ; CHECK-NEXT: buffer_store_byte v3, v0, s[0:3], 0 offen offset:18
9197 ; CHECK-NEXT: s_waitcnt vmcnt(17)
9198 ; CHECK-NEXT: buffer_store_byte v4, v0, s[0:3], 0 offen offset:15
9199 ; CHECK-NEXT: s_waitcnt vmcnt(16)
9200 ; CHECK-NEXT: buffer_store_byte v5, v0, s[0:3], 0 offen offset:16
9201 ; CHECK-NEXT: s_waitcnt vmcnt(15)
9202 ; CHECK-NEXT: buffer_store_byte v6, v0, s[0:3], 0 offen offset:21
9203 ; CHECK-NEXT: s_waitcnt vmcnt(14)
9204 ; CHECK-NEXT: buffer_store_byte v7, v0, s[0:3], 0 offen offset:22
9205 ; CHECK-NEXT: s_waitcnt vmcnt(13)
9206 ; CHECK-NEXT: buffer_store_byte v8, v0, s[0:3], 0 offen offset:19
9207 ; CHECK-NEXT: s_waitcnt vmcnt(12)
9208 ; CHECK-NEXT: buffer_store_byte v9, v0, s[0:3], 0 offen offset:20
9209 ; CHECK-NEXT: s_waitcnt vmcnt(11)
9210 ; CHECK-NEXT: buffer_store_byte v10, v0, s[0:3], 0 offen offset:25
9211 ; CHECK-NEXT: s_waitcnt vmcnt(10)
9212 ; CHECK-NEXT: buffer_store_byte v11, v0, s[0:3], 0 offen offset:26
9213 ; CHECK-NEXT: s_waitcnt vmcnt(9)
9214 ; CHECK-NEXT: buffer_store_byte v12, v0, s[0:3], 0 offen offset:23
9215 ; CHECK-NEXT: s_waitcnt vmcnt(8)
9216 ; CHECK-NEXT: buffer_store_byte v13, v0, s[0:3], 0 offen offset:24
9217 ; CHECK-NEXT: s_waitcnt vmcnt(7)
9218 ; CHECK-NEXT: buffer_store_byte v14, v0, s[0:3], 0 offen offset:29
9219 ; CHECK-NEXT: s_waitcnt vmcnt(6)
9220 ; CHECK-NEXT: buffer_store_byte v15, v0, s[0:3], 0 offen offset:30
9221 ; CHECK-NEXT: s_waitcnt vmcnt(5)
9222 ; CHECK-NEXT: buffer_store_dword v16, v0, s[0:3], 0 offen
9223 ; CHECK-NEXT: s_waitcnt vmcnt(4)
9224 ; CHECK-NEXT: buffer_store_dword v17, v0, s[0:3], 0 offen offset:4
9225 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9226 ; CHECK-NEXT: buffer_store_dword v18, v0, s[0:3], 0 offen offset:8
9227 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9228 ; CHECK-NEXT: buffer_store_dword v19, v0, s[0:3], 0 offen offset:12
9229 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9230 ; CHECK-NEXT: buffer_store_byte v20, v0, s[0:3], 0 offen offset:27
9231 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9232 ; CHECK-NEXT: buffer_store_byte v1, v0, s[0:3], 0 offen offset:28
9233 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9235 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 31, i1 false)
9239 define void @memcpy_p5_p5_sz32_align_16_16(ptr addrspace(5) align 16 %dst, ptr addrspace(5) align 16 readonly %src) {
9240 ; CHECK-LABEL: memcpy_p5_p5_sz32_align_16_16:
9241 ; CHECK: ; %bb.0: ; %entry
9242 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
9243 ; CHECK-NEXT: s_clause 0x7
9244 ; CHECK-NEXT: buffer_load_dword v2, v1, s[0:3], 0 offen offset:16
9245 ; CHECK-NEXT: buffer_load_dword v3, v1, s[0:3], 0 offen offset:20
9246 ; CHECK-NEXT: buffer_load_dword v4, v1, s[0:3], 0 offen offset:24
9247 ; CHECK-NEXT: buffer_load_dword v5, v1, s[0:3], 0 offen offset:28
9248 ; CHECK-NEXT: buffer_load_dword v6, v1, s[0:3], 0 offen
9249 ; CHECK-NEXT: buffer_load_dword v7, v1, s[0:3], 0 offen offset:4
9250 ; CHECK-NEXT: buffer_load_dword v8, v1, s[0:3], 0 offen offset:8
9251 ; CHECK-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen offset:12
9252 ; CHECK-NEXT: s_waitcnt vmcnt(7)
9253 ; CHECK-NEXT: buffer_store_dword v2, v0, s[0:3], 0 offen offset:16
9254 ; CHECK-NEXT: s_waitcnt vmcnt(6)
9255 ; CHECK-NEXT: buffer_store_dword v3, v0, s[0:3], 0 offen offset:20
9256 ; CHECK-NEXT: s_waitcnt vmcnt(5)
9257 ; CHECK-NEXT: buffer_store_dword v4, v0, s[0:3], 0 offen offset:24
9258 ; CHECK-NEXT: s_waitcnt vmcnt(4)
9259 ; CHECK-NEXT: buffer_store_dword v5, v0, s[0:3], 0 offen offset:28
9260 ; CHECK-NEXT: s_waitcnt vmcnt(3)
9261 ; CHECK-NEXT: buffer_store_dword v6, v0, s[0:3], 0 offen
9262 ; CHECK-NEXT: s_waitcnt vmcnt(2)
9263 ; CHECK-NEXT: buffer_store_dword v7, v0, s[0:3], 0 offen offset:4
9264 ; CHECK-NEXT: s_waitcnt vmcnt(1)
9265 ; CHECK-NEXT: buffer_store_dword v8, v0, s[0:3], 0 offen offset:8
9266 ; CHECK-NEXT: s_waitcnt vmcnt(0)
9267 ; CHECK-NEXT: buffer_store_dword v1, v0, s[0:3], 0 offen offset:12
9268 ; CHECK-NEXT: s_setpc_b64 s[30:31]
9270 tail call void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noundef nonnull align 16 %dst, ptr addrspace(5) noundef nonnull align 16 %src, i64 32, i1 false)
9274 declare void @llvm.memcpy.p0.p0.i64(ptr addrspace(0) noalias nocapture writeonly, ptr addrspace(0) noalias nocapture readonly, i64, i1 immarg) #2
9275 declare void @llvm.memcpy.p0.p1.i64(ptr addrspace(0) noalias nocapture writeonly, ptr addrspace(1) noalias nocapture readonly, i64, i1 immarg) #2
9276 declare void @llvm.memcpy.p0.p3.i64(ptr addrspace(0) noalias nocapture writeonly, ptr addrspace(3) noalias nocapture readonly, i64, i1 immarg) #2
9277 declare void @llvm.memcpy.p0.p4.i64(ptr addrspace(0) noalias nocapture writeonly, ptr addrspace(4) noalias nocapture readonly, i64, i1 immarg) #2
9278 declare void @llvm.memcpy.p0.p5.i64(ptr addrspace(0) noalias nocapture writeonly, ptr addrspace(5) noalias nocapture readonly, i64, i1 immarg) #2
9279 declare void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) noalias nocapture writeonly, ptr addrspace(0) noalias nocapture readonly, i64, i1 immarg) #2
9280 declare void @llvm.memcpy.p1.p1.i64(ptr addrspace(1) noalias nocapture writeonly, ptr addrspace(1) noalias nocapture readonly, i64, i1 immarg) #2
9281 declare void @llvm.memcpy.p1.p3.i64(ptr addrspace(1) noalias nocapture writeonly, ptr addrspace(3) noalias nocapture readonly, i64, i1 immarg) #2
9282 declare void @llvm.memcpy.p1.p4.i64(ptr addrspace(1) noalias nocapture writeonly, ptr addrspace(4) noalias nocapture readonly, i64, i1 immarg) #2
9283 declare void @llvm.memcpy.p1.p5.i64(ptr addrspace(1) noalias nocapture writeonly, ptr addrspace(5) noalias nocapture readonly, i64, i1 immarg) #2
9284 declare void @llvm.memcpy.p3.p0.i64(ptr addrspace(3) noalias nocapture writeonly, ptr addrspace(0) noalias nocapture readonly, i64, i1 immarg) #2
9285 declare void @llvm.memcpy.p3.p1.i64(ptr addrspace(3) noalias nocapture writeonly, ptr addrspace(1) noalias nocapture readonly, i64, i1 immarg) #2
9286 declare void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noalias nocapture writeonly, ptr addrspace(3) noalias nocapture readonly, i64, i1 immarg) #2
9287 declare void @llvm.memcpy.p3.p4.i64(ptr addrspace(3) noalias nocapture writeonly, ptr addrspace(4) noalias nocapture readonly, i64, i1 immarg) #2
9288 declare void @llvm.memcpy.p3.p5.i64(ptr addrspace(3) noalias nocapture writeonly, ptr addrspace(5) noalias nocapture readonly, i64, i1 immarg) #2
9289 declare void @llvm.memcpy.p5.p0.i64(ptr addrspace(5) noalias nocapture writeonly, ptr addrspace(0) noalias nocapture readonly, i64, i1 immarg) #2
9290 declare void @llvm.memcpy.p5.p1.i64(ptr addrspace(5) noalias nocapture writeonly, ptr addrspace(1) noalias nocapture readonly, i64, i1 immarg) #2
9291 declare void @llvm.memcpy.p5.p3.i64(ptr addrspace(5) noalias nocapture writeonly, ptr addrspace(3) noalias nocapture readonly, i64, i1 immarg) #2
9292 declare void @llvm.memcpy.p5.p4.i64(ptr addrspace(5) noalias nocapture writeonly, ptr addrspace(4) noalias nocapture readonly, i64, i1 immarg) #2
9293 declare void @llvm.memcpy.p5.p5.i64(ptr addrspace(5) noalias nocapture writeonly, ptr addrspace(5) noalias nocapture readonly, i64, i1 immarg) #2
9295 attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }