1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=X64
5 define void @t1(ptr %R, ptr %P1) nounwind {
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
10 ; X86-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
11 ; X86-NEXT: movss %xmm0, (%eax)
16 ; X64-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
17 ; X64-NEXT: movss %xmm0, (%rdi)
19 %X = load <4 x float>, ptr %P1
20 %tmp = extractelement <4 x float> %X, i32 3
21 store float %tmp, ptr %R
25 define float @t2(ptr %P1) nounwind {
28 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
29 ; X86-NEXT: flds 8(%eax)
34 ; X64-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
36 %X = load <4 x float>, ptr %P1
37 %tmp = extractelement <4 x float> %X, i32 2
41 define void @t3(ptr %R, ptr %P1) nounwind {
44 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
45 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
46 ; X86-NEXT: movl 12(%ecx), %ecx
47 ; X86-NEXT: movl %ecx, (%eax)
52 ; X64-NEXT: movl 12(%rsi), %eax
53 ; X64-NEXT: movl %eax, (%rdi)
55 %X = load <4 x i32>, ptr %P1
56 %tmp = extractelement <4 x i32> %X, i32 3
57 store i32 %tmp, ptr %R
61 define i32 @t4(ptr %P1) nounwind {
64 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
65 ; X86-NEXT: movl 12(%eax), %eax
70 ; X64-NEXT: movl 12(%rdi), %eax
72 %X = load <4 x i32>, ptr %P1
73 %tmp = extractelement <4 x i32> %X, i32 3