1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2
3 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ssse3 | FileCheck %s --check-prefixes=SSE,SSSE3
4 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX
6 define float @pr26491(<4 x float> %a0) {
9 ; SSE2-NEXT: movaps %xmm0, %xmm1
10 ; SSE2-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[3,3]
11 ; SSE2-NEXT: addps %xmm0, %xmm1
12 ; SSE2-NEXT: movaps %xmm1, %xmm0
13 ; SSE2-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1],xmm1[1]
14 ; SSE2-NEXT: addss %xmm1, %xmm0
17 ; SSSE3-LABEL: pr26491:
19 ; SSSE3-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
20 ; SSSE3-NEXT: addps %xmm0, %xmm1
21 ; SSSE3-NEXT: movaps %xmm1, %xmm0
22 ; SSSE3-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1],xmm1[1]
23 ; SSSE3-NEXT: addss %xmm1, %xmm0
28 ; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
29 ; AVX-NEXT: vaddps %xmm0, %xmm1, %xmm0
30 ; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
31 ; AVX-NEXT: vaddss %xmm0, %xmm1, %xmm0
33 %1 = shufflevector <4 x float> %a0, <4 x float> undef, <4 x i32> <i32 1, i32 1, i32 3, i32 3>
34 %2 = fadd <4 x float> %1, %a0
35 %3 = extractelement <4 x float> %2, i32 2
36 %4 = extractelement <4 x float> %2, i32 0
37 %5 = fadd float %3, %4