OSDN Git Service

[X86] Add a couple more unary shuffles to the sse1 shuffle test.
authorCraig Topper <craig.topper@intel.com>
Sun, 17 Sep 2017 22:36:39 +0000 (22:36 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 17 Sep 2017 22:36:39 +0000 (22:36 +0000)
These can be implemented with movlhps and movhlps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313503 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/vector-shuffle-sse1.ll

index dfab9c9..22b5102 100644 (file)
@@ -109,6 +109,24 @@ define <4 x float> @shuffle_v4f32_0145(<4 x float> %a, <4 x float> %b) {
   ret <4 x float> %shuffle
 }
 
+define <4 x float> @shuffle_v4f32_0101(<4 x float> %a, <4 x float> %b) {
+; SSE1-LABEL: shuffle_v4f32_0101:
+; SSE1:       # BB#0:
+; SSE1-NEXT:    shufps {{.*#+}} xmm0 = xmm0[0,1,0,1]
+; SSE1-NEXT:    retq
+  %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
+  ret <4 x float> %shuffle
+}
+
+define <4 x float> @shuffle_v4f32_2323(<4 x float> %a, <4 x float> %b) {
+; SSE1-LABEL: shuffle_v4f32_2323:
+; SSE1:       # BB#0:
+; SSE1-NEXT:    shufps {{.*#+}} xmm0 = xmm0[2,3,2,3]
+; SSE1-NEXT:    retq
+  %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 3, i32 2, i32 3>
+  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: