diff options
Diffstat (limited to 'test/CodeGen/X86/vector-shuffle-sse1.ll')
| -rw-r--r-- | test/CodeGen/X86/vector-shuffle-sse1.ll | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/test/CodeGen/X86/vector-shuffle-sse1.ll b/test/CodeGen/X86/vector-shuffle-sse1.ll index 548de4ce6ea3e..fc4652eca55d8 100644 --- a/test/CodeGen/X86/vector-shuffle-sse1.ll +++ b/test/CodeGen/X86/vector-shuffle-sse1.ll @@ -91,6 +91,22 @@ define <4 x float> @shuffle_v4f32_1133(<4 x float> %a, <4 x float> %b) { %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 1, i32 3, i32 3> ret <4 x float> %shuffle } +define <4 x float> @shuffle_v4f32_0145(<4 x float> %a, <4 x float> %b) { +; SSE1-LABEL: shuffle_v4f32_0145: +; SSE1: # BB#0: +; SSE1-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0] +; SSE1-NEXT: retq + %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 4, i32 5> + ret <4 x float> %shuffle +} +define <4 x float> @shuffle_v4f32_6723(<4 x float> %a, <4 x float> %b) { +; SSE1-LABEL: shuffle_v4f32_6723: +; SSE1: # BB#0: +; SSE1-NEXT: movhlps {{.*#+}} xmm0 = xmm1[1],xmm0[1] +; SSE1-NEXT: retq + %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 6, i32 7, i32 2, i32 3> + ret <4 x float> %shuffle +} define <4 x float> @shuffle_v4f32_4zzz(<4 x float> %a) { ; SSE1-LABEL: shuffle_v4f32_4zzz: @@ -194,7 +210,7 @@ define <4 x float> @insert_mem_lo_v4f32(<2 x float>* %ptr, <4 x float> %b) { ; SSE1-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero ; SSE1-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] ; SSE1-NEXT: xorps %xmm2, %xmm2 -; SSE1-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm2[2,3] +; SSE1-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0] ; SSE1-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm0[2,3] ; SSE1-NEXT: movaps %xmm1, %xmm0 ; SSE1-NEXT: retq @@ -215,8 +231,8 @@ define <4 x float> @insert_mem_hi_v4f32(<2 x float>* %ptr, <4 x float> %b) { ; SSE1-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero ; SSE1-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] ; SSE1-NEXT: xorps %xmm2, %xmm2 -; SSE1-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,1],xmm2[2,3] -; SSE1-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,1],xmm1[0,1] +; SSE1-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0] +; SSE1-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0] ; SSE1-NEXT: retq %a = load <2 x float>, <2 x float>* %ptr %v = shufflevector <2 x float> %a, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> @@ -234,3 +250,21 @@ define <4 x float> @shuffle_mem_v4f32_3210(<4 x float>* %ptr) { %shuffle = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0> ret <4 x float> %shuffle } +define <4 x float> @shuffle_mem_v4f32_0145(<4 x float> %a, <4 x float>* %pb) { +; SSE1-LABEL: shuffle_mem_v4f32_0145: +; SSE1: # BB#0: +; SSE1-NEXT: movhps (%rdi), %xmm0 +; SSE1-NEXT: retq + %b = load <4 x float>, <4 x float>* %pb, align 16 + %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 4, i32 5> + ret <4 x float> %shuffle +} +define <4 x float> @shuffle_mem_v4f32_6723(<4 x float> %a, <4 x float>* %pb) { +; SSE1-LABEL: shuffle_mem_v4f32_6723: +; SSE1: # BB#0: +; SSE1-NEXT: movlps 8(%rdi), %xmm0 +; SSE1-NEXT: retq + %b = load <4 x float>, <4 x float>* %pb, align 16 + %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 6, i32 7, i32 2, i32 3> + ret <4 x float> %shuffle +} |
