1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=SSE,SSE2
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=slm -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=SSE,SLM
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=AVX
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=AVX
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=knl -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=AVX
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skx -mattr=+avx512bw -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=AVX
13 define <2 x i64> @loadext_2i8_to_2i64(ptr %p0) {
14 ; SSE2-LABEL: @loadext_2i8_to_2i64(
15 ; SSE2-NEXT: [[P1:%.*]] = getelementptr inbounds i8, ptr [[P0:%.*]], i64 1
16 ; SSE2-NEXT: [[I0:%.*]] = load i8, ptr [[P0]], align 1
17 ; SSE2-NEXT: [[I1:%.*]] = load i8, ptr [[P1]], align 1
18 ; SSE2-NEXT: [[X0:%.*]] = sext i8 [[I0]] to i64
19 ; SSE2-NEXT: [[X1:%.*]] = sext i8 [[I1]] to i64
20 ; SSE2-NEXT: [[V0:%.*]] = insertelement <2 x i64> undef, i64 [[X0]], i32 0
21 ; SSE2-NEXT: [[V1:%.*]] = insertelement <2 x i64> [[V0]], i64 [[X1]], i32 1
22 ; SSE2-NEXT: ret <2 x i64> [[V1]]
24 ; SLM-LABEL: @loadext_2i8_to_2i64(
25 ; SLM-NEXT: [[TMP2:%.*]] = load <2 x i8>, ptr [[P0:%.*]], align 1
26 ; SLM-NEXT: [[TMP3:%.*]] = sext <2 x i8> [[TMP2]] to <2 x i64>
27 ; SLM-NEXT: ret <2 x i64> [[TMP3]]
29 ; AVX-LABEL: @loadext_2i8_to_2i64(
30 ; AVX-NEXT: [[TMP2:%.*]] = load <2 x i8>, ptr [[P0:%.*]], align 1
31 ; AVX-NEXT: [[TMP3:%.*]] = sext <2 x i8> [[TMP2]] to <2 x i64>
32 ; AVX-NEXT: ret <2 x i64> [[TMP3]]
34 %p1 = getelementptr inbounds i8, ptr %p0, i64 1
35 %i0 = load i8, ptr %p0, align 1
36 %i1 = load i8, ptr %p1, align 1
37 %x0 = sext i8 %i0 to i64
38 %x1 = sext i8 %i1 to i64
39 %v0 = insertelement <2 x i64> undef, i64 %x0, i32 0
40 %v1 = insertelement <2 x i64> %v0, i64 %x1, i32 1
44 define <4 x i32> @loadext_4i8_to_4i32(ptr %p0) {
45 ; SSE-LABEL: @loadext_4i8_to_4i32(
46 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x i8>, ptr [[P0:%.*]], align 1
47 ; SSE-NEXT: [[TMP3:%.*]] = sext <4 x i8> [[TMP2]] to <4 x i32>
48 ; SSE-NEXT: ret <4 x i32> [[TMP3]]
50 ; AVX-LABEL: @loadext_4i8_to_4i32(
51 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x i8>, ptr [[P0:%.*]], align 1
52 ; AVX-NEXT: [[TMP3:%.*]] = sext <4 x i8> [[TMP2]] to <4 x i32>
53 ; AVX-NEXT: ret <4 x i32> [[TMP3]]
55 %p1 = getelementptr inbounds i8, ptr %p0, i64 1
56 %p2 = getelementptr inbounds i8, ptr %p0, i64 2
57 %p3 = getelementptr inbounds i8, ptr %p0, i64 3
58 %i0 = load i8, ptr %p0, align 1
59 %i1 = load i8, ptr %p1, align 1
60 %i2 = load i8, ptr %p2, align 1
61 %i3 = load i8, ptr %p3, align 1
62 %x0 = sext i8 %i0 to i32
63 %x1 = sext i8 %i1 to i32
64 %x2 = sext i8 %i2 to i32
65 %x3 = sext i8 %i3 to i32
66 %v0 = insertelement <4 x i32> undef, i32 %x0, i32 0
67 %v1 = insertelement <4 x i32> %v0, i32 %x1, i32 1
68 %v2 = insertelement <4 x i32> %v1, i32 %x2, i32 2
69 %v3 = insertelement <4 x i32> %v2, i32 %x3, i32 3
73 define <4 x i64> @loadext_4i8_to_4i64(ptr %p0) {
74 ; SSE-LABEL: @loadext_4i8_to_4i64(
75 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x i8>, ptr [[P0:%.*]], align 1
76 ; SSE-NEXT: [[TMP3:%.*]] = sext <4 x i8> [[TMP2]] to <4 x i64>
77 ; SSE-NEXT: ret <4 x i64> [[TMP3]]
79 ; AVX-LABEL: @loadext_4i8_to_4i64(
80 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x i8>, ptr [[P0:%.*]], align 1
81 ; AVX-NEXT: [[TMP3:%.*]] = sext <4 x i8> [[TMP2]] to <4 x i64>
82 ; AVX-NEXT: ret <4 x i64> [[TMP3]]
84 %p1 = getelementptr inbounds i8, ptr %p0, i64 1
85 %p2 = getelementptr inbounds i8, ptr %p0, i64 2
86 %p3 = getelementptr inbounds i8, ptr %p0, i64 3
87 %i0 = load i8, ptr %p0, align 1
88 %i1 = load i8, ptr %p1, align 1
89 %i2 = load i8, ptr %p2, align 1
90 %i3 = load i8, ptr %p3, align 1
91 %x0 = sext i8 %i0 to i64
92 %x1 = sext i8 %i1 to i64
93 %x2 = sext i8 %i2 to i64
94 %x3 = sext i8 %i3 to i64
95 %v0 = insertelement <4 x i64> undef, i64 %x0, i32 0
96 %v1 = insertelement <4 x i64> %v0, i64 %x1, i32 1
97 %v2 = insertelement <4 x i64> %v1, i64 %x2, i32 2
98 %v3 = insertelement <4 x i64> %v2, i64 %x3, i32 3
102 define <8 x i16> @loadext_8i8_to_8i16(ptr %p0) {
103 ; SSE-LABEL: @loadext_8i8_to_8i16(
104 ; SSE-NEXT: [[TMP2:%.*]] = load <8 x i8>, ptr [[P0:%.*]], align 1
105 ; SSE-NEXT: [[TMP3:%.*]] = sext <8 x i8> [[TMP2]] to <8 x i16>
106 ; SSE-NEXT: ret <8 x i16> [[TMP3]]
108 ; AVX-LABEL: @loadext_8i8_to_8i16(
109 ; AVX-NEXT: [[TMP2:%.*]] = load <8 x i8>, ptr [[P0:%.*]], align 1
110 ; AVX-NEXT: [[TMP3:%.*]] = sext <8 x i8> [[TMP2]] to <8 x i16>
111 ; AVX-NEXT: ret <8 x i16> [[TMP3]]
113 %p1 = getelementptr inbounds i8, ptr %p0, i64 1
114 %p2 = getelementptr inbounds i8, ptr %p0, i64 2
115 %p3 = getelementptr inbounds i8, ptr %p0, i64 3
116 %p4 = getelementptr inbounds i8, ptr %p0, i64 4
117 %p5 = getelementptr inbounds i8, ptr %p0, i64 5
118 %p6 = getelementptr inbounds i8, ptr %p0, i64 6
119 %p7 = getelementptr inbounds i8, ptr %p0, i64 7
120 %i0 = load i8, ptr %p0, align 1
121 %i1 = load i8, ptr %p1, align 1
122 %i2 = load i8, ptr %p2, align 1
123 %i3 = load i8, ptr %p3, align 1
124 %i4 = load i8, ptr %p4, align 1
125 %i5 = load i8, ptr %p5, align 1
126 %i6 = load i8, ptr %p6, align 1
127 %i7 = load i8, ptr %p7, align 1
128 %x0 = sext i8 %i0 to i16
129 %x1 = sext i8 %i1 to i16
130 %x2 = sext i8 %i2 to i16
131 %x3 = sext i8 %i3 to i16
132 %x4 = sext i8 %i4 to i16
133 %x5 = sext i8 %i5 to i16
134 %x6 = sext i8 %i6 to i16
135 %x7 = sext i8 %i7 to i16
136 %v0 = insertelement <8 x i16> undef, i16 %x0, i32 0
137 %v1 = insertelement <8 x i16> %v0, i16 %x1, i32 1
138 %v2 = insertelement <8 x i16> %v1, i16 %x2, i32 2
139 %v3 = insertelement <8 x i16> %v2, i16 %x3, i32 3
140 %v4 = insertelement <8 x i16> %v3, i16 %x4, i32 4
141 %v5 = insertelement <8 x i16> %v4, i16 %x5, i32 5
142 %v6 = insertelement <8 x i16> %v5, i16 %x6, i32 6
143 %v7 = insertelement <8 x i16> %v6, i16 %x7, i32 7
147 define <8 x i32> @loadext_8i8_to_8i32(ptr %p0) {
148 ; SSE-LABEL: @loadext_8i8_to_8i32(
149 ; SSE-NEXT: [[TMP2:%.*]] = load <8 x i8>, ptr [[P0:%.*]], align 1
150 ; SSE-NEXT: [[TMP3:%.*]] = sext <8 x i8> [[TMP2]] to <8 x i32>
151 ; SSE-NEXT: ret <8 x i32> [[TMP3]]
153 ; AVX-LABEL: @loadext_8i8_to_8i32(
154 ; AVX-NEXT: [[TMP2:%.*]] = load <8 x i8>, ptr [[P0:%.*]], align 1
155 ; AVX-NEXT: [[TMP3:%.*]] = sext <8 x i8> [[TMP2]] to <8 x i32>
156 ; AVX-NEXT: ret <8 x i32> [[TMP3]]
158 %p1 = getelementptr inbounds i8, ptr %p0, i64 1
159 %p2 = getelementptr inbounds i8, ptr %p0, i64 2
160 %p3 = getelementptr inbounds i8, ptr %p0, i64 3
161 %p4 = getelementptr inbounds i8, ptr %p0, i64 4
162 %p5 = getelementptr inbounds i8, ptr %p0, i64 5
163 %p6 = getelementptr inbounds i8, ptr %p0, i64 6
164 %p7 = getelementptr inbounds i8, ptr %p0, i64 7
165 %i0 = load i8, ptr %p0, align 1
166 %i1 = load i8, ptr %p1, align 1
167 %i2 = load i8, ptr %p2, align 1
168 %i3 = load i8, ptr %p3, align 1
169 %i4 = load i8, ptr %p4, align 1
170 %i5 = load i8, ptr %p5, align 1
171 %i6 = load i8, ptr %p6, align 1
172 %i7 = load i8, ptr %p7, align 1
173 %x0 = sext i8 %i0 to i32
174 %x1 = sext i8 %i1 to i32
175 %x2 = sext i8 %i2 to i32
176 %x3 = sext i8 %i3 to i32
177 %x4 = sext i8 %i4 to i32
178 %x5 = sext i8 %i5 to i32
179 %x6 = sext i8 %i6 to i32
180 %x7 = sext i8 %i7 to i32
181 %v0 = insertelement <8 x i32> undef, i32 %x0, i32 0
182 %v1 = insertelement <8 x i32> %v0, i32 %x1, i32 1
183 %v2 = insertelement <8 x i32> %v1, i32 %x2, i32 2
184 %v3 = insertelement <8 x i32> %v2, i32 %x3, i32 3
185 %v4 = insertelement <8 x i32> %v3, i32 %x4, i32 4
186 %v5 = insertelement <8 x i32> %v4, i32 %x5, i32 5
187 %v6 = insertelement <8 x i32> %v5, i32 %x6, i32 6
188 %v7 = insertelement <8 x i32> %v6, i32 %x7, i32 7
192 define <16 x i16> @loadext_16i8_to_16i16(ptr %p0) {
193 ; SSE-LABEL: @loadext_16i8_to_16i16(
194 ; SSE-NEXT: [[TMP2:%.*]] = load <16 x i8>, ptr [[P0:%.*]], align 1
195 ; SSE-NEXT: [[TMP3:%.*]] = sext <16 x i8> [[TMP2]] to <16 x i16>
196 ; SSE-NEXT: ret <16 x i16> [[TMP3]]
198 ; AVX-LABEL: @loadext_16i8_to_16i16(
199 ; AVX-NEXT: [[TMP2:%.*]] = load <16 x i8>, ptr [[P0:%.*]], align 1
200 ; AVX-NEXT: [[TMP3:%.*]] = sext <16 x i8> [[TMP2]] to <16 x i16>
201 ; AVX-NEXT: ret <16 x i16> [[TMP3]]
203 %p1 = getelementptr inbounds i8, ptr %p0, i64 1
204 %p2 = getelementptr inbounds i8, ptr %p0, i64 2
205 %p3 = getelementptr inbounds i8, ptr %p0, i64 3
206 %p4 = getelementptr inbounds i8, ptr %p0, i64 4
207 %p5 = getelementptr inbounds i8, ptr %p0, i64 5
208 %p6 = getelementptr inbounds i8, ptr %p0, i64 6
209 %p7 = getelementptr inbounds i8, ptr %p0, i64 7
210 %p8 = getelementptr inbounds i8, ptr %p0, i64 8
211 %p9 = getelementptr inbounds i8, ptr %p0, i64 9
212 %p10 = getelementptr inbounds i8, ptr %p0, i64 10
213 %p11 = getelementptr inbounds i8, ptr %p0, i64 11
214 %p12 = getelementptr inbounds i8, ptr %p0, i64 12
215 %p13 = getelementptr inbounds i8, ptr %p0, i64 13
216 %p14 = getelementptr inbounds i8, ptr %p0, i64 14
217 %p15 = getelementptr inbounds i8, ptr %p0, i64 15
218 %i0 = load i8, ptr %p0, align 1
219 %i1 = load i8, ptr %p1, align 1
220 %i2 = load i8, ptr %p2, align 1
221 %i3 = load i8, ptr %p3, align 1
222 %i4 = load i8, ptr %p4, align 1
223 %i5 = load i8, ptr %p5, align 1
224 %i6 = load i8, ptr %p6, align 1
225 %i7 = load i8, ptr %p7, align 1
226 %i8 = load i8, ptr %p8, align 1
227 %i9 = load i8, ptr %p9, align 1
228 %i10 = load i8, ptr %p10, align 1
229 %i11 = load i8, ptr %p11, align 1
230 %i12 = load i8, ptr %p12, align 1
231 %i13 = load i8, ptr %p13, align 1
232 %i14 = load i8, ptr %p14, align 1
233 %i15 = load i8, ptr %p15, align 1
234 %x0 = sext i8 %i0 to i16
235 %x1 = sext i8 %i1 to i16
236 %x2 = sext i8 %i2 to i16
237 %x3 = sext i8 %i3 to i16
238 %x4 = sext i8 %i4 to i16
239 %x5 = sext i8 %i5 to i16
240 %x6 = sext i8 %i6 to i16
241 %x7 = sext i8 %i7 to i16
242 %x8 = sext i8 %i8 to i16
243 %x9 = sext i8 %i9 to i16
244 %x10 = sext i8 %i10 to i16
245 %x11 = sext i8 %i11 to i16
246 %x12 = sext i8 %i12 to i16
247 %x13 = sext i8 %i13 to i16
248 %x14 = sext i8 %i14 to i16
249 %x15 = sext i8 %i15 to i16
250 %v0 = insertelement <16 x i16> undef, i16 %x0, i32 0
251 %v1 = insertelement <16 x i16> %v0, i16 %x1, i32 1
252 %v2 = insertelement <16 x i16> %v1, i16 %x2, i32 2
253 %v3 = insertelement <16 x i16> %v2, i16 %x3, i32 3
254 %v4 = insertelement <16 x i16> %v3, i16 %x4, i32 4
255 %v5 = insertelement <16 x i16> %v4, i16 %x5, i32 5
256 %v6 = insertelement <16 x i16> %v5, i16 %x6, i32 6
257 %v7 = insertelement <16 x i16> %v6, i16 %x7, i32 7
258 %v8 = insertelement <16 x i16> %v7, i16 %x8, i32 8
259 %v9 = insertelement <16 x i16> %v8, i16 %x9, i32 9
260 %v10 = insertelement <16 x i16> %v9, i16 %x10, i32 10
261 %v11 = insertelement <16 x i16> %v10, i16 %x11, i32 11
262 %v12 = insertelement <16 x i16> %v11, i16 %x12, i32 12
263 %v13 = insertelement <16 x i16> %v12, i16 %x13, i32 13
264 %v14 = insertelement <16 x i16> %v13, i16 %x14, i32 14
265 %v15 = insertelement <16 x i16> %v14, i16 %x15, i32 15
273 define <2 x i64> @loadext_2i16_to_2i64(ptr %p0) {
274 ; SSE-LABEL: @loadext_2i16_to_2i64(
275 ; SSE-NEXT: [[TMP2:%.*]] = load <2 x i16>, ptr [[P0:%.*]], align 1
276 ; SSE-NEXT: [[TMP3:%.*]] = sext <2 x i16> [[TMP2]] to <2 x i64>
277 ; SSE-NEXT: ret <2 x i64> [[TMP3]]
279 ; AVX-LABEL: @loadext_2i16_to_2i64(
280 ; AVX-NEXT: [[TMP2:%.*]] = load <2 x i16>, ptr [[P0:%.*]], align 1
281 ; AVX-NEXT: [[TMP3:%.*]] = sext <2 x i16> [[TMP2]] to <2 x i64>
282 ; AVX-NEXT: ret <2 x i64> [[TMP3]]
284 %p1 = getelementptr inbounds i16, ptr %p0, i64 1
285 %i0 = load i16, ptr %p0, align 1
286 %i1 = load i16, ptr %p1, align 1
287 %x0 = sext i16 %i0 to i64
288 %x1 = sext i16 %i1 to i64
289 %v0 = insertelement <2 x i64> undef, i64 %x0, i32 0
290 %v1 = insertelement <2 x i64> %v0, i64 %x1, i32 1
294 define <4 x i32> @loadext_4i16_to_4i32(ptr %p0) {
295 ; SSE-LABEL: @loadext_4i16_to_4i32(
296 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x i16>, ptr [[P0:%.*]], align 1
297 ; SSE-NEXT: [[TMP3:%.*]] = sext <4 x i16> [[TMP2]] to <4 x i32>
298 ; SSE-NEXT: ret <4 x i32> [[TMP3]]
300 ; AVX-LABEL: @loadext_4i16_to_4i32(
301 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x i16>, ptr [[P0:%.*]], align 1
302 ; AVX-NEXT: [[TMP3:%.*]] = sext <4 x i16> [[TMP2]] to <4 x i32>
303 ; AVX-NEXT: ret <4 x i32> [[TMP3]]
305 %p1 = getelementptr inbounds i16, ptr %p0, i64 1
306 %p2 = getelementptr inbounds i16, ptr %p0, i64 2
307 %p3 = getelementptr inbounds i16, ptr %p0, i64 3
308 %i0 = load i16, ptr %p0, align 1
309 %i1 = load i16, ptr %p1, align 1
310 %i2 = load i16, ptr %p2, align 1
311 %i3 = load i16, ptr %p3, align 1
312 %x0 = sext i16 %i0 to i32
313 %x1 = sext i16 %i1 to i32
314 %x2 = sext i16 %i2 to i32
315 %x3 = sext i16 %i3 to i32
316 %v0 = insertelement <4 x i32> undef, i32 %x0, i32 0
317 %v1 = insertelement <4 x i32> %v0, i32 %x1, i32 1
318 %v2 = insertelement <4 x i32> %v1, i32 %x2, i32 2
319 %v3 = insertelement <4 x i32> %v2, i32 %x3, i32 3
323 define <4 x i64> @loadext_4i16_to_4i64(ptr %p0) {
324 ; SSE-LABEL: @loadext_4i16_to_4i64(
325 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x i16>, ptr [[P0:%.*]], align 1
326 ; SSE-NEXT: [[TMP3:%.*]] = sext <4 x i16> [[TMP2]] to <4 x i64>
327 ; SSE-NEXT: ret <4 x i64> [[TMP3]]
329 ; AVX-LABEL: @loadext_4i16_to_4i64(
330 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x i16>, ptr [[P0:%.*]], align 1
331 ; AVX-NEXT: [[TMP3:%.*]] = sext <4 x i16> [[TMP2]] to <4 x i64>
332 ; AVX-NEXT: ret <4 x i64> [[TMP3]]
334 %p1 = getelementptr inbounds i16, ptr %p0, i64 1
335 %p2 = getelementptr inbounds i16, ptr %p0, i64 2
336 %p3 = getelementptr inbounds i16, ptr %p0, i64 3
337 %i0 = load i16, ptr %p0, align 1
338 %i1 = load i16, ptr %p1, align 1
339 %i2 = load i16, ptr %p2, align 1
340 %i3 = load i16, ptr %p3, align 1
341 %x0 = sext i16 %i0 to i64
342 %x1 = sext i16 %i1 to i64
343 %x2 = sext i16 %i2 to i64
344 %x3 = sext i16 %i3 to i64
345 %v0 = insertelement <4 x i64> undef, i64 %x0, i32 0
346 %v1 = insertelement <4 x i64> %v0, i64 %x1, i32 1
347 %v2 = insertelement <4 x i64> %v1, i64 %x2, i32 2
348 %v3 = insertelement <4 x i64> %v2, i64 %x3, i32 3
352 define <8 x i32> @loadext_8i16_to_8i32(ptr %p0) {
353 ; SSE-LABEL: @loadext_8i16_to_8i32(
354 ; SSE-NEXT: [[TMP2:%.*]] = load <8 x i16>, ptr [[P0:%.*]], align 1
355 ; SSE-NEXT: [[TMP3:%.*]] = sext <8 x i16> [[TMP2]] to <8 x i32>
356 ; SSE-NEXT: ret <8 x i32> [[TMP3]]
358 ; AVX-LABEL: @loadext_8i16_to_8i32(
359 ; AVX-NEXT: [[TMP2:%.*]] = load <8 x i16>, ptr [[P0:%.*]], align 1
360 ; AVX-NEXT: [[TMP3:%.*]] = sext <8 x i16> [[TMP2]] to <8 x i32>
361 ; AVX-NEXT: ret <8 x i32> [[TMP3]]
363 %p1 = getelementptr inbounds i16, ptr %p0, i64 1
364 %p2 = getelementptr inbounds i16, ptr %p0, i64 2
365 %p3 = getelementptr inbounds i16, ptr %p0, i64 3
366 %p4 = getelementptr inbounds i16, ptr %p0, i64 4
367 %p5 = getelementptr inbounds i16, ptr %p0, i64 5
368 %p6 = getelementptr inbounds i16, ptr %p0, i64 6
369 %p7 = getelementptr inbounds i16, ptr %p0, i64 7
370 %i0 = load i16, ptr %p0, align 1
371 %i1 = load i16, ptr %p1, align 1
372 %i2 = load i16, ptr %p2, align 1
373 %i3 = load i16, ptr %p3, align 1
374 %i4 = load i16, ptr %p4, align 1
375 %i5 = load i16, ptr %p5, align 1
376 %i6 = load i16, ptr %p6, align 1
377 %i7 = load i16, ptr %p7, align 1
378 %x0 = sext i16 %i0 to i32
379 %x1 = sext i16 %i1 to i32
380 %x2 = sext i16 %i2 to i32
381 %x3 = sext i16 %i3 to i32
382 %x4 = sext i16 %i4 to i32
383 %x5 = sext i16 %i5 to i32
384 %x6 = sext i16 %i6 to i32
385 %x7 = sext i16 %i7 to i32
386 %v0 = insertelement <8 x i32> undef, i32 %x0, i32 0
387 %v1 = insertelement <8 x i32> %v0, i32 %x1, i32 1
388 %v2 = insertelement <8 x i32> %v1, i32 %x2, i32 2
389 %v3 = insertelement <8 x i32> %v2, i32 %x3, i32 3
390 %v4 = insertelement <8 x i32> %v3, i32 %x4, i32 4
391 %v5 = insertelement <8 x i32> %v4, i32 %x5, i32 5
392 %v6 = insertelement <8 x i32> %v5, i32 %x6, i32 6
393 %v7 = insertelement <8 x i32> %v6, i32 %x7, i32 7
401 define <2 x i64> @loadext_2i32_to_2i64(ptr %p0) {
402 ; SSE-LABEL: @loadext_2i32_to_2i64(
403 ; SSE-NEXT: [[TMP2:%.*]] = load <2 x i32>, ptr [[P0:%.*]], align 1
404 ; SSE-NEXT: [[TMP3:%.*]] = sext <2 x i32> [[TMP2]] to <2 x i64>
405 ; SSE-NEXT: ret <2 x i64> [[TMP3]]
407 ; AVX-LABEL: @loadext_2i32_to_2i64(
408 ; AVX-NEXT: [[TMP2:%.*]] = load <2 x i32>, ptr [[P0:%.*]], align 1
409 ; AVX-NEXT: [[TMP3:%.*]] = sext <2 x i32> [[TMP2]] to <2 x i64>
410 ; AVX-NEXT: ret <2 x i64> [[TMP3]]
412 %p1 = getelementptr inbounds i32, ptr %p0, i64 1
413 %i0 = load i32, ptr %p0, align 1
414 %i1 = load i32, ptr %p1, align 1
415 %x0 = sext i32 %i0 to i64
416 %x1 = sext i32 %i1 to i64
417 %v0 = insertelement <2 x i64> undef, i64 %x0, i32 0
418 %v1 = insertelement <2 x i64> %v0, i64 %x1, i32 1
422 define <4 x i64> @loadext_4i32_to_4i64(ptr %p0) {
423 ; SSE-LABEL: @loadext_4i32_to_4i64(
424 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x i32>, ptr [[P0:%.*]], align 1
425 ; SSE-NEXT: [[TMP3:%.*]] = sext <4 x i32> [[TMP2]] to <4 x i64>
426 ; SSE-NEXT: ret <4 x i64> [[TMP3]]
428 ; AVX-LABEL: @loadext_4i32_to_4i64(
429 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x i32>, ptr [[P0:%.*]], align 1
430 ; AVX-NEXT: [[TMP3:%.*]] = sext <4 x i32> [[TMP2]] to <4 x i64>
431 ; AVX-NEXT: ret <4 x i64> [[TMP3]]
433 %p1 = getelementptr inbounds i32, ptr %p0, i64 1
434 %p2 = getelementptr inbounds i32, ptr %p0, i64 2
435 %p3 = getelementptr inbounds i32, ptr %p0, i64 3
436 %i0 = load i32, ptr %p0, align 1
437 %i1 = load i32, ptr %p1, align 1
438 %i2 = load i32, ptr %p2, align 1
439 %i3 = load i32, ptr %p3, align 1
440 %x0 = sext i32 %i0 to i64
441 %x1 = sext i32 %i1 to i64
442 %x2 = sext i32 %i2 to i64
443 %x3 = sext i32 %i3 to i64
444 %v0 = insertelement <4 x i64> undef, i64 %x0, i32 0
445 %v1 = insertelement <4 x i64> %v0, i64 %x1, i32 1
446 %v2 = insertelement <4 x i64> %v1, i64 %x2, i32 2
447 %v3 = insertelement <4 x i64> %v2, i64 %x3, i32 3