diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/haddsub-undef.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/haddsub-undef.ll | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/llvm/test/CodeGen/X86/haddsub-undef.ll b/llvm/test/CodeGen/X86/haddsub-undef.ll index 1c06749440ee..442342ef2cca 100644 --- a/llvm/test/CodeGen/X86/haddsub-undef.ll +++ b/llvm/test/CodeGen/X86/haddsub-undef.ll @@ -506,17 +506,32 @@ define <4 x float> @add_ps_007(<4 x float> %x) { } define <4 x float> @add_ps_030(<4 x float> %x) { -; SSE-LABEL: add_ps_030: -; SSE: # %bb.0: -; SSE-NEXT: haddps %xmm0, %xmm0 -; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,2,2,3] -; SSE-NEXT: retq +; SSE-SLOW-LABEL: add_ps_030: +; SSE-SLOW: # %bb.0: +; SSE-SLOW-NEXT: movaps %xmm0, %xmm1 +; SSE-SLOW-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm0[2,3] +; SSE-SLOW-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0,2,3] +; SSE-SLOW-NEXT: addps %xmm1, %xmm0 +; SSE-SLOW-NEXT: retq ; -; AVX-LABEL: add_ps_030: -; AVX: # %bb.0: -; AVX-NEXT: vhaddps %xmm0, %xmm0, %xmm0 -; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,2,3] -; AVX-NEXT: retq +; SSE-FAST-LABEL: add_ps_030: +; SSE-FAST: # %bb.0: +; SSE-FAST-NEXT: haddps %xmm0, %xmm0 +; SSE-FAST-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,0,2,3] +; SSE-FAST-NEXT: retq +; +; AVX-SLOW-LABEL: add_ps_030: +; AVX-SLOW: # %bb.0: +; AVX-SLOW-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3] +; AVX-SLOW-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[2,0,2,3] +; AVX-SLOW-NEXT: vaddps %xmm1, %xmm0, %xmm0 +; AVX-SLOW-NEXT: retq +; +; AVX-FAST-LABEL: add_ps_030: +; AVX-FAST: # %bb.0: +; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0 +; AVX-FAST-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[1,0,2,3] +; AVX-FAST-NEXT: retq %l = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 2> %r = shufflevector <4 x float> %x, <4 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 3> %add = fadd <4 x float> %l, %r |