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; FUNC-LABEL: {{^}}local_load_i16:
6; GCN: ds_read_u16 v{{[0-9]+}}
7
8; EG: LDS_USHORT_READ_RET
9define void @local_load_i16(i16 addrspace(3)* %out, i16 addrspace(3)* %in) {
10entry:
11  %ld = load i16, i16 addrspace(3)* %in
12  store i16 %ld, i16 addrspace(3)* %out
13  ret void
14}
15
16; FUNC-LABEL: {{^}}local_load_v2i16:
17; GCN: ds_read_b32
18
19; EG: LDS_READ_RET
20define void @local_load_v2i16(<2 x i16> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) {
21entry:
22  %ld = load <2 x i16>, <2 x i16> addrspace(3)* %in
23  store <2 x i16> %ld, <2 x i16> addrspace(3)* %out
24  ret void
25}
26
27; FUNC-LABEL: {{^}}local_load_v3i16:
28; GCN: ds_read_b64
29; GCN-DAG: ds_write_b32
30; GCN-DAG: ds_write_b16
31
32; EG-DAG: LDS_USHORT_READ_RET
33; EG-DAG: LDS_READ_RET
34define void @local_load_v3i16(<3 x i16> addrspace(3)* %out, <3 x i16> addrspace(3)* %in) {
35entry:
36  %ld = load <3 x i16>, <3 x i16> addrspace(3)* %in
37  store <3 x i16> %ld, <3 x i16> addrspace(3)* %out
38  ret void
39}
40
41; FUNC-LABEL: {{^}}local_load_v4i16:
42; GCN: ds_read_b64
43
44; EG: LDS_READ_RET
45; EG: LDS_READ_RET
46define void @local_load_v4i16(<4 x i16> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) {
47entry:
48  %ld = load <4 x i16>, <4 x i16> addrspace(3)* %in
49  store <4 x i16> %ld, <4 x i16> addrspace(3)* %out
50  ret void
51}
52
53; FUNC-LABEL: {{^}}local_load_v8i16:
54; GCN: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:1{{$}}
55
56; EG: LDS_READ_RET
57; EG: LDS_READ_RET
58; EG: LDS_READ_RET
59; EG: LDS_READ_RET
60define void @local_load_v8i16(<8 x i16> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) {
61entry:
62  %ld = load <8 x i16>, <8 x i16> addrspace(3)* %in
63  store <8 x i16> %ld, <8 x i16> addrspace(3)* %out
64  ret void
65}
66
67; FUNC-LABEL: {{^}}local_load_v16i16:
68; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:3 offset1:2{{$}}
69; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:1{{$}}
70
71
72; EG: LDS_READ_RET
73; EG: LDS_READ_RET
74; EG: LDS_READ_RET
75; EG: LDS_READ_RET
76
77; EG: LDS_READ_RET
78; EG: LDS_READ_RET
79; EG: LDS_READ_RET
80; EG: LDS_READ_RET
81define void @local_load_v16i16(<16 x i16> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) {
82entry:
83  %ld = load <16 x i16>, <16 x i16> addrspace(3)* %in
84  store <16 x i16> %ld, <16 x i16> addrspace(3)* %out
85  ret void
86}
87
88; FUNC-LABEL: {{^}}local_zextload_i16_to_i32:
89; GCN: ds_read_u16
90; GCN: ds_write_b32
91
92; EG: LDS_USHORT_READ_RET
93define void @local_zextload_i16_to_i32(i32 addrspace(3)* %out, i16 addrspace(3)* %in) #0 {
94  %a = load i16, i16 addrspace(3)* %in
95  %ext = zext i16 %a to i32
96  store i32 %ext, i32 addrspace(3)* %out
97  ret void
98}
99
100; FUNC-LABEL: {{^}}local_sextload_i16_to_i32:
101; GCN-NOT: s_wqm_b64
102; GCN: s_mov_b32 m0
103; GCN: ds_read_i16
104
105; EG: LDS_USHORT_READ_RET
106; EG: BFE_INT
107define void @local_sextload_i16_to_i32(i32 addrspace(3)* %out, i16 addrspace(3)* %in) #0 {
108  %a = load i16, i16 addrspace(3)* %in
109  %ext = sext i16 %a to i32
110  store i32 %ext, i32 addrspace(3)* %out
111  ret void
112}
113
114; FUNC-LABEL: {{^}}local_zextload_v1i16_to_v1i32:
115; GCN: ds_read_u16
116define void @local_zextload_v1i16_to_v1i32(<1 x i32> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 {
117  %load = load <1 x i16>, <1 x i16> addrspace(3)* %in
118  %ext = zext <1 x i16> %load to <1 x i32>
119  store <1 x i32> %ext, <1 x i32> addrspace(3)* %out
120  ret void
121}
122
123; FUNC-LABEL: {{^}}local_sextload_v1i16_to_v1i32:
124; GCN: ds_read_i16
125define void @local_sextload_v1i16_to_v1i32(<1 x i32> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 {
126  %load = load <1 x i16>, <1 x i16> addrspace(3)* %in
127  %ext = sext <1 x i16> %load to <1 x i32>
128  store <1 x i32> %ext, <1 x i32> addrspace(3)* %out
129  ret void
130}
131
132; FUNC-LABEL: {{^}}local_zextload_v2i16_to_v2i32:
133; GCN-NOT: s_wqm_b64
134; GCN: s_mov_b32 m0
135; GCN: ds_read_b32
136
137; EG: LDS_USHORT_READ_RET
138; EG: LDS_USHORT_READ_RET
139define void @local_zextload_v2i16_to_v2i32(<2 x i32> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 {
140  %load = load <2 x i16>, <2 x i16> addrspace(3)* %in
141  %ext = zext <2 x i16> %load to <2 x i32>
142  store <2 x i32> %ext, <2 x i32> addrspace(3)* %out
143  ret void
144}
145
146; FUNC-LABEL: {{^}}local_sextload_v2i16_to_v2i32:
147; GCN-NOT: s_wqm_b64
148; GCN: s_mov_b32 m0
149; GCN: ds_read_b32
150
151; EG-DAG: LDS_USHORT_READ_RET
152; EG-DAG: LDS_USHORT_READ_RET
153; EG-DAG: BFE_INT
154; EG-DAG: BFE_INT
155define void @local_sextload_v2i16_to_v2i32(<2 x i32> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 {
156  %load = load <2 x i16>, <2 x i16> addrspace(3)* %in
157  %ext = sext <2 x i16> %load to <2 x i32>
158  store <2 x i32> %ext, <2 x i32> addrspace(3)* %out
159  ret void
160}
161
162; FUNC-LABEL: {{^}}local_local_zextload_v3i16_to_v3i32:
163; GCN: ds_read_b64
164; GCN-DAG: ds_write_b32
165; GCN-DAG: ds_write_b64
166define void @local_local_zextload_v3i16_to_v3i32(<3 x i32> addrspace(3)* %out, <3 x i16> addrspace(3)* %in) {
167entry:
168  %ld = load <3 x i16>, <3 x i16> addrspace(3)* %in
169  %ext = zext <3 x i16> %ld to <3 x i32>
170  store <3 x i32> %ext, <3 x i32> addrspace(3)* %out
171  ret void
172}
173
174; FUNC-LABEL: {{^}}local_local_sextload_v3i16_to_v3i32:
175; GCN: ds_read_b64
176; GCN-DAG: ds_write_b32
177; GCN-DAG: ds_write_b64
178define void @local_local_sextload_v3i16_to_v3i32(<3 x i32> addrspace(3)* %out, <3 x i16> addrspace(3)* %in) {
179entry:
180  %ld = load <3 x i16>, <3 x i16> addrspace(3)* %in
181  %ext = sext <3 x i16> %ld to <3 x i32>
182  store <3 x i32> %ext, <3 x i32> addrspace(3)* %out
183  ret void
184}
185
186; FUNC-LABEL: {{^}}local_local_zextload_v4i16_to_v4i32:
187; GCN-NOT: s_wqm_b64
188; GCN: s_mov_b32 m0
189; GCN: ds_read_b64
190
191; EG: LDS_USHORT_READ_RET
192; EG: LDS_USHORT_READ_RET
193; EG: LDS_USHORT_READ_RET
194; EG: LDS_USHORT_READ_RET
195define void @local_local_zextload_v4i16_to_v4i32(<4 x i32> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 {
196  %load = load <4 x i16>, <4 x i16> addrspace(3)* %in
197  %ext = zext <4 x i16> %load to <4 x i32>
198  store <4 x i32> %ext, <4 x i32> addrspace(3)* %out
199  ret void
200}
201
202; FUNC-LABEL: {{^}}local_sextload_v4i16_to_v4i32:
203; GCN-NOT: s_wqm_b64
204; GCN: s_mov_b32 m0
205; GCN: ds_read_b64
206
207; EG-DAG: LDS_USHORT_READ_RET
208; EG-DAG: LDS_USHORT_READ_RET
209; EG-DAG: LDS_USHORT_READ_RET
210; EG-DAG: LDS_USHORT_READ_RET
211; EG-DAG: BFE_INT
212; EG-DAG: BFE_INT
213; EG-DAG: BFE_INT
214; EG-DAG: BFE_INT
215define void @local_sextload_v4i16_to_v4i32(<4 x i32> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 {
216  %load = load <4 x i16>, <4 x i16> addrspace(3)* %in
217  %ext = sext <4 x i16> %load to <4 x i32>
218  store <4 x i32> %ext, <4 x i32> addrspace(3)* %out
219  ret void
220}
221
222; FUNC-LABEL: {{^}}local_zextload_v8i16_to_v8i32:
223; GCN: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset1:1{{$}}
224define void @local_zextload_v8i16_to_v8i32(<8 x i32> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 {
225  %load = load <8 x i16>, <8 x i16> addrspace(3)* %in
226  %ext = zext <8 x i16> %load to <8 x i32>
227  store <8 x i32> %ext, <8 x i32> addrspace(3)* %out
228  ret void
229}
230
231; FUNC-LABEL: {{^}}local_sextload_v8i16_to_v8i32:
232; GCN: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset1:1{{$}}
233define void @local_sextload_v8i16_to_v8i32(<8 x i32> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 {
234  %load = load <8 x i16>, <8 x i16> addrspace(3)* %in
235  %ext = sext <8 x i16> %load to <8 x i32>
236  store <8 x i32> %ext, <8 x i32> addrspace(3)* %out
237  ret void
238}
239
240; FIXME: Should have 2 ds_read_b64
241; FUNC-LABEL: {{^}}local_zextload_v16i16_to_v16i32:
242; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:1 offset1:2{{$}}
243; GCN-DAG: ds_read_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+$}}
244; GCN-DAG: ds_read_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:24
245
246; GCN: ds_write2_b64
247; GCN: ds_write2_b64
248; GCN: ds_write2_b64
249; GCN: ds_write2_b64
250define void @local_zextload_v16i16_to_v16i32(<16 x i32> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 {
251  %load = load <16 x i16>, <16 x i16> addrspace(3)* %in
252  %ext = zext <16 x i16> %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_sextload_v16i16_to_v16i32:
258; GCN-DAG: ds_read_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+$}}
259; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:3 offset1:1{{$}}
260; GCN-DAG: ds_read_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:16{{$}}
261define void @local_sextload_v16i16_to_v16i32(<16 x i32> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 {
262  %load = load <16 x i16>, <16 x i16> addrspace(3)* %in
263  %ext = sext <16 x i16> %load to <16 x i32>
264  store <16 x i32> %ext, <16 x i32> addrspace(3)* %out
265  ret void
266}
267
268; FUNC-LABEL: {{^}}local_zextload_v32i16_to_v32i32:
269; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset1:1{{$}}
270; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:2 offset1:3
271; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:4 offset1:5
272; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:6 offset1:7
273define void @local_zextload_v32i16_to_v32i32(<32 x i32> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 {
274  %load = load <32 x i16>, <32 x i16> addrspace(3)* %in
275  %ext = zext <32 x i16> %load to <32 x i32>
276  store <32 x i32> %ext, <32 x i32> addrspace(3)* %out
277  ret void
278}
279
280; FUNC-LABEL: {{^}}local_sextload_v32i16_to_v32i32:
281; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:1 offset1:2{{$}}
282; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:3 offset1:4
283; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:5{{$}}
284; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:6 offset1:7
285define void @local_sextload_v32i16_to_v32i32(<32 x i32> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 {
286  %load = load <32 x i16>, <32 x i16> addrspace(3)* %in
287  %ext = sext <32 x i16> %load to <32 x i32>
288  store <32 x i32> %ext, <32 x i32> addrspace(3)* %out
289  ret void
290}
291
292; FIXME: Missed read2
293; FUNC-LABEL: {{^}}local_zextload_v64i16_to_v64i32:
294; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:11 offset1:15
295; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset1:1{{$}}
296; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:2 offset1:3
297; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:4 offset1:5
298; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:6 offset1:7
299; GCN-DAG: ds_read_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:64
300; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:9 offset1:10
301; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:12 offset1:13
302; GCN-DAG: ds_read_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset:112
303define void @local_zextload_v64i16_to_v64i32(<64 x i32> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 {
304  %load = load <64 x i16>, <64 x i16> addrspace(3)* %in
305  %ext = zext <64 x i16> %load to <64 x i32>
306  store <64 x i32> %ext, <64 x i32> addrspace(3)* %out
307  ret void
308}
309
310; FUNC-LABEL: {{^}}local_sextload_v64i16_to_v64i32:
311define void @local_sextload_v64i16_to_v64i32(<64 x i32> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 {
312  %load = load <64 x i16>, <64 x i16> addrspace(3)* %in
313  %ext = sext <64 x i16> %load to <64 x i32>
314  store <64 x i32> %ext, <64 x i32> addrspace(3)* %out
315  ret void
316}
317
318; FUNC-LABEL: {{^}}local_zextload_i16_to_i64:
319; GCN-DAG: ds_read_u16 v[[LO:[0-9]+]],
320; GCN-DAG: v_mov_b32_e32 v[[HI:[0-9]+]], 0{{$}}
321
322; GCN: ds_write_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:[[HI]]]
323define void @local_zextload_i16_to_i64(i64 addrspace(3)* %out, i16 addrspace(3)* %in) #0 {
324  %a = load i16, i16 addrspace(3)* %in
325  %ext = zext i16 %a to i64
326  store i64 %ext, i64 addrspace(3)* %out
327  ret void
328}
329
330; FUNC-LABEL: {{^}}local_sextload_i16_to_i64:
331; GCN: ds_read_i16 v[[LO:[0-9]+]],
332; GCN-DAG: v_ashrrev_i32_e32 v[[HI:[0-9]+]], 31, v[[LO]]
333
334; GCN: ds_write_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:[[HI]]]
335define void @local_sextload_i16_to_i64(i64 addrspace(3)* %out, i16 addrspace(3)* %in) #0 {
336  %a = load i16, i16 addrspace(3)* %in
337  %ext = sext i16 %a to i64
338  store i64 %ext, i64 addrspace(3)* %out
339  ret void
340}
341
342; FUNC-LABEL: {{^}}local_zextload_v1i16_to_v1i64:
343define void @local_zextload_v1i16_to_v1i64(<1 x i64> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 {
344  %load = load <1 x i16>, <1 x i16> addrspace(3)* %in
345  %ext = zext <1 x i16> %load to <1 x i64>
346  store <1 x i64> %ext, <1 x i64> addrspace(3)* %out
347  ret void
348}
349
350; FUNC-LABEL: {{^}}local_sextload_v1i16_to_v1i64:
351define void @local_sextload_v1i16_to_v1i64(<1 x i64> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 {
352  %load = load <1 x i16>, <1 x i16> addrspace(3)* %in
353  %ext = sext <1 x i16> %load to <1 x i64>
354  store <1 x i64> %ext, <1 x i64> addrspace(3)* %out
355  ret void
356}
357
358; FUNC-LABEL: {{^}}local_zextload_v2i16_to_v2i64:
359define void @local_zextload_v2i16_to_v2i64(<2 x i64> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 {
360  %load = load <2 x i16>, <2 x i16> addrspace(3)* %in
361  %ext = zext <2 x i16> %load to <2 x i64>
362  store <2 x i64> %ext, <2 x i64> addrspace(3)* %out
363  ret void
364}
365
366; FUNC-LABEL: {{^}}local_sextload_v2i16_to_v2i64:
367define void @local_sextload_v2i16_to_v2i64(<2 x i64> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 {
368  %load = load <2 x i16>, <2 x i16> addrspace(3)* %in
369  %ext = sext <2 x i16> %load to <2 x i64>
370  store <2 x i64> %ext, <2 x i64> addrspace(3)* %out
371  ret void
372}
373
374; FUNC-LABEL: {{^}}local_zextload_v4i16_to_v4i64:
375define void @local_zextload_v4i16_to_v4i64(<4 x i64> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 {
376  %load = load <4 x i16>, <4 x i16> addrspace(3)* %in
377  %ext = zext <4 x i16> %load to <4 x i64>
378  store <4 x i64> %ext, <4 x i64> addrspace(3)* %out
379  ret void
380}
381
382; FUNC-LABEL: {{^}}local_sextload_v4i16_to_v4i64:
383define void @local_sextload_v4i16_to_v4i64(<4 x i64> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 {
384  %load = load <4 x i16>, <4 x i16> addrspace(3)* %in
385  %ext = sext <4 x i16> %load to <4 x i64>
386  store <4 x i64> %ext, <4 x i64> addrspace(3)* %out
387  ret void
388}
389
390; FUNC-LABEL: {{^}}local_zextload_v8i16_to_v8i64:
391define void @local_zextload_v8i16_to_v8i64(<8 x i64> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 {
392  %load = load <8 x i16>, <8 x i16> addrspace(3)* %in
393  %ext = zext <8 x i16> %load to <8 x i64>
394  store <8 x i64> %ext, <8 x i64> addrspace(3)* %out
395  ret void
396}
397
398; FUNC-LABEL: {{^}}local_sextload_v8i16_to_v8i64:
399define void @local_sextload_v8i16_to_v8i64(<8 x i64> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 {
400  %load = load <8 x i16>, <8 x i16> addrspace(3)* %in
401  %ext = sext <8 x i16> %load to <8 x i64>
402  store <8 x i64> %ext, <8 x i64> addrspace(3)* %out
403  ret void
404}
405
406; FUNC-LABEL: {{^}}local_zextload_v16i16_to_v16i64:
407define void @local_zextload_v16i16_to_v16i64(<16 x i64> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 {
408  %load = load <16 x i16>, <16 x i16> addrspace(3)* %in
409  %ext = zext <16 x i16> %load to <16 x i64>
410  store <16 x i64> %ext, <16 x i64> addrspace(3)* %out
411  ret void
412}
413
414; FUNC-LABEL: {{^}}local_sextload_v16i16_to_v16i64:
415define void @local_sextload_v16i16_to_v16i64(<16 x i64> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 {
416  %load = load <16 x i16>, <16 x i16> addrspace(3)* %in
417  %ext = sext <16 x i16> %load to <16 x i64>
418  store <16 x i64> %ext, <16 x i64> addrspace(3)* %out
419  ret void
420}
421
422; FUNC-LABEL: {{^}}local_zextload_v32i16_to_v32i64:
423define void @local_zextload_v32i16_to_v32i64(<32 x i64> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 {
424  %load = load <32 x i16>, <32 x i16> addrspace(3)* %in
425  %ext = zext <32 x i16> %load to <32 x i64>
426  store <32 x i64> %ext, <32 x i64> addrspace(3)* %out
427  ret void
428}
429
430; FUNC-LABEL: {{^}}local_sextload_v32i16_to_v32i64:
431define void @local_sextload_v32i16_to_v32i64(<32 x i64> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 {
432  %load = load <32 x i16>, <32 x i16> addrspace(3)* %in
433  %ext = sext <32 x i16> %load to <32 x i64>
434  store <32 x i64> %ext, <32 x i64> addrspace(3)* %out
435  ret void
436}
437
438; ; XFUNC-LABEL: {{^}}local_zextload_v64i16_to_v64i64:
439; define void @local_zextload_v64i16_to_v64i64(<64 x i64> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 {
440;   %load = load <64 x i16>, <64 x i16> addrspace(3)* %in
441;   %ext = zext <64 x i16> %load to <64 x i64>
442;   store <64 x i64> %ext, <64 x i64> addrspace(3)* %out
443;   ret void
444; }
445
446; ; XFUNC-LABEL: {{^}}local_sextload_v64i16_to_v64i64:
447; define void @local_sextload_v64i16_to_v64i64(<64 x i64> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 {
448;   %load = load <64 x i16>, <64 x i16> addrspace(3)* %in
449;   %ext = sext <64 x i16> %load to <64 x i64>
450;   store <64 x i64> %ext, <64 x i64> addrspace(3)* %out
451;   ret void
452; }
453
454attributes #0 = { nounwind }
455