• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s
2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s
3; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
4
5
6; FUNC-LABEL: {{^}}local_load_i8:
7; GCN-NOT: s_wqm_b64
8; GCN: s_mov_b32 m0
9; GCN: ds_read_u8
10
11; EG: LDS_UBYTE_READ_RET
12define void @local_load_i8(i8 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
13entry:
14  %ld = load i8, i8 addrspace(3)* %in
15  store i8 %ld, i8 addrspace(3)* %out
16  ret void
17}
18
19; FUNC-LABEL: {{^}}local_load_v2i8:
20; GCN-NOT: s_wqm_b64
21; GCN: s_mov_b32 m0
22; GCN: ds_read_u16
23
24; EG: LDS_USHORT_READ_RET
25define void @local_load_v2i8(<2 x i8> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
26entry:
27  %ld = load <2 x i8>, <2 x i8> addrspace(3)* %in
28  store <2 x i8> %ld, <2 x i8> addrspace(3)* %out
29  ret void
30}
31
32; FUNC-LABEL: {{^}}local_load_v3i8:
33; GCN: ds_read_b32
34
35; EG: DS_READ_RET
36define void @local_load_v3i8(<3 x i8> addrspace(3)* %out, <3 x i8> addrspace(3)* %in) #0 {
37entry:
38  %ld = load <3 x i8>, <3 x i8> addrspace(3)* %in
39  store <3 x i8> %ld, <3 x i8> addrspace(3)* %out
40  ret void
41}
42
43; FUNC-LABEL: {{^}}local_load_v4i8:
44; GCN: ds_read_b32
45
46; EG: LDS_READ_RET
47define void @local_load_v4i8(<4 x i8> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
48entry:
49  %ld = load <4 x i8>, <4 x i8> addrspace(3)* %in
50  store <4 x i8> %ld, <4 x i8> addrspace(3)* %out
51  ret void
52}
53
54; FUNC-LABEL: {{^}}local_load_v8i8:
55; GCN: ds_read_b64
56
57; EG: LDS_READ_RET
58; EG: LDS_READ_RET
59define void @local_load_v8i8(<8 x i8> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
60entry:
61  %ld = load <8 x i8>, <8 x i8> addrspace(3)* %in
62  store <8 x i8> %ld, <8 x i8> addrspace(3)* %out
63  ret void
64}
65
66; FUNC-LABEL: {{^}}local_load_v16i8:
67; GCN: ds_read2_b64  v{{\[}}[[LO:[0-9]+]]:[[HI:[0-9]+]]{{\]}}, v{{[0-9]+}} offset0:1{{$}}
68; GCN: ds_write2_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:{{[0-9]+}}], v[{{[0-9]+}}:[[HI]]{{\]}} offset0:1{{$}}
69
70; EG: LDS_READ_RET
71; EG: LDS_READ_RET
72; EG: LDS_READ_RET
73; EG: LDS_READ_RET
74define void @local_load_v16i8(<16 x i8> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
75entry:
76  %ld = load <16 x i8>, <16 x i8> addrspace(3)* %in
77  store <16 x i8> %ld, <16 x i8> addrspace(3)* %out
78  ret void
79}
80
81; FUNC-LABEL: {{^}}local_zextload_i8_to_i32:
82; GCN-NOT: s_wqm_b64
83; GCN: s_mov_b32 m0
84; GCN: ds_read_u8
85
86; EG: LDS_UBYTE_READ_RET
87define void @local_zextload_i8_to_i32(i32 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
88  %a = load i8, i8 addrspace(3)* %in
89  %ext = zext i8 %a to i32
90  store i32 %ext, i32 addrspace(3)* %out
91  ret void
92}
93
94; FUNC-LABEL: {{^}}local_sextload_i8_to_i32:
95; GCN-NOT: s_wqm_b64
96; GCN: s_mov_b32 m0
97; GCN: ds_read_i8
98
99; EG: LDS_UBYTE_READ_RET
100; EG: BFE_INT
101define void @local_sextload_i8_to_i32(i32 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
102  %ld = load i8, i8 addrspace(3)* %in
103  %ext = sext i8 %ld to i32
104  store i32 %ext, i32 addrspace(3)* %out
105  ret void
106}
107
108; FUNC-LABEL: {{^}}local_zextload_v1i8_to_v1i32:
109define void @local_zextload_v1i8_to_v1i32(<1 x i32> addrspace(3)* %out, <1 x i8> addrspace(3)* %in) #0 {
110  %load = load <1 x i8>, <1 x i8> addrspace(3)* %in
111  %ext = zext <1 x i8> %load to <1 x i32>
112  store <1 x i32> %ext, <1 x i32> addrspace(3)* %out
113  ret void
114}
115
116; FUNC-LABEL: {{^}}local_sextload_v1i8_to_v1i32:
117define void @local_sextload_v1i8_to_v1i32(<1 x i32> addrspace(3)* %out, <1 x i8> addrspace(3)* %in) #0 {
118  %load = load <1 x i8>, <1 x i8> addrspace(3)* %in
119  %ext = sext <1 x i8> %load to <1 x i32>
120  store <1 x i32> %ext, <1 x i32> addrspace(3)* %out
121  ret void
122}
123
124; FUNC-LABEL: {{^}}local_zextload_v2i8_to_v2i32:
125; GCN: ds_read_u16
126
127; EG: LDS_UBYTE_READ_RET
128; EG: LDS_UBYTE_READ_RET
129define void @local_zextload_v2i8_to_v2i32(<2 x i32> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
130  %load = load <2 x i8>, <2 x i8> addrspace(3)* %in
131  %ext = zext <2 x i8> %load to <2 x i32>
132  store <2 x i32> %ext, <2 x i32> addrspace(3)* %out
133  ret void
134}
135
136; FUNC-LABEL: {{^}}local_sextload_v2i8_to_v2i32:
137; GCN-NOT: s_wqm_b64
138; GCN: s_mov_b32 m0
139; GCN: ds_read_u16
140; GCN-DAG: v_bfe_i32 v{{[0-9]+}}, v{{[0-9]+}}, 8, 8
141; GCN-DAG: v_bfe_i32 v{{[0-9]+}}, v{{[0-9]+}}, 0, 8
142
143; EG-DAG: LDS_UBYTE_READ_RET
144; EG-DAG: LDS_UBYTE_READ_RET
145; EG-DAG: BFE_INT
146; EG-DAG: BFE_INT
147define void @local_sextload_v2i8_to_v2i32(<2 x i32> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
148  %load = load <2 x i8>, <2 x i8> addrspace(3)* %in
149  %ext = sext <2 x i8> %load to <2 x i32>
150  store <2 x i32> %ext, <2 x i32> addrspace(3)* %out
151  ret void
152}
153
154; FUNC-LABEL: {{^}}local_zextload_v3i8_to_v3i32:
155; GCN: ds_read_b32
156
157; GCN-DAG: v_bfe_u32 v{{[0-9]+}}, v{{[0-9]+}}, 8, 8
158; GCN-DAG: v_bfe_u32 v{{[0-9]+}}, v{{[0-9]+}}, 16, 8
159; GCN-DAG: v_and_b32_e32 v{{[0-9]+}}, 0xff,
160define void @local_zextload_v3i8_to_v3i32(<3 x i32> addrspace(3)* %out, <3 x i8> addrspace(3)* %in) #0 {
161entry:
162  %ld = load <3 x i8>, <3 x i8> addrspace(3)* %in
163  %ext = zext <3 x i8> %ld to <3 x i32>
164  store <3 x i32> %ext, <3 x i32> addrspace(3)* %out
165  ret void
166}
167
168; FUNC-LABEL: {{^}}local_sextload_v3i8_to_v3i32:
169; GCN-NOT: s_wqm_b64
170; GCN: s_mov_b32 m0
171; GCN: ds_read_b32
172
173; GCN-DAG: v_bfe_i32
174; GCN-DAG: v_bfe_i32
175; GCN-DAG: v_bfe_i32
176; GCN-DAG: v_bfe_i32
177
178; GCN-DAG: ds_write_b64
179; GCN-DAG: ds_write_b32
180
181define void @local_sextload_v3i8_to_v3i32(<3 x i32> addrspace(3)* %out, <3 x i8> addrspace(3)* %in) #0 {
182entry:
183  %ld = load <3 x i8>, <3 x i8> addrspace(3)* %in
184  %ext = sext <3 x i8> %ld to <3 x i32>
185  store <3 x i32> %ext, <3 x i32> addrspace(3)* %out
186  ret void
187}
188
189; FUNC-LABEL: {{^}}local_zextload_v4i8_to_v4i32:
190; GCN-NOT: s_wqm_b64
191; GCN: s_mov_b32 m0
192; GCN: ds_read_b32
193
194; EG: LDS_UBYTE_READ_RET
195; EG: LDS_UBYTE_READ_RET
196; EG: LDS_UBYTE_READ_RET
197; EG: LDS_UBYTE_READ_RET
198define void @local_zextload_v4i8_to_v4i32(<4 x i32> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
199  %load = load <4 x i8>, <4 x i8> addrspace(3)* %in
200  %ext = zext <4 x i8> %load to <4 x i32>
201  store <4 x i32> %ext, <4 x i32> addrspace(3)* %out
202  ret void
203}
204
205; FUNC-LABEL: {{^}}local_sextload_v4i8_to_v4i32:
206; GCN-NOT: s_wqm_b64
207; GCN: s_mov_b32 m0
208; GCN: ds_read_b32
209
210; EG-DAG: LDS_UBYTE_READ_RET
211; EG-DAG: LDS_UBYTE_READ_RET
212; EG-DAG: LDS_UBYTE_READ_RET
213; EG-DAG: LDS_UBYTE_READ_RET
214; EG-DAG: BFE_INT
215; EG-DAG: BFE_INT
216; EG-DAG: BFE_INT
217; EG-DAG: BFE_INT
218define void @local_sextload_v4i8_to_v4i32(<4 x i32> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
219  %load = load <4 x i8>, <4 x i8> addrspace(3)* %in
220  %ext = sext <4 x i8> %load to <4 x i32>
221  store <4 x i32> %ext, <4 x i32> addrspace(3)* %out
222  ret void
223}
224
225; FUNC-LABEL: {{^}}local_zextload_v8i8_to_v8i32:
226define void @local_zextload_v8i8_to_v8i32(<8 x i32> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
227  %load = load <8 x i8>, <8 x i8> addrspace(3)* %in
228  %ext = zext <8 x i8> %load to <8 x i32>
229  store <8 x i32> %ext, <8 x i32> addrspace(3)* %out
230  ret void
231}
232
233; FUNC-LABEL: {{^}}local_sextload_v8i8_to_v8i32:
234define void @local_sextload_v8i8_to_v8i32(<8 x i32> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
235  %load = load <8 x i8>, <8 x i8> addrspace(3)* %in
236  %ext = sext <8 x i8> %load to <8 x i32>
237  store <8 x i32> %ext, <8 x i32> addrspace(3)* %out
238  ret void
239}
240
241; FUNC-LABEL: {{^}}local_zextload_v16i8_to_v16i32:
242define void @local_zextload_v16i8_to_v16i32(<16 x i32> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
243  %load = load <16 x i8>, <16 x i8> addrspace(3)* %in
244  %ext = zext <16 x i8> %load to <16 x i32>
245  store <16 x i32> %ext, <16 x i32> addrspace(3)* %out
246  ret void
247}
248
249; FUNC-LABEL: {{^}}local_sextload_v16i8_to_v16i32:
250define void @local_sextload_v16i8_to_v16i32(<16 x i32> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
251  %load = load <16 x i8>, <16 x i8> addrspace(3)* %in
252  %ext = sext <16 x i8> %load to <16 x i32>
253  store <16 x i32> %ext, <16 x i32> addrspace(3)* %out
254  ret void
255}
256
257; FUNC-LABEL: {{^}}local_zextload_v32i8_to_v32i32:
258define void @local_zextload_v32i8_to_v32i32(<32 x i32> addrspace(3)* %out, <32 x i8> addrspace(3)* %in) #0 {
259  %load = load <32 x i8>, <32 x i8> addrspace(3)* %in
260  %ext = zext <32 x i8> %load to <32 x i32>
261  store <32 x i32> %ext, <32 x i32> addrspace(3)* %out
262  ret void
263}
264
265; FUNC-LABEL: {{^}}local_sextload_v32i8_to_v32i32:
266define void @local_sextload_v32i8_to_v32i32(<32 x i32> addrspace(3)* %out, <32 x i8> addrspace(3)* %in) #0 {
267  %load = load <32 x i8>, <32 x i8> addrspace(3)* %in
268  %ext = sext <32 x i8> %load to <32 x i32>
269  store <32 x i32> %ext, <32 x i32> addrspace(3)* %out
270  ret void
271}
272
273; FUNC-LABEL: {{^}}local_zextload_v64i8_to_v64i32:
274define void @local_zextload_v64i8_to_v64i32(<64 x i32> addrspace(3)* %out, <64 x i8> addrspace(3)* %in) #0 {
275  %load = load <64 x i8>, <64 x i8> addrspace(3)* %in
276  %ext = zext <64 x i8> %load to <64 x i32>
277  store <64 x i32> %ext, <64 x i32> addrspace(3)* %out
278  ret void
279}
280
281; FUNC-LABEL: {{^}}local_sextload_v64i8_to_v64i32:
282define void @local_sextload_v64i8_to_v64i32(<64 x i32> addrspace(3)* %out, <64 x i8> addrspace(3)* %in) #0 {
283  %load = load <64 x i8>, <64 x i8> addrspace(3)* %in
284  %ext = sext <64 x i8> %load to <64 x i32>
285  store <64 x i32> %ext, <64 x i32> addrspace(3)* %out
286  ret void
287}
288
289; FUNC-LABEL: {{^}}local_zextload_i8_to_i64:
290; GCN-DAG: v_mov_b32_e32 v[[HI:[0-9]+]], 0{{$}}
291; GCN-DAG: ds_read_u8 v[[LO:[0-9]+]],
292; GCN: ds_write_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:[[HI]]]
293define void @local_zextload_i8_to_i64(i64 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
294  %a = load i8, i8 addrspace(3)* %in
295  %ext = zext i8 %a to i64
296  store i64 %ext, i64 addrspace(3)* %out
297  ret void
298}
299
300; FUNC-LABEL: {{^}}local_sextload_i8_to_i64:
301; GCN: ds_read_i8 v[[LO:[0-9]+]],
302; GCN: v_ashrrev_i32_e32 v[[HI:[0-9]+]], 31, v[[LO]]
303
304; GCN: ds_write_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:[[HI]]{{\]}}
305define void @local_sextload_i8_to_i64(i64 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
306  %a = load i8, i8 addrspace(3)* %in
307  %ext = sext i8 %a to i64
308  store i64 %ext, i64 addrspace(3)* %out
309  ret void
310}
311
312; FUNC-LABEL: {{^}}local_zextload_v1i8_to_v1i64:
313define void @local_zextload_v1i8_to_v1i64(<1 x i64> addrspace(3)* %out, <1 x i8> addrspace(3)* %in) #0 {
314  %load = load <1 x i8>, <1 x i8> addrspace(3)* %in
315  %ext = zext <1 x i8> %load to <1 x i64>
316  store <1 x i64> %ext, <1 x i64> addrspace(3)* %out
317  ret void
318}
319
320; FUNC-LABEL: {{^}}local_sextload_v1i8_to_v1i64:
321define void @local_sextload_v1i8_to_v1i64(<1 x i64> addrspace(3)* %out, <1 x i8> addrspace(3)* %in) #0 {
322  %load = load <1 x i8>, <1 x i8> addrspace(3)* %in
323  %ext = sext <1 x i8> %load to <1 x i64>
324  store <1 x i64> %ext, <1 x i64> addrspace(3)* %out
325  ret void
326}
327
328; FUNC-LABEL: {{^}}local_zextload_v2i8_to_v2i64:
329define void @local_zextload_v2i8_to_v2i64(<2 x i64> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
330  %load = load <2 x i8>, <2 x i8> addrspace(3)* %in
331  %ext = zext <2 x i8> %load to <2 x i64>
332  store <2 x i64> %ext, <2 x i64> addrspace(3)* %out
333  ret void
334}
335
336; FUNC-LABEL: {{^}}local_sextload_v2i8_to_v2i64:
337define void @local_sextload_v2i8_to_v2i64(<2 x i64> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
338  %load = load <2 x i8>, <2 x i8> addrspace(3)* %in
339  %ext = sext <2 x i8> %load to <2 x i64>
340  store <2 x i64> %ext, <2 x i64> addrspace(3)* %out
341  ret void
342}
343
344; FUNC-LABEL: {{^}}local_zextload_v4i8_to_v4i64:
345define void @local_zextload_v4i8_to_v4i64(<4 x i64> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
346  %load = load <4 x i8>, <4 x i8> addrspace(3)* %in
347  %ext = zext <4 x i8> %load to <4 x i64>
348  store <4 x i64> %ext, <4 x i64> addrspace(3)* %out
349  ret void
350}
351
352; FUNC-LABEL: {{^}}local_sextload_v4i8_to_v4i64:
353define void @local_sextload_v4i8_to_v4i64(<4 x i64> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
354  %load = load <4 x i8>, <4 x i8> addrspace(3)* %in
355  %ext = sext <4 x i8> %load to <4 x i64>
356  store <4 x i64> %ext, <4 x i64> addrspace(3)* %out
357  ret void
358}
359
360; FUNC-LABEL: {{^}}local_zextload_v8i8_to_v8i64:
361define void @local_zextload_v8i8_to_v8i64(<8 x i64> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
362  %load = load <8 x i8>, <8 x i8> addrspace(3)* %in
363  %ext = zext <8 x i8> %load to <8 x i64>
364  store <8 x i64> %ext, <8 x i64> addrspace(3)* %out
365  ret void
366}
367
368; FUNC-LABEL: {{^}}local_sextload_v8i8_to_v8i64:
369define void @local_sextload_v8i8_to_v8i64(<8 x i64> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
370  %load = load <8 x i8>, <8 x i8> addrspace(3)* %in
371  %ext = sext <8 x i8> %load to <8 x i64>
372  store <8 x i64> %ext, <8 x i64> addrspace(3)* %out
373  ret void
374}
375
376; FUNC-LABEL: {{^}}local_zextload_v16i8_to_v16i64:
377define void @local_zextload_v16i8_to_v16i64(<16 x i64> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
378  %load = load <16 x i8>, <16 x i8> addrspace(3)* %in
379  %ext = zext <16 x i8> %load to <16 x i64>
380  store <16 x i64> %ext, <16 x i64> addrspace(3)* %out
381  ret void
382}
383
384; FUNC-LABEL: {{^}}local_sextload_v16i8_to_v16i64:
385define void @local_sextload_v16i8_to_v16i64(<16 x i64> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
386  %load = load <16 x i8>, <16 x i8> addrspace(3)* %in
387  %ext = sext <16 x i8> %load to <16 x i64>
388  store <16 x i64> %ext, <16 x i64> addrspace(3)* %out
389  ret void
390}
391
392; FUNC-LABEL: {{^}}local_zextload_v32i8_to_v32i64:
393define void @local_zextload_v32i8_to_v32i64(<32 x i64> addrspace(3)* %out, <32 x i8> addrspace(3)* %in) #0 {
394  %load = load <32 x i8>, <32 x i8> addrspace(3)* %in
395  %ext = zext <32 x i8> %load to <32 x i64>
396  store <32 x i64> %ext, <32 x i64> addrspace(3)* %out
397  ret void
398}
399
400; FUNC-LABEL: {{^}}local_sextload_v32i8_to_v32i64:
401define void @local_sextload_v32i8_to_v32i64(<32 x i64> addrspace(3)* %out, <32 x i8> addrspace(3)* %in) #0 {
402  %load = load <32 x i8>, <32 x i8> addrspace(3)* %in
403  %ext = sext <32 x i8> %load to <32 x i64>
404  store <32 x i64> %ext, <32 x i64> addrspace(3)* %out
405  ret void
406}
407
408; XFUNC-LABEL: {{^}}local_zextload_v64i8_to_v64i64:
409; define void @local_zextload_v64i8_to_v64i64(<64 x i64> addrspace(3)* %out, <64 x i8> addrspace(3)* %in) #0 {
410;   %load = load <64 x i8>, <64 x i8> addrspace(3)* %in
411;   %ext = zext <64 x i8> %load to <64 x i64>
412;   store <64 x i64> %ext, <64 x i64> addrspace(3)* %out
413;   ret void
414; }
415
416; XFUNC-LABEL: {{^}}local_sextload_v64i8_to_v64i64:
417; define void @local_sextload_v64i8_to_v64i64(<64 x i64> addrspace(3)* %out, <64 x i8> addrspace(3)* %in) #0 {
418;   %load = load <64 x i8>, <64 x i8> addrspace(3)* %in
419;   %ext = sext <64 x i8> %load to <64 x i64>
420;   store <64 x i64> %ext, <64 x i64> addrspace(3)* %out
421;   ret void
422; }
423
424; FUNC-LABEL: {{^}}local_zextload_i8_to_i16:
425; GCN: ds_read_u8 v[[VAL:[0-9]+]],
426; GCN: ds_write_b16 v[[VAL:[0-9]+]]
427define void @local_zextload_i8_to_i16(i16 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
428  %a = load i8, i8 addrspace(3)* %in
429  %ext = zext i8 %a to i16
430  store i16 %ext, i16 addrspace(3)* %out
431  ret void
432}
433
434; FUNC-LABEL: {{^}}local_sextload_i8_to_i16:
435; GCN: ds_read_i8 v[[VAL:[0-9]+]],
436; GCN: ds_write_b16 v{{[0-9]+}}, v[[VAL]]
437define void @local_sextload_i8_to_i16(i16 addrspace(3)* %out, i8 addrspace(3)* %in) #0 {
438  %a = load i8, i8 addrspace(3)* %in
439  %ext = sext i8 %a to i16
440  store i16 %ext, i16 addrspace(3)* %out
441  ret void
442}
443
444; FUNC-LABEL: {{^}}local_zextload_v1i8_to_v1i16:
445define void @local_zextload_v1i8_to_v1i16(<1 x i16> addrspace(3)* %out, <1 x i8> addrspace(3)* %in) #0 {
446  %load = load <1 x i8>, <1 x i8> addrspace(3)* %in
447  %ext = zext <1 x i8> %load to <1 x i16>
448  store <1 x i16> %ext, <1 x i16> addrspace(3)* %out
449  ret void
450}
451
452; FUNC-LABEL: {{^}}local_sextload_v1i8_to_v1i16:
453define void @local_sextload_v1i8_to_v1i16(<1 x i16> addrspace(3)* %out, <1 x i8> addrspace(3)* %in) #0 {
454  %load = load <1 x i8>, <1 x i8> addrspace(3)* %in
455  %ext = sext <1 x i8> %load to <1 x i16>
456  store <1 x i16> %ext, <1 x i16> addrspace(3)* %out
457  ret void
458}
459
460; FUNC-LABEL: {{^}}local_zextload_v2i8_to_v2i16:
461define void @local_zextload_v2i8_to_v2i16(<2 x i16> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
462  %load = load <2 x i8>, <2 x i8> addrspace(3)* %in
463  %ext = zext <2 x i8> %load to <2 x i16>
464  store <2 x i16> %ext, <2 x i16> addrspace(3)* %out
465  ret void
466}
467
468; FUNC-LABEL: {{^}}local_sextload_v2i8_to_v2i16:
469define void @local_sextload_v2i8_to_v2i16(<2 x i16> addrspace(3)* %out, <2 x i8> addrspace(3)* %in) #0 {
470  %load = load <2 x i8>, <2 x i8> addrspace(3)* %in
471  %ext = sext <2 x i8> %load to <2 x i16>
472  store <2 x i16> %ext, <2 x i16> addrspace(3)* %out
473  ret void
474}
475
476; FUNC-LABEL: {{^}}local_zextload_v4i8_to_v4i16:
477define void @local_zextload_v4i8_to_v4i16(<4 x i16> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
478  %load = load <4 x i8>, <4 x i8> addrspace(3)* %in
479  %ext = zext <4 x i8> %load to <4 x i16>
480  store <4 x i16> %ext, <4 x i16> addrspace(3)* %out
481  ret void
482}
483
484; FUNC-LABEL: {{^}}local_sextload_v4i8_to_v4i16:
485define void @local_sextload_v4i8_to_v4i16(<4 x i16> addrspace(3)* %out, <4 x i8> addrspace(3)* %in) #0 {
486  %load = load <4 x i8>, <4 x i8> addrspace(3)* %in
487  %ext = sext <4 x i8> %load to <4 x i16>
488  store <4 x i16> %ext, <4 x i16> addrspace(3)* %out
489  ret void
490}
491
492; FUNC-LABEL: {{^}}local_zextload_v8i8_to_v8i16:
493define void @local_zextload_v8i8_to_v8i16(<8 x i16> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
494  %load = load <8 x i8>, <8 x i8> addrspace(3)* %in
495  %ext = zext <8 x i8> %load to <8 x i16>
496  store <8 x i16> %ext, <8 x i16> addrspace(3)* %out
497  ret void
498}
499
500; FUNC-LABEL: {{^}}local_sextload_v8i8_to_v8i16:
501define void @local_sextload_v8i8_to_v8i16(<8 x i16> addrspace(3)* %out, <8 x i8> addrspace(3)* %in) #0 {
502  %load = load <8 x i8>, <8 x i8> addrspace(3)* %in
503  %ext = sext <8 x i8> %load to <8 x i16>
504  store <8 x i16> %ext, <8 x i16> addrspace(3)* %out
505  ret void
506}
507
508; FUNC-LABEL: {{^}}local_zextload_v16i8_to_v16i16:
509define void @local_zextload_v16i8_to_v16i16(<16 x i16> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
510  %load = load <16 x i8>, <16 x i8> addrspace(3)* %in
511  %ext = zext <16 x i8> %load to <16 x i16>
512  store <16 x i16> %ext, <16 x i16> addrspace(3)* %out
513  ret void
514}
515
516; FUNC-LABEL: {{^}}local_sextload_v16i8_to_v16i16:
517define void @local_sextload_v16i8_to_v16i16(<16 x i16> addrspace(3)* %out, <16 x i8> addrspace(3)* %in) #0 {
518  %load = load <16 x i8>, <16 x i8> addrspace(3)* %in
519  %ext = sext <16 x i8> %load to <16 x i16>
520  store <16 x i16> %ext, <16 x i16> addrspace(3)* %out
521  ret void
522}
523
524; FUNC-LABEL: {{^}}local_zextload_v32i8_to_v32i16:
525define void @local_zextload_v32i8_to_v32i16(<32 x i16> addrspace(3)* %out, <32 x i8> addrspace(3)* %in) #0 {
526  %load = load <32 x i8>, <32 x i8> addrspace(3)* %in
527  %ext = zext <32 x i8> %load to <32 x i16>
528  store <32 x i16> %ext, <32 x i16> addrspace(3)* %out
529  ret void
530}
531
532; FUNC-LABEL: {{^}}local_sextload_v32i8_to_v32i16:
533define void @local_sextload_v32i8_to_v32i16(<32 x i16> addrspace(3)* %out, <32 x i8> addrspace(3)* %in) #0 {
534  %load = load <32 x i8>, <32 x i8> addrspace(3)* %in
535  %ext = sext <32 x i8> %load to <32 x i16>
536  store <32 x i16> %ext, <32 x i16> addrspace(3)* %out
537  ret void
538}
539
540; XFUNC-LABEL: {{^}}local_zextload_v64i8_to_v64i16:
541; define void @local_zextload_v64i8_to_v64i16(<64 x i16> addrspace(3)* %out, <64 x i8> addrspace(3)* %in) #0 {
542;   %load = load <64 x i8>, <64 x i8> addrspace(3)* %in
543;   %ext = zext <64 x i8> %load to <64 x i16>
544;   store <64 x i16> %ext, <64 x i16> addrspace(3)* %out
545;   ret void
546; }
547
548; XFUNC-LABEL: {{^}}local_sextload_v64i8_to_v64i16:
549; define void @local_sextload_v64i8_to_v64i16(<64 x i16> addrspace(3)* %out, <64 x i8> addrspace(3)* %in) #0 {
550;   %load = load <64 x i8>, <64 x i8> addrspace(3)* %in
551;   %ext = sext <64 x i8> %load to <64 x i16>
552;   store <64 x i16> %ext, <64 x i16> addrspace(3)* %out
553;   ret void
554; }
555
556attributes #0 = { nounwind }
557