summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/2006-03-16-VectorCtor.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/2006-03-16-VectorCtor.c')
-rw-r--r--clang/test/CodeGen/2006-03-16-VectorCtor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2006-03-16-VectorCtor.c b/clang/test/CodeGen/2006-03-16-VectorCtor.c
new file mode 100644
index 0000000..c04d4b9
--- /dev/null
+++ b/clang/test/CodeGen/2006-03-16-VectorCtor.c
@@ -0,0 +1,10 @@
+// Test that basic generic vector support works
+// RUN: %clang_cc1 %s -emit-llvm -o -
+
+typedef int v4si __attribute__ ((__vector_size__ (16)));
+void test(v4si *P, v4si *Q, float X) {
+ *P = (v4si){ X, X, X, X } * *Q;
+}
+
+v4si G = (v4si){ 0.1, 1.2, 4.2, 17.2 };
+