Home | History | Annotate | Download | only in X86
      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
      5 
      6 define float @pr26491(<4 x float> %a0) {
      7 ; SSE2-LABEL: pr26491:
      8 ; SSE2:       # %bb.0:
      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:    movhlps {{.*#+}} xmm0 = xmm1[1],xmm0[1]
     14 ; SSE2-NEXT:    addss %xmm1, %xmm0
     15 ; SSE2-NEXT:    retq
     16 ;
     17 ; SSSE3-LABEL: pr26491:
     18 ; SSSE3:       # %bb.0:
     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:    movhlps {{.*#+}} xmm0 = xmm1[1],xmm0[1]
     23 ; SSSE3-NEXT:    addss %xmm1, %xmm0
     24 ; SSSE3-NEXT:    retq
     25 ;
     26 ; AVX-LABEL: pr26491:
     27 ; AVX:       # %bb.0:
     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
     32 ; AVX-NEXT:    retq
     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
     38   ret float %5
     39 }
     40