1 ; RUN: llc < %s -march=x86-64 -mcpu=penryn -asm-verbose=0 -o - | FileCheck %s -check-prefix=X64
2 ; RUN: llc < %s -mcpu=yonah -march=x86 -asm-verbose=0 -o - | FileCheck %s -check-prefix=X32
5 define void @test1(<2 x float> %Q, float *%P2) nounwind {
6 %a = extractelement <2 x float> %Q, i32 0
7 %b = extractelement <2 x float> %Q, i32 1
10 store float %c, float* %P2
13 ; X64-NEXT: pshufd $1, %xmm0, %xmm1
14 ; X64-NEXT: addss %xmm0, %xmm1
15 ; X64-NEXT: movss %xmm1, (%rdi)
19 ; X32-NEXT: pshufd $1, %xmm0, %xmm1
20 ; X32-NEXT: addss %xmm0, %xmm1
21 ; X32-NEXT: movl 4(%esp), %eax
22 ; X32-NEXT: movss %xmm1, (%eax)
27 define <2 x float> @test2(<2 x float> %Q, <2 x float> %R, <2 x float> *%P) nounwind {
28 %Z = fadd <2 x float> %Q, %R
32 ; X64-NEXT: addps %xmm1, %xmm0
37 define <2 x float> @test3(<4 x float> %A) nounwind {
38 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
39 %C = fadd <2 x float> %B, %B
42 ; CHECK-NEXT: addps %xmm0, %xmm0
46 define <2 x float> @test4(<2 x float> %A) nounwind {
47 %C = fadd <2 x float> %A, %A
50 ; CHECK-NEXT: addps %xmm0, %xmm0
54 define <4 x float> @test5(<4 x float> %A) nounwind {
55 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
56 %C = fadd <2 x float> %B, %B
60 %D = fadd <2 x float> %C, %C
61 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
65 ; CHECK-NEXT: addps %xmm0, %xmm0
66 ; CHECK-NEXT: addps %xmm0, %xmm0