• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-NOHSA -check-prefix=FUNC %s
2; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-HSA -check-prefix=FUNC %s
3; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-NOHSA -check-prefix=FUNC %s
4; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
5; RUN: llc -march=r600 -mcpu=cayman < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
6
7; FIXME: r600 is broken because the bigger testcases spill and it's not implemented
8
9; FUNC-LABEL: {{^}}global_load_i16:
10; GCN-NOHSA: buffer_load_ushort v{{[0-9]+}}
11; GCN-HSA: flat_load_ushort
12
13; EG: VTX_READ_16 T{{[0-9]+}}.X, T{{[0-9]+}}.X, 0
14define void @global_load_i16(i16 addrspace(1)* %out, i16 addrspace(1)* %in) {
15entry:
16  %ld = load i16, i16 addrspace(1)* %in
17  store i16 %ld, i16 addrspace(1)* %out
18  ret void
19}
20
21; FUNC-LABEL: {{^}}global_load_v2i16:
22; GCN-NOHSA: buffer_load_dword v
23; GCN-HSA: flat_load_dword v
24
25; EG: VTX_READ_32
26define void @global_load_v2i16(<2 x i16> addrspace(1)* %out, <2 x i16> addrspace(1)* %in) {
27entry:
28  %ld = load <2 x i16>, <2 x i16> addrspace(1)* %in
29  store <2 x i16> %ld, <2 x i16> addrspace(1)* %out
30  ret void
31}
32
33; FUNC-LABEL: {{^}}global_load_v3i16:
34; GCN-NOHSA: buffer_load_dwordx2 v
35; GCN-HSA: flat_load_dwordx2 v
36
37; EG-DAG: VTX_READ_32
38; EG-DAG: VTX_READ_16
39define void @global_load_v3i16(<3 x i16> addrspace(1)* %out, <3 x i16> addrspace(1)* %in) {
40entry:
41  %ld = load <3 x i16>, <3 x i16> addrspace(1)* %in
42  store <3 x i16> %ld, <3 x i16> addrspace(1)* %out
43  ret void
44}
45
46; FUNC-LABEL: {{^}}global_load_v4i16:
47; GCN-NOHSA: buffer_load_dwordx2
48; GCN-HSA: flat_load_dwordx2
49
50; EG: VTX_READ_64
51define void @global_load_v4i16(<4 x i16> addrspace(1)* %out, <4 x i16> addrspace(1)* %in) {
52entry:
53  %ld = load <4 x i16>, <4 x i16> addrspace(1)* %in
54  store <4 x i16> %ld, <4 x i16> addrspace(1)* %out
55  ret void
56}
57
58; FUNC-LABEL: {{^}}global_load_v8i16:
59; GCN-NOHSA: buffer_load_dwordx4
60; GCN-HSA: flat_load_dwordx4
61
62; EG: VTX_READ_128
63define void @global_load_v8i16(<8 x i16> addrspace(1)* %out, <8 x i16> addrspace(1)* %in) {
64entry:
65  %ld = load <8 x i16>, <8 x i16> addrspace(1)* %in
66  store <8 x i16> %ld, <8 x i16> addrspace(1)* %out
67  ret void
68}
69
70; FUNC-LABEL: {{^}}global_load_v16i16:
71; GCN-NOHSA: buffer_load_dwordx4
72; GCN-NOHSA: buffer_load_dwordx4
73
74; GCN-HSA: flat_load_dwordx4
75; GCN-HSA: flat_load_dwordx4
76
77; EG: VTX_READ_128
78; EG: VTX_READ_128
79define void @global_load_v16i16(<16 x i16> addrspace(1)* %out, <16 x i16> addrspace(1)* %in) {
80entry:
81  %ld = load <16 x i16>, <16 x i16> addrspace(1)* %in
82  store <16 x i16> %ld, <16 x i16> addrspace(1)* %out
83  ret void
84}
85
86; FUNC-LABEL: {{^}}global_zextload_i16_to_i32:
87; GCN-NOHSA: buffer_load_ushort
88; GCN-NOHSA: buffer_store_dword
89
90; GCN-HSA: flat_load_ushort
91; GCN-HSA: flat_store_dword
92
93; EG: VTX_READ_16 T{{[0-9]+\.X, T[0-9]+\.X}}
94define void @global_zextload_i16_to_i32(i32 addrspace(1)* %out, i16 addrspace(1)* %in) #0 {
95  %a = load i16, i16 addrspace(1)* %in
96  %ext = zext i16 %a to i32
97  store i32 %ext, i32 addrspace(1)* %out
98  ret void
99}
100
101; FUNC-LABEL: {{^}}global_sextload_i16_to_i32:
102; GCN-NOHSA: buffer_load_sshort
103; GCN-NOHSA: buffer_store_dword
104
105; GCN-HSA: flat_load_sshort
106; GCN-HSA: flat_store_dword
107
108; EG: VTX_READ_16 [[DST:T[0-9]\.[XYZW]]], [[DST]]
109; EG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST]], 0.0, literal
110; EG: 16
111define void @global_sextload_i16_to_i32(i32 addrspace(1)* %out, i16 addrspace(1)* %in) #0 {
112  %a = load i16, i16 addrspace(1)* %in
113  %ext = sext i16 %a to i32
114  store i32 %ext, i32 addrspace(1)* %out
115  ret void
116}
117
118; FUNC-LABEL: {{^}}global_zextload_v1i16_to_v1i32:
119; GCN-NOHSA: buffer_load_ushort
120; GCN-HSA: flat_load_ushort
121define void @global_zextload_v1i16_to_v1i32(<1 x i32> addrspace(1)* %out, <1 x i16> addrspace(1)* %in) #0 {
122  %load = load <1 x i16>, <1 x i16> addrspace(1)* %in
123  %ext = zext <1 x i16> %load to <1 x i32>
124  store <1 x i32> %ext, <1 x i32> addrspace(1)* %out
125  ret void
126}
127
128; FUNC-LABEL: {{^}}global_sextload_v1i16_to_v1i32:
129; GCN-NOHSA: buffer_load_sshort
130; GCN-HSA: flat_load_sshort
131define void @global_sextload_v1i16_to_v1i32(<1 x i32> addrspace(1)* %out, <1 x i16> addrspace(1)* %in) #0 {
132  %load = load <1 x i16>, <1 x i16> addrspace(1)* %in
133  %ext = sext <1 x i16> %load to <1 x i32>
134  store <1 x i32> %ext, <1 x i32> addrspace(1)* %out
135  ret void
136}
137
138; FUNC-LABEL: {{^}}global_zextload_v2i16_to_v2i32:
139; GCN-NOHSA: buffer_load_dword
140; GCN-HSA: flat_load_dword
141define void @global_zextload_v2i16_to_v2i32(<2 x i32> addrspace(1)* %out, <2 x i16> addrspace(1)* %in) #0 {
142  %load = load <2 x i16>, <2 x i16> addrspace(1)* %in
143  %ext = zext <2 x i16> %load to <2 x i32>
144  store <2 x i32> %ext, <2 x i32> addrspace(1)* %out
145  ret void
146}
147
148; FUNC-LABEL: {{^}}global_sextload_v2i16_to_v2i32:
149; GCN-NOHSA: buffer_load_dword
150
151; GCN-HSA: flat_load_dword
152
153; EG-DAG: VTX_READ_16 [[DST_X:T[0-9]\.[XYZW]]], [[DST_X]]
154; EG-DAG: VTX_READ_16 [[DST_Y:T[0-9]\.[XYZW]]], [[DST_Y]]
155; EG-DAG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST_X]], 0.0, literal
156; EG-DAG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST_Y]], 0.0, literal
157; EG-DAG: 16
158; EG-DAG: 16
159define void @global_sextload_v2i16_to_v2i32(<2 x i32> addrspace(1)* %out, <2 x i16> addrspace(1)* %in) #0 {
160  %load = load <2 x i16>, <2 x i16> addrspace(1)* %in
161  %ext = sext <2 x i16> %load to <2 x i32>
162  store <2 x i32> %ext, <2 x i32> addrspace(1)* %out
163  ret void
164}
165
166; FUNC-LABEL: {{^}}global_global_zextload_v3i16_to_v3i32:
167; GCN-NOHSA: buffer_load_dwordx2
168; GCN-HSA: flat_load_dwordx2
169define void @global_global_zextload_v3i16_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i16> addrspace(1)* %in) {
170entry:
171  %ld = load <3 x i16>, <3 x i16> addrspace(1)* %in
172  %ext = zext <3 x i16> %ld to <3 x i32>
173  store <3 x i32> %ext, <3 x i32> addrspace(1)* %out
174  ret void
175}
176
177; FUNC-LABEL: {{^}}global_global_sextload_v3i16_to_v3i32:
178; GCN-NOHSA: buffer_load_dwordx2
179; GCN-HSA: flat_load_dwordx2
180define void @global_global_sextload_v3i16_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i16> addrspace(1)* %in) {
181entry:
182  %ld = load <3 x i16>, <3 x i16> addrspace(1)* %in
183  %ext = sext <3 x i16> %ld to <3 x i32>
184  store <3 x i32> %ext, <3 x i32> addrspace(1)* %out
185  ret void
186}
187
188; FUNC-LABEL: {{^}}global_global_zextload_v4i16_to_v4i32:
189; GCN-NOHSA: buffer_load_dwordx2
190
191; GCN-HSA: flat_load_dwordx2
192
193; EG: VTX_READ_16
194; EG: VTX_READ_16
195; EG: VTX_READ_16
196; EG: VTX_READ_16
197define void @global_global_zextload_v4i16_to_v4i32(<4 x i32> addrspace(1)* %out, <4 x i16> addrspace(1)* %in) #0 {
198  %load = load <4 x i16>, <4 x i16> addrspace(1)* %in
199  %ext = zext <4 x i16> %load to <4 x i32>
200  store <4 x i32> %ext, <4 x i32> addrspace(1)* %out
201  ret void
202}
203
204; FUNC-LABEL: {{^}}global_sextload_v4i16_to_v4i32:
205; GCN-NOHSA: buffer_load_dwordx2
206
207; GCN-HSA: flat_load_dwordx2
208
209; EG-DAG: VTX_READ_16 [[DST_X:T[0-9]\.[XYZW]]], [[DST_X]]
210; EG-DAG: VTX_READ_16 [[DST_Y:T[0-9]\.[XYZW]]], [[DST_Y]]
211; EG-DAG: VTX_READ_16 [[DST_Z:T[0-9]\.[XYZW]]], [[DST_Z]]
212; EG-DAG: VTX_READ_16 [[DST_W:T[0-9]\.[XYZW]]], [[DST_W]]
213; EG-DAG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST_X]], 0.0, literal
214; EG-DAG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST_Y]], 0.0, literal
215; EG-DAG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST_Z]], 0.0, literal
216; EG-DAG: BFE_INT {{[* ]*}}T{{[0-9].[XYZW]}}, [[DST_W]], 0.0, literal
217; EG-DAG: 16
218; EG-DAG: 16
219; EG-DAG: 16
220; EG-DAG: 16
221define void @global_sextload_v4i16_to_v4i32(<4 x i32> addrspace(1)* %out, <4 x i16> addrspace(1)* %in) #0 {
222  %load = load <4 x i16>, <4 x i16> addrspace(1)* %in
223  %ext = sext <4 x i16> %load to <4 x i32>
224  store <4 x i32> %ext, <4 x i32> addrspace(1)* %out
225  ret void
226}
227
228; FUNC-LABEL: {{^}}global_zextload_v8i16_to_v8i32:
229; GCN-NOHSA: buffer_load_dwordx4
230; GCN-HSA: flat_load_dwordx4
231define void @global_zextload_v8i16_to_v8i32(<8 x i32> addrspace(1)* %out, <8 x i16> addrspace(1)* %in) #0 {
232  %load = load <8 x i16>, <8 x i16> addrspace(1)* %in
233  %ext = zext <8 x i16> %load to <8 x i32>
234  store <8 x i32> %ext, <8 x i32> addrspace(1)* %out
235  ret void
236}
237
238; FUNC-LABEL: {{^}}global_sextload_v8i16_to_v8i32:
239; GCN-NOHSA: buffer_load_dwordx4
240; GCN-HSA: flat_load_dwordx4
241define void @global_sextload_v8i16_to_v8i32(<8 x i32> addrspace(1)* %out, <8 x i16> addrspace(1)* %in) #0 {
242  %load = load <8 x i16>, <8 x i16> addrspace(1)* %in
243  %ext = sext <8 x i16> %load to <8 x i32>
244  store <8 x i32> %ext, <8 x i32> addrspace(1)* %out
245  ret void
246}
247
248; FUNC-LABEL: {{^}}global_zextload_v16i16_to_v16i32:
249; GCN-NOHSA: buffer_load_dwordx4
250; GCN-NOHSA: buffer_load_dwordx4
251
252; GCN-HSA: flat_load_dwordx4
253; GCN-HSA: flat_load_dwordx4
254define void @global_zextload_v16i16_to_v16i32(<16 x i32> addrspace(1)* %out, <16 x i16> addrspace(1)* %in) #0 {
255  %load = load <16 x i16>, <16 x i16> addrspace(1)* %in
256  %ext = zext <16 x i16> %load to <16 x i32>
257  store <16 x i32> %ext, <16 x i32> addrspace(1)* %out
258  ret void
259}
260
261; FUNC-LABEL: {{^}}global_sextload_v16i16_to_v16i32:
262define void @global_sextload_v16i16_to_v16i32(<16 x i32> addrspace(1)* %out, <16 x i16> addrspace(1)* %in) #0 {
263  %load = load <16 x i16>, <16 x i16> addrspace(1)* %in
264  %ext = sext <16 x i16> %load to <16 x i32>
265  store <16 x i32> %ext, <16 x i32> addrspace(1)* %out
266  ret void
267}
268
269; FUNC-LABEL: {{^}}global_zextload_v32i16_to_v32i32:
270; GCN-NOHSA: buffer_load_dwordx4
271; GCN-NOHSA: buffer_load_dwordx4
272; GCN-NOHSA: buffer_load_dwordx4
273; GCN-NOHSA: buffer_load_dwordx4
274
275; GCN-HSA: flat_load_dwordx4
276; GCN-HSA: flat_load_dwordx4
277; GCN-HSA: flat_load_dwordx4
278; GCN-HSA: flat_load_dwordx4
279define void @global_zextload_v32i16_to_v32i32(<32 x i32> addrspace(1)* %out, <32 x i16> addrspace(1)* %in) #0 {
280  %load = load <32 x i16>, <32 x i16> addrspace(1)* %in
281  %ext = zext <32 x i16> %load to <32 x i32>
282  store <32 x i32> %ext, <32 x i32> addrspace(1)* %out
283  ret void
284}
285
286; FUNC-LABEL: {{^}}global_sextload_v32i16_to_v32i32:
287; GCN-NOHSA: buffer_load_dwordx4
288; GCN-NOHSA: buffer_load_dwordx4
289; GCN-NOHSA: buffer_load_dwordx4
290; GCN-NOHSA: buffer_load_dwordx4
291
292; GCN-HSA: flat_load_dwordx4
293; GCN-HSA: flat_load_dwordx4
294; GCN-HSA: flat_load_dwordx4
295; GCN-HSA: flat_load_dwordx4
296define void @global_sextload_v32i16_to_v32i32(<32 x i32> addrspace(1)* %out, <32 x i16> addrspace(1)* %in) #0 {
297  %load = load <32 x i16>, <32 x i16> addrspace(1)* %in
298  %ext = sext <32 x i16> %load to <32 x i32>
299  store <32 x i32> %ext, <32 x i32> addrspace(1)* %out
300  ret void
301}
302
303; FUNC-LABEL: {{^}}global_zextload_v64i16_to_v64i32:
304; GCN-NOHSA: buffer_load_dwordx4
305; GCN-NOHSA: buffer_load_dwordx4
306; GCN-NOHSA: buffer_load_dwordx4
307; GCN-NOHSA: buffer_load_dwordx4
308; GCN-NOHSA: buffer_load_dwordx4
309; GCN-NOHSA: buffer_load_dwordx4
310; GCN-NOHSA: buffer_load_dwordx4
311; GCN-NOHSA: buffer_load_dwordx4
312
313; GCN-HSA: flat_load_dwordx4
314; GCN-HSA: flat_load_dwordx4
315; GCN-HSA: flat_load_dwordx4
316; GCN-HSA: flat_load_dwordx4
317; GCN-HSA: flat_load_dwordx4
318; GCN-HSA: flat_load_dwordx4
319; GCN-HSA: flat_load_dwordx4
320; GCN-HSA: flat_load_dwordx4
321define void @global_zextload_v64i16_to_v64i32(<64 x i32> addrspace(1)* %out, <64 x i16> addrspace(1)* %in) #0 {
322  %load = load <64 x i16>, <64 x i16> addrspace(1)* %in
323  %ext = zext <64 x i16> %load to <64 x i32>
324  store <64 x i32> %ext, <64 x i32> addrspace(1)* %out
325  ret void
326}
327
328; FUNC-LABEL: {{^}}global_sextload_v64i16_to_v64i32:
329define void @global_sextload_v64i16_to_v64i32(<64 x i32> addrspace(1)* %out, <64 x i16> addrspace(1)* %in) #0 {
330  %load = load <64 x i16>, <64 x i16> addrspace(1)* %in
331  %ext = sext <64 x i16> %load to <64 x i32>
332  store <64 x i32> %ext, <64 x i32> addrspace(1)* %out
333  ret void
334}
335
336; FUNC-LABEL: {{^}}global_zextload_i16_to_i64:
337; GCN-NOHSA-DAG: buffer_load_ushort v[[LO:[0-9]+]],
338; GCN-HSA-DAG: flat_load_ushort v[[LO:[0-9]+]],
339; GCN-DAG: v_mov_b32_e32 v[[HI:[0-9]+]], 0{{$}}
340
341; GCN-NOHSA: buffer_store_dwordx2 v{{\[}}[[LO]]:[[HI]]]
342; GCN-HSA: flat_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, v{{\[}}[[LO]]:[[HI]]{{\]}}
343define void @global_zextload_i16_to_i64(i64 addrspace(1)* %out, i16 addrspace(1)* %in) #0 {
344  %a = load i16, i16 addrspace(1)* %in
345  %ext = zext i16 %a to i64
346  store i64 %ext, i64 addrspace(1)* %out
347  ret void
348}
349
350; FUNC-LABEL: {{^}}global_sextload_i16_to_i64:
351; GCN-NOHSA-DAG: buffer_load_sshort v[[LO:[0-9]+]],
352; GCN-HSA-DAG: flat_load_sshort v[[LO:[0-9]+]],
353; GCN-DAG: v_ashrrev_i32_e32 v[[HI:[0-9]+]], 31, v[[LO]]
354
355; GCN-NOHSA: buffer_store_dwordx2 v{{\[}}[[LO]]:[[HI]]]
356; GCN-HSA: flat_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, v{{\[}}[[LO]]:[[HI]]{{\]}}
357define void @global_sextload_i16_to_i64(i64 addrspace(1)* %out, i16 addrspace(1)* %in) #0 {
358  %a = load i16, i16 addrspace(1)* %in
359  %ext = sext i16 %a to i64
360  store i64 %ext, i64 addrspace(1)* %out
361  ret void
362}
363
364; FUNC-LABEL: {{^}}global_zextload_v1i16_to_v1i64:
365define void @global_zextload_v1i16_to_v1i64(<1 x i64> addrspace(1)* %out, <1 x i16> addrspace(1)* %in) #0 {
366  %load = load <1 x i16>, <1 x i16> addrspace(1)* %in
367  %ext = zext <1 x i16> %load to <1 x i64>
368  store <1 x i64> %ext, <1 x i64> addrspace(1)* %out
369  ret void
370}
371
372; FUNC-LABEL: {{^}}global_sextload_v1i16_to_v1i64:
373define void @global_sextload_v1i16_to_v1i64(<1 x i64> addrspace(1)* %out, <1 x i16> addrspace(1)* %in) #0 {
374  %load = load <1 x i16>, <1 x i16> addrspace(1)* %in
375  %ext = sext <1 x i16> %load to <1 x i64>
376  store <1 x i64> %ext, <1 x i64> addrspace(1)* %out
377  ret void
378}
379
380; FUNC-LABEL: {{^}}global_zextload_v2i16_to_v2i64:
381define void @global_zextload_v2i16_to_v2i64(<2 x i64> addrspace(1)* %out, <2 x i16> addrspace(1)* %in) #0 {
382  %load = load <2 x i16>, <2 x i16> addrspace(1)* %in
383  %ext = zext <2 x i16> %load to <2 x i64>
384  store <2 x i64> %ext, <2 x i64> addrspace(1)* %out
385  ret void
386}
387
388; FUNC-LABEL: {{^}}global_sextload_v2i16_to_v2i64:
389define void @global_sextload_v2i16_to_v2i64(<2 x i64> addrspace(1)* %out, <2 x i16> addrspace(1)* %in) #0 {
390  %load = load <2 x i16>, <2 x i16> addrspace(1)* %in
391  %ext = sext <2 x i16> %load to <2 x i64>
392  store <2 x i64> %ext, <2 x i64> addrspace(1)* %out
393  ret void
394}
395
396; FUNC-LABEL: {{^}}global_zextload_v4i16_to_v4i64:
397define void @global_zextload_v4i16_to_v4i64(<4 x i64> addrspace(1)* %out, <4 x i16> addrspace(1)* %in) #0 {
398  %load = load <4 x i16>, <4 x i16> addrspace(1)* %in
399  %ext = zext <4 x i16> %load to <4 x i64>
400  store <4 x i64> %ext, <4 x i64> addrspace(1)* %out
401  ret void
402}
403
404; FUNC-LABEL: {{^}}global_sextload_v4i16_to_v4i64:
405define void @global_sextload_v4i16_to_v4i64(<4 x i64> addrspace(1)* %out, <4 x i16> addrspace(1)* %in) #0 {
406  %load = load <4 x i16>, <4 x i16> addrspace(1)* %in
407  %ext = sext <4 x i16> %load to <4 x i64>
408  store <4 x i64> %ext, <4 x i64> addrspace(1)* %out
409  ret void
410}
411
412; FUNC-LABEL: {{^}}global_zextload_v8i16_to_v8i64:
413define void @global_zextload_v8i16_to_v8i64(<8 x i64> addrspace(1)* %out, <8 x i16> addrspace(1)* %in) #0 {
414  %load = load <8 x i16>, <8 x i16> addrspace(1)* %in
415  %ext = zext <8 x i16> %load to <8 x i64>
416  store <8 x i64> %ext, <8 x i64> addrspace(1)* %out
417  ret void
418}
419
420; FUNC-LABEL: {{^}}global_sextload_v8i16_to_v8i64:
421define void @global_sextload_v8i16_to_v8i64(<8 x i64> addrspace(1)* %out, <8 x i16> addrspace(1)* %in) #0 {
422  %load = load <8 x i16>, <8 x i16> addrspace(1)* %in
423  %ext = sext <8 x i16> %load to <8 x i64>
424  store <8 x i64> %ext, <8 x i64> addrspace(1)* %out
425  ret void
426}
427
428; FUNC-LABEL: {{^}}global_zextload_v16i16_to_v16i64:
429define void @global_zextload_v16i16_to_v16i64(<16 x i64> addrspace(1)* %out, <16 x i16> addrspace(1)* %in) #0 {
430  %load = load <16 x i16>, <16 x i16> addrspace(1)* %in
431  %ext = zext <16 x i16> %load to <16 x i64>
432  store <16 x i64> %ext, <16 x i64> addrspace(1)* %out
433  ret void
434}
435
436; FUNC-LABEL: {{^}}global_sextload_v16i16_to_v16i64:
437define void @global_sextload_v16i16_to_v16i64(<16 x i64> addrspace(1)* %out, <16 x i16> addrspace(1)* %in) #0 {
438  %load = load <16 x i16>, <16 x i16> addrspace(1)* %in
439  %ext = sext <16 x i16> %load to <16 x i64>
440  store <16 x i64> %ext, <16 x i64> addrspace(1)* %out
441  ret void
442}
443
444; FUNC-LABEL: {{^}}global_zextload_v32i16_to_v32i64:
445define void @global_zextload_v32i16_to_v32i64(<32 x i64> addrspace(1)* %out, <32 x i16> addrspace(1)* %in) #0 {
446  %load = load <32 x i16>, <32 x i16> addrspace(1)* %in
447  %ext = zext <32 x i16> %load to <32 x i64>
448  store <32 x i64> %ext, <32 x i64> addrspace(1)* %out
449  ret void
450}
451
452; FUNC-LABEL: {{^}}global_sextload_v32i16_to_v32i64:
453define void @global_sextload_v32i16_to_v32i64(<32 x i64> addrspace(1)* %out, <32 x i16> addrspace(1)* %in) #0 {
454  %load = load <32 x i16>, <32 x i16> addrspace(1)* %in
455  %ext = sext <32 x i16> %load to <32 x i64>
456  store <32 x i64> %ext, <32 x i64> addrspace(1)* %out
457  ret void
458}
459
460; ; XFUNC-LABEL: {{^}}global_zextload_v64i16_to_v64i64:
461; define void @global_zextload_v64i16_to_v64i64(<64 x i64> addrspace(1)* %out, <64 x i16> addrspace(1)* %in) #0 {
462;   %load = load <64 x i16>, <64 x i16> addrspace(1)* %in
463;   %ext = zext <64 x i16> %load to <64 x i64>
464;   store <64 x i64> %ext, <64 x i64> addrspace(1)* %out
465;   ret void
466; }
467
468; ; XFUNC-LABEL: {{^}}global_sextload_v64i16_to_v64i64:
469; define void @global_sextload_v64i16_to_v64i64(<64 x i64> addrspace(1)* %out, <64 x i16> addrspace(1)* %in) #0 {
470;   %load = load <64 x i16>, <64 x i16> addrspace(1)* %in
471;   %ext = sext <64 x i16> %load to <64 x i64>
472;   store <64 x i64> %ext, <64 x i64> addrspace(1)* %out
473;   ret void
474; }
475
476attributes #0 = { nounwind }
477