1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32 --check-prefix=SSE-X32 --check-prefix=SSE2-X32
3 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64 --check-prefix=SSE-X64 --check-prefix=SSE2-X64
4 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=X32 --check-prefix=SSE-X32 --check-prefix=SSE41-X32
5 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=X64 --check-prefix=SSE-X64 --check-prefix=SSE41-X64
6 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+avx | FileCheck %s --check-prefix=X32 --check-prefix=AVX-X32
7 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx | FileCheck %s --check-prefix=X64 --check-prefix=AVX-X64
8 ; RUN: llc < %s -O2 -mtriple=x86_64-linux-android -mattr=+mmx -enable-legalize-types-checking | FileCheck %s --check-prefix=X64 --check-prefix=SSE-X64 --check-prefix=SSE-F128
9 ; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu -mattr=+mmx -enable-legalize-types-checking | FileCheck %s --check-prefix=X64 --check-prefix=SSE-X64 --check-prefix=SSE-F128
11 define void @extract_i8_0(i8* nocapture %dst, <16 x i8> %foo) nounwind {
12 ; SSE2-X32-LABEL: extract_i8_0:
14 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
15 ; SSE2-X32-NEXT: movd %xmm0, %ecx
16 ; SSE2-X32-NEXT: movb %cl, (%eax)
19 ; SSE2-X64-LABEL: extract_i8_0:
21 ; SSE2-X64-NEXT: movd %xmm0, %eax
22 ; SSE2-X64-NEXT: movb %al, (%rdi)
25 ; SSE41-X32-LABEL: extract_i8_0:
27 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
28 ; SSE41-X32-NEXT: pextrb $0, %xmm0, (%eax)
29 ; SSE41-X32-NEXT: retl
31 ; SSE41-X64-LABEL: extract_i8_0:
33 ; SSE41-X64-NEXT: pextrb $0, %xmm0, (%rdi)
34 ; SSE41-X64-NEXT: retq
36 ; AVX-X32-LABEL: extract_i8_0:
38 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
39 ; AVX-X32-NEXT: vpextrb $0, %xmm0, (%eax)
42 ; AVX-X64-LABEL: extract_i8_0:
44 ; AVX-X64-NEXT: vpextrb $0, %xmm0, (%rdi)
47 ; SSE-F128-LABEL: extract_i8_0:
49 ; SSE-F128-NEXT: movd %xmm0, %eax
50 ; SSE-F128-NEXT: movb %al, (%rdi)
52 %vecext = extractelement <16 x i8> %foo, i32 0
53 store i8 %vecext, i8* %dst, align 1
57 define void @extract_i8_3(i8* nocapture %dst, <16 x i8> %foo) nounwind {
58 ; SSE2-X32-LABEL: extract_i8_3:
60 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
61 ; SSE2-X32-NEXT: movd %xmm0, %ecx
62 ; SSE2-X32-NEXT: shrl $24, %ecx
63 ; SSE2-X32-NEXT: movb %cl, (%eax)
66 ; SSE2-X64-LABEL: extract_i8_3:
68 ; SSE2-X64-NEXT: movd %xmm0, %eax
69 ; SSE2-X64-NEXT: shrl $24, %eax
70 ; SSE2-X64-NEXT: movb %al, (%rdi)
73 ; SSE41-X32-LABEL: extract_i8_3:
75 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
76 ; SSE41-X32-NEXT: pextrb $3, %xmm0, (%eax)
77 ; SSE41-X32-NEXT: retl
79 ; SSE41-X64-LABEL: extract_i8_3:
81 ; SSE41-X64-NEXT: pextrb $3, %xmm0, (%rdi)
82 ; SSE41-X64-NEXT: retq
84 ; AVX-X32-LABEL: extract_i8_3:
86 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
87 ; AVX-X32-NEXT: vpextrb $3, %xmm0, (%eax)
90 ; AVX-X64-LABEL: extract_i8_3:
92 ; AVX-X64-NEXT: vpextrb $3, %xmm0, (%rdi)
95 ; SSE-F128-LABEL: extract_i8_3:
97 ; SSE-F128-NEXT: movd %xmm0, %eax
98 ; SSE-F128-NEXT: shrl $24, %eax
99 ; SSE-F128-NEXT: movb %al, (%rdi)
100 ; SSE-F128-NEXT: retq
101 %vecext = extractelement <16 x i8> %foo, i32 3
102 store i8 %vecext, i8* %dst, align 1
106 define void @extract_i8_15(i8* nocapture %dst, <16 x i8> %foo) nounwind {
107 ; SSE2-X32-LABEL: extract_i8_15:
109 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
110 ; SSE2-X32-NEXT: pextrw $7, %xmm0, %ecx
111 ; SSE2-X32-NEXT: movb %ch, (%eax)
112 ; SSE2-X32-NEXT: retl
114 ; SSE2-X64-LABEL: extract_i8_15:
116 ; SSE2-X64-NEXT: pextrw $7, %xmm0, %eax
117 ; SSE2-X64-NEXT: movb %ah, (%rdi)
118 ; SSE2-X64-NEXT: retq
120 ; SSE41-X32-LABEL: extract_i8_15:
121 ; SSE41-X32: # %bb.0:
122 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
123 ; SSE41-X32-NEXT: pextrb $15, %xmm0, (%eax)
124 ; SSE41-X32-NEXT: retl
126 ; SSE41-X64-LABEL: extract_i8_15:
127 ; SSE41-X64: # %bb.0:
128 ; SSE41-X64-NEXT: pextrb $15, %xmm0, (%rdi)
129 ; SSE41-X64-NEXT: retq
131 ; AVX-X32-LABEL: extract_i8_15:
133 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
134 ; AVX-X32-NEXT: vpextrb $15, %xmm0, (%eax)
137 ; AVX-X64-LABEL: extract_i8_15:
139 ; AVX-X64-NEXT: vpextrb $15, %xmm0, (%rdi)
142 ; SSE-F128-LABEL: extract_i8_15:
144 ; SSE-F128-NEXT: pextrw $7, %xmm0, %eax
145 ; SSE-F128-NEXT: movb %ah, (%rdi)
146 ; SSE-F128-NEXT: retq
147 %vecext = extractelement <16 x i8> %foo, i32 15
148 store i8 %vecext, i8* %dst, align 1
152 define void @extract_i16_0(i16* nocapture %dst, <8 x i16> %foo) nounwind {
153 ; SSE2-X32-LABEL: extract_i16_0:
155 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
156 ; SSE2-X32-NEXT: movd %xmm0, %ecx
157 ; SSE2-X32-NEXT: movw %cx, (%eax)
158 ; SSE2-X32-NEXT: retl
160 ; SSE2-X64-LABEL: extract_i16_0:
162 ; SSE2-X64-NEXT: movd %xmm0, %eax
163 ; SSE2-X64-NEXT: movw %ax, (%rdi)
164 ; SSE2-X64-NEXT: retq
166 ; SSE41-X32-LABEL: extract_i16_0:
167 ; SSE41-X32: # %bb.0:
168 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
169 ; SSE41-X32-NEXT: pextrw $0, %xmm0, (%eax)
170 ; SSE41-X32-NEXT: retl
172 ; SSE41-X64-LABEL: extract_i16_0:
173 ; SSE41-X64: # %bb.0:
174 ; SSE41-X64-NEXT: pextrw $0, %xmm0, (%rdi)
175 ; SSE41-X64-NEXT: retq
177 ; AVX-X32-LABEL: extract_i16_0:
179 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
180 ; AVX-X32-NEXT: vpextrw $0, %xmm0, (%eax)
183 ; AVX-X64-LABEL: extract_i16_0:
185 ; AVX-X64-NEXT: vpextrw $0, %xmm0, (%rdi)
188 ; SSE-F128-LABEL: extract_i16_0:
190 ; SSE-F128-NEXT: movd %xmm0, %eax
191 ; SSE-F128-NEXT: movw %ax, (%rdi)
192 ; SSE-F128-NEXT: retq
193 %vecext = extractelement <8 x i16> %foo, i32 0
194 store i16 %vecext, i16* %dst, align 1
198 define void @extract_i16_7(i16* nocapture %dst, <8 x i16> %foo) nounwind {
199 ; SSE2-X32-LABEL: extract_i16_7:
201 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
202 ; SSE2-X32-NEXT: pextrw $7, %xmm0, %ecx
203 ; SSE2-X32-NEXT: movw %cx, (%eax)
204 ; SSE2-X32-NEXT: retl
206 ; SSE2-X64-LABEL: extract_i16_7:
208 ; SSE2-X64-NEXT: pextrw $7, %xmm0, %eax
209 ; SSE2-X64-NEXT: movw %ax, (%rdi)
210 ; SSE2-X64-NEXT: retq
212 ; SSE41-X32-LABEL: extract_i16_7:
213 ; SSE41-X32: # %bb.0:
214 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
215 ; SSE41-X32-NEXT: pextrw $7, %xmm0, (%eax)
216 ; SSE41-X32-NEXT: retl
218 ; SSE41-X64-LABEL: extract_i16_7:
219 ; SSE41-X64: # %bb.0:
220 ; SSE41-X64-NEXT: pextrw $7, %xmm0, (%rdi)
221 ; SSE41-X64-NEXT: retq
223 ; AVX-X32-LABEL: extract_i16_7:
225 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
226 ; AVX-X32-NEXT: vpextrw $7, %xmm0, (%eax)
229 ; AVX-X64-LABEL: extract_i16_7:
231 ; AVX-X64-NEXT: vpextrw $7, %xmm0, (%rdi)
234 ; SSE-F128-LABEL: extract_i16_7:
236 ; SSE-F128-NEXT: pextrw $7, %xmm0, %eax
237 ; SSE-F128-NEXT: movw %ax, (%rdi)
238 ; SSE-F128-NEXT: retq
239 %vecext = extractelement <8 x i16> %foo, i32 7
240 store i16 %vecext, i16* %dst, align 1
244 define void @extract_i32_0(i32* nocapture %dst, <4 x i32> %foo) nounwind {
245 ; SSE-X32-LABEL: extract_i32_0:
247 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
248 ; SSE-X32-NEXT: movss %xmm0, (%eax)
251 ; SSE-X64-LABEL: extract_i32_0:
253 ; SSE-X64-NEXT: movss %xmm0, (%rdi)
256 ; AVX-X32-LABEL: extract_i32_0:
258 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
259 ; AVX-X32-NEXT: vmovss %xmm0, (%eax)
262 ; AVX-X64-LABEL: extract_i32_0:
264 ; AVX-X64-NEXT: vmovss %xmm0, (%rdi)
266 %vecext = extractelement <4 x i32> %foo, i32 0
267 store i32 %vecext, i32* %dst, align 1
271 define void @extract_i32_3(i32* nocapture %dst, <4 x i32> %foo) nounwind {
272 ; SSE2-X32-LABEL: extract_i32_3:
274 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
275 ; SSE2-X32-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
276 ; SSE2-X32-NEXT: movd %xmm0, (%eax)
277 ; SSE2-X32-NEXT: retl
279 ; SSE2-X64-LABEL: extract_i32_3:
281 ; SSE2-X64-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
282 ; SSE2-X64-NEXT: movd %xmm0, (%rdi)
283 ; SSE2-X64-NEXT: retq
285 ; SSE41-X32-LABEL: extract_i32_3:
286 ; SSE41-X32: # %bb.0:
287 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
288 ; SSE41-X32-NEXT: extractps $3, %xmm0, (%eax)
289 ; SSE41-X32-NEXT: retl
291 ; SSE41-X64-LABEL: extract_i32_3:
292 ; SSE41-X64: # %bb.0:
293 ; SSE41-X64-NEXT: extractps $3, %xmm0, (%rdi)
294 ; SSE41-X64-NEXT: retq
296 ; AVX-X32-LABEL: extract_i32_3:
298 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
299 ; AVX-X32-NEXT: vextractps $3, %xmm0, (%eax)
302 ; AVX-X64-LABEL: extract_i32_3:
304 ; AVX-X64-NEXT: vextractps $3, %xmm0, (%rdi)
307 ; SSE-F128-LABEL: extract_i32_3:
309 ; SSE-F128-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
310 ; SSE-F128-NEXT: movd %xmm0, (%rdi)
311 ; SSE-F128-NEXT: retq
312 %vecext = extractelement <4 x i32> %foo, i32 3
313 store i32 %vecext, i32* %dst, align 1
317 define void @extract_i64_0(i64* nocapture %dst, <2 x i64> %foo) nounwind {
318 ; SSE-X32-LABEL: extract_i64_0:
320 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
321 ; SSE-X32-NEXT: movlps %xmm0, (%eax)
324 ; SSE-X64-LABEL: extract_i64_0:
326 ; SSE-X64-NEXT: movlps %xmm0, (%rdi)
329 ; AVX-X32-LABEL: extract_i64_0:
331 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
332 ; AVX-X32-NEXT: vmovlps %xmm0, (%eax)
335 ; AVX-X64-LABEL: extract_i64_0:
337 ; AVX-X64-NEXT: vmovlps %xmm0, (%rdi)
339 %vecext = extractelement <2 x i64> %foo, i32 0
340 store i64 %vecext, i64* %dst, align 1
344 define void @extract_i64_1(i64* nocapture %dst, <2 x i64> %foo) nounwind {
345 ; SSE-X32-LABEL: extract_i64_1:
347 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
348 ; SSE-X32-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
349 ; SSE-X32-NEXT: movq %xmm0, (%eax)
352 ; SSE2-X64-LABEL: extract_i64_1:
354 ; SSE2-X64-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
355 ; SSE2-X64-NEXT: movq %xmm0, (%rdi)
356 ; SSE2-X64-NEXT: retq
358 ; SSE41-X64-LABEL: extract_i64_1:
359 ; SSE41-X64: # %bb.0:
360 ; SSE41-X64-NEXT: pextrq $1, %xmm0, (%rdi)
361 ; SSE41-X64-NEXT: retq
363 ; AVX-X32-LABEL: extract_i64_1:
365 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
366 ; AVX-X32-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[2,3,0,1]
367 ; AVX-X32-NEXT: vmovlps %xmm0, (%eax)
370 ; AVX-X64-LABEL: extract_i64_1:
372 ; AVX-X64-NEXT: vpextrq $1, %xmm0, (%rdi)
375 ; SSE-F128-LABEL: extract_i64_1:
377 ; SSE-F128-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
378 ; SSE-F128-NEXT: movq %xmm0, (%rdi)
379 ; SSE-F128-NEXT: retq
380 %vecext = extractelement <2 x i64> %foo, i32 1
381 store i64 %vecext, i64* %dst, align 1
385 define void @extract_f32_0(float* nocapture %dst, <4 x float> %foo) nounwind {
386 ; SSE-X32-LABEL: extract_f32_0:
388 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
389 ; SSE-X32-NEXT: movss %xmm0, (%eax)
392 ; SSE-X64-LABEL: extract_f32_0:
394 ; SSE-X64-NEXT: movss %xmm0, (%rdi)
397 ; AVX-X32-LABEL: extract_f32_0:
399 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
400 ; AVX-X32-NEXT: vmovss %xmm0, (%eax)
403 ; AVX-X64-LABEL: extract_f32_0:
405 ; AVX-X64-NEXT: vmovss %xmm0, (%rdi)
407 %vecext = extractelement <4 x float> %foo, i32 0
408 store float %vecext, float* %dst, align 1
412 define void @extract_f32_3(float* nocapture %dst, <4 x float> %foo) nounwind {
413 ; SSE2-X32-LABEL: extract_f32_3:
415 ; SSE2-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
416 ; SSE2-X32-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
417 ; SSE2-X32-NEXT: movss %xmm0, (%eax)
418 ; SSE2-X32-NEXT: retl
420 ; SSE2-X64-LABEL: extract_f32_3:
422 ; SSE2-X64-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
423 ; SSE2-X64-NEXT: movss %xmm0, (%rdi)
424 ; SSE2-X64-NEXT: retq
426 ; SSE41-X32-LABEL: extract_f32_3:
427 ; SSE41-X32: # %bb.0:
428 ; SSE41-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
429 ; SSE41-X32-NEXT: extractps $3, %xmm0, (%eax)
430 ; SSE41-X32-NEXT: retl
432 ; SSE41-X64-LABEL: extract_f32_3:
433 ; SSE41-X64: # %bb.0:
434 ; SSE41-X64-NEXT: extractps $3, %xmm0, (%rdi)
435 ; SSE41-X64-NEXT: retq
437 ; AVX-X32-LABEL: extract_f32_3:
439 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
440 ; AVX-X32-NEXT: vextractps $3, %xmm0, (%eax)
443 ; AVX-X64-LABEL: extract_f32_3:
445 ; AVX-X64-NEXT: vextractps $3, %xmm0, (%rdi)
448 ; SSE-F128-LABEL: extract_f32_3:
450 ; SSE-F128-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
451 ; SSE-F128-NEXT: movss %xmm0, (%rdi)
452 ; SSE-F128-NEXT: retq
453 %vecext = extractelement <4 x float> %foo, i32 3
454 store float %vecext, float* %dst, align 1
458 define void @extract_f64_0(double* nocapture %dst, <2 x double> %foo) nounwind {
459 ; SSE-X32-LABEL: extract_f64_0:
461 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
462 ; SSE-X32-NEXT: movlps %xmm0, (%eax)
465 ; SSE-X64-LABEL: extract_f64_0:
467 ; SSE-X64-NEXT: movlps %xmm0, (%rdi)
470 ; AVX-X32-LABEL: extract_f64_0:
472 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
473 ; AVX-X32-NEXT: vmovlps %xmm0, (%eax)
476 ; AVX-X64-LABEL: extract_f64_0:
478 ; AVX-X64-NEXT: vmovlps %xmm0, (%rdi)
480 %vecext = extractelement <2 x double> %foo, i32 0
481 store double %vecext, double* %dst, align 1
485 define void @extract_f64_1(double* nocapture %dst, <2 x double> %foo) nounwind {
486 ; SSE-X32-LABEL: extract_f64_1:
488 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
489 ; SSE-X32-NEXT: movhps %xmm0, (%eax)
492 ; SSE-X64-LABEL: extract_f64_1:
494 ; SSE-X64-NEXT: movhps %xmm0, (%rdi)
497 ; AVX-X32-LABEL: extract_f64_1:
499 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
500 ; AVX-X32-NEXT: vmovhps %xmm0, (%eax)
503 ; AVX-X64-LABEL: extract_f64_1:
505 ; AVX-X64-NEXT: vmovhps %xmm0, (%rdi)
507 %vecext = extractelement <2 x double> %foo, i32 1
508 store double %vecext, double* %dst, align 1
512 define void @extract_f128_0(fp128* nocapture %dst, <2 x fp128> %foo) nounwind {
513 ; SSE-X32-LABEL: extract_f128_0:
515 ; SSE-X32-NEXT: pushl %edi
516 ; SSE-X32-NEXT: pushl %esi
517 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
518 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
519 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %edx
520 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %esi
521 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %edi
522 ; SSE-X32-NEXT: movl %esi, 12(%edi)
523 ; SSE-X32-NEXT: movl %edx, 8(%edi)
524 ; SSE-X32-NEXT: movl %ecx, 4(%edi)
525 ; SSE-X32-NEXT: movl %eax, (%edi)
526 ; SSE-X32-NEXT: popl %esi
527 ; SSE-X32-NEXT: popl %edi
530 ; SSE2-X64-LABEL: extract_f128_0:
532 ; SSE2-X64-NEXT: movq %rdx, 8(%rdi)
533 ; SSE2-X64-NEXT: movq %rsi, (%rdi)
534 ; SSE2-X64-NEXT: retq
536 ; SSE41-X64-LABEL: extract_f128_0:
537 ; SSE41-X64: # %bb.0:
538 ; SSE41-X64-NEXT: movq %rdx, 8(%rdi)
539 ; SSE41-X64-NEXT: movq %rsi, (%rdi)
540 ; SSE41-X64-NEXT: retq
542 ; AVX-X32-LABEL: extract_f128_0:
544 ; AVX-X32-NEXT: vmovups {{[0-9]+}}(%esp), %xmm0
545 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
546 ; AVX-X32-NEXT: vmovups %xmm0, (%eax)
549 ; AVX-X64-LABEL: extract_f128_0:
551 ; AVX-X64-NEXT: movq %rdx, 8(%rdi)
552 ; AVX-X64-NEXT: movq %rsi, (%rdi)
555 ; SSE-F128-LABEL: extract_f128_0:
557 ; SSE-F128-NEXT: movups %xmm0, (%rdi)
558 ; SSE-F128-NEXT: retq
559 %vecext = extractelement <2 x fp128> %foo, i32 0
560 store fp128 %vecext, fp128* %dst, align 1
564 define void @extract_f128_1(fp128* nocapture %dst, <2 x fp128> %foo) nounwind {
565 ; SSE-X32-LABEL: extract_f128_1:
567 ; SSE-X32-NEXT: pushl %edi
568 ; SSE-X32-NEXT: pushl %esi
569 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
570 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
571 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %edx
572 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %esi
573 ; SSE-X32-NEXT: movl {{[0-9]+}}(%esp), %edi
574 ; SSE-X32-NEXT: movl %esi, 12(%edi)
575 ; SSE-X32-NEXT: movl %edx, 8(%edi)
576 ; SSE-X32-NEXT: movl %ecx, 4(%edi)
577 ; SSE-X32-NEXT: movl %eax, (%edi)
578 ; SSE-X32-NEXT: popl %esi
579 ; SSE-X32-NEXT: popl %edi
582 ; SSE2-X64-LABEL: extract_f128_1:
584 ; SSE2-X64-NEXT: movq %r8, 8(%rdi)
585 ; SSE2-X64-NEXT: movq %rcx, (%rdi)
586 ; SSE2-X64-NEXT: retq
588 ; SSE41-X64-LABEL: extract_f128_1:
589 ; SSE41-X64: # %bb.0:
590 ; SSE41-X64-NEXT: movq %r8, 8(%rdi)
591 ; SSE41-X64-NEXT: movq %rcx, (%rdi)
592 ; SSE41-X64-NEXT: retq
594 ; AVX-X32-LABEL: extract_f128_1:
596 ; AVX-X32-NEXT: vmovups {{[0-9]+}}(%esp), %xmm0
597 ; AVX-X32-NEXT: movl {{[0-9]+}}(%esp), %eax
598 ; AVX-X32-NEXT: vmovups %xmm0, (%eax)
601 ; AVX-X64-LABEL: extract_f128_1:
603 ; AVX-X64-NEXT: movq %r8, 8(%rdi)
604 ; AVX-X64-NEXT: movq %rcx, (%rdi)
607 ; SSE-F128-LABEL: extract_f128_1:
609 ; SSE-F128-NEXT: movups %xmm1, (%rdi)
610 ; SSE-F128-NEXT: retq
611 %vecext = extractelement <2 x fp128> %foo, i32 1
612 store fp128 %vecext, fp128* %dst, align 1
616 define void @extract_i8_undef(i8* nocapture %dst, <16 x i8> %foo) nounwind {
617 ; X32-LABEL: extract_i8_undef:
621 ; X64-LABEL: extract_i8_undef:
624 %vecext = extractelement <16 x i8> %foo, i32 16 ; undef
625 store i8 %vecext, i8* %dst, align 1
629 define void @extract_i16_undef(i16* nocapture %dst, <8 x i16> %foo) nounwind {
630 ; X32-LABEL: extract_i16_undef:
634 ; X64-LABEL: extract_i16_undef:
637 %vecext = extractelement <8 x i16> %foo, i32 9 ; undef
638 store i16 %vecext, i16* %dst, align 1
642 define void @extract_i32_undef(i32* nocapture %dst, <4 x i32> %foo) nounwind {
643 ; X32-LABEL: extract_i32_undef:
647 ; X64-LABEL: extract_i32_undef:
650 %vecext = extractelement <4 x i32> %foo, i32 6 ; undef
651 store i32 %vecext, i32* %dst, align 1
655 define void @extract_i64_undef(i64* nocapture %dst, <2 x i64> %foo) nounwind {
656 ; X32-LABEL: extract_i64_undef:
660 ; X64-LABEL: extract_i64_undef:
663 %vecext = extractelement <2 x i64> %foo, i32 2 ; undef
664 store i64 %vecext, i64* %dst, align 1
668 define void @extract_f32_undef(float* nocapture %dst, <4 x float> %foo) nounwind {
669 ; X32-LABEL: extract_f32_undef:
673 ; X64-LABEL: extract_f32_undef:
676 %vecext = extractelement <4 x float> %foo, i32 6 ; undef
677 store float %vecext, float* %dst, align 1
681 define void @extract_f64_undef(double* nocapture %dst, <2 x double> %foo) nounwind {
682 ; X32-LABEL: extract_f64_undef:
686 ; X64-LABEL: extract_f64_undef:
689 %vecext = extractelement <2 x double> %foo, i32 2 ; undef
690 store double %vecext, double* %dst, align 1
694 define void @extract_f128_undef(fp128* nocapture %dst, <2 x fp128> %foo) nounwind {
695 ; X32-LABEL: extract_f128_undef:
699 ; X64-LABEL: extract_f128_undef:
702 %vecext = extractelement <2 x fp128> %foo, i32 2 ; undef
703 store fp128 %vecext, fp128* %dst, align 1