summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/x86_64-arguments.c
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2011-11-28 23:18:11 +0000
committerTanya Lattner <tonic@nondot.org>2011-11-28 23:18:11 +0000
commit71f1b2dcd43f8ba38ff76f2d1bfd59f8f8ed7426 (patch)
tree9ecfbe85947f16f6d573816f8bfe592b4535a9d4 /clang/test/CodeGen/x86_64-arguments.c
parenta7c7e2bb8473f35123e3102d6f1eadda4141043a (diff)
downloadbcm5719-llvm-71f1b2dcd43f8ba38ff76f2d1bfd59f8f8ed7426.tar.gz
bcm5719-llvm-71f1b2dcd43f8ba38ff76f2d1bfd59f8f8ed7426.zip
Correct the code generation for function arguments of vec3 types on x86_64 when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2.
Add test case. llvm-svn: 145312
Diffstat (limited to 'clang/test/CodeGen/x86_64-arguments.c')
-rw-r--r--clang/test/CodeGen/x86_64-arguments.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/x86_64-arguments.c b/clang/test/CodeGen/x86_64-arguments.c
index ea7dd79c790..0536bf77026 100644
--- a/clang/test/CodeGen/x86_64-arguments.c
+++ b/clang/test/CodeGen/x86_64-arguments.c
@@ -318,3 +318,11 @@ int f44(int i, ...) {
__builtin_va_end(ap);
return s.y;
}
+
+// Text that vec3 returns the correct LLVM IR type.
+// CHECK: define i32 @foo(<3 x i64> %X)
+typedef long long3 __attribute((ext_vector_type(3)));
+int foo(long3 X)
+{
+ return 0;
+}
OpenPOWER on IntegriCloud