aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-07-07 17:54:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-07-07 17:54:24 +0000
commitcb7938c328cd80449f098fa71d91131f15357bda (patch)
tree55d4a3d1c8a73c5546ec90934a8ba31c2e36a5cc
parenta78d3277b765883a9e0c949493bdbc9b4ac93023 (diff)
New vector shuffle test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29060 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/vec_shuffle-6.ll30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_shuffle-6.ll b/test/CodeGen/X86/vec_shuffle-6.ll
new file mode 100644
index 0000000000..ca90c43c3f
--- /dev/null
+++ b/test/CodeGen/X86/vec_shuffle-6.ll
@@ -0,0 +1,30 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 3
+
+%x = global [4 x int] [ int 1, int 2, int 3, int 4 ]
+
+<2 x long> %test1() {
+ %tmp = load int* getelementptr ([4 x int]* %x, int 0, int 0)
+ %tmp3 = load int* getelementptr ([4 x int]* %x, int 0, int 1)
+ %tmp5 = load int* getelementptr ([4 x int]* %x, int 0, int 2)
+ %tmp7 = load int* getelementptr ([4 x int]* %x, int 0, int 3)
+ %tmp = insertelement <4 x int> undef, int %tmp, uint 0
+ %tmp13 = insertelement <4 x int> %tmp, int %tmp3, uint 1
+ %tmp14 = insertelement <4 x int> %tmp13, int %tmp5, uint 2
+ %tmp15 = insertelement <4 x int> %tmp14, int %tmp7, uint 3
+ %tmp16 = cast <4 x int> %tmp15 to <2 x long>
+ ret <2 x long> %tmp16
+}
+
+<4 x float> %test2(float %a, float %b, float %c, float %d) {
+ %tmp = insertelement <4 x float> undef, float %a, uint 0
+ %tmp11 = insertelement <4 x float> %tmp, float %b, uint 1
+ %tmp12 = insertelement <4 x float> %tmp11, float %c, uint 2
+ %tmp13 = insertelement <4 x float> %tmp12, float %d, uint 3
+ ret <4 x float> %tmp13
+}
+
+<2 x double> %test3(double %a, double %b) {
+ %tmp = insertelement <2 x double> undef, double %a, uint 0
+ %tmp7 = insertelement <2 x double> %tmp, double %b, uint 1
+ ret <2 x double> %tmp7
+}