aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Generic
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-17 20:04:40 +0000
committerChris Lattner <sabre@nondot.org>2006-03-17 20:04:40 +0000
commit95ab26859483eb2621398aa1ad504bf8aec3768d (patch)
treeb12dd5f62afce3a331408e1722dfa399b4dbdff3 /test/CodeGen/Generic
parent06a8aa14b3a7e469564630a304d4ac362cfa217e (diff)
downloadexternal_llvm-95ab26859483eb2621398aa1ad504bf8aec3768d.zip
external_llvm-95ab26859483eb2621398aa1ad504bf8aec3768d.tar.gz
external_llvm-95ab26859483eb2621398aa1ad504bf8aec3768d.tar.bz2
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r--test/CodeGen/Generic/vector.ll41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/vector.ll b/test/CodeGen/Generic/vector.ll
new file mode 100644
index 0000000..9959d73
--- /dev/null
+++ b/test/CodeGen/Generic/vector.ll
@@ -0,0 +1,41 @@
+; RUN: llvm-as < %s | llc
+; Test that vectors are scalarized/lowered correctly.
+
+%f1 = type <1 x float>
+%f2 = type <2 x float>
+%f4 = type <4 x float>
+%f8 = type <8 x float>
+
+implementation
+
+void %test_f1(%f1 *%P, %f1* %Q, %f1 *%S) {
+ %p = load %f1 *%P
+ %q = load %f1* %Q
+ %R = add %f1 %p, %q
+ store %f1 %R, %f1 *%S
+ ret void
+}
+
+void %test_f2(%f2 *%P, %f2* %Q, %f2 *%S) {
+ %p = load %f2* %P
+ %q = load %f2* %Q
+ %R = add %f2 %p, %q
+ store %f2 %R, %f2 *%S
+ ret void
+}
+
+void %test_f4(%f4 *%P, %f4* %Q, %f4 *%S) {
+ %p = load %f4* %P
+ %q = load %f4* %Q
+ %R = add %f4 %p, %q
+ store %f4 %R, %f4 *%S
+ ret void
+}
+
+void %test_f8(%f8 *%P, %f8* %Q, %f8 *%S) {
+ %p = load %f8* %P
+ %q = load %f8* %Q
+ %R = add %f8 %p, %q
+ store %f8 %R, %f8 *%S
+ ret void
+}