summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-11-18 02:12:09 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-11-18 02:12:09 +0000
commit1d7dd3b6827cb102d870fae67f28f2d879e1dbd2 (patch)
tree546c5c0f3c842d131c139bac5af4d14e7cc8c01f /clang/test
parent1cdc6e95677170c257e7eeeb676027d373530136 (diff)
downloadbcm5719-llvm-1d7dd3b6827cb102d870fae67f28f2d879e1dbd2.tar.gz
bcm5719-llvm-1d7dd3b6827cb102d870fae67f28f2d879e1dbd2.zip
A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.
llvm-svn: 144963
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/x86_32-arguments-darwin.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/CodeGen/x86_32-arguments-darwin.c b/clang/test/CodeGen/x86_32-arguments-darwin.c
index cc203d2add8..31802ab8a32 100644
--- a/clang/test/CodeGen/x86_32-arguments-darwin.c
+++ b/clang/test/CodeGen/x86_32-arguments-darwin.c
@@ -292,3 +292,27 @@ struct s59 f59() { while (1) {} }
// CHECK: define void @f60(%struct.s60* byval align 4, i32 %y)
struct s60 { int x __attribute((aligned(8))); };
void f60(struct s60 x, int y) {}
+
+// CHECK: define void @f61(i32 %x, %struct.s61* byval align 16 %y)
+typedef int T61 __attribute((vector_size(16)));
+struct s61 { T61 x; int y; };
+void f61(int x, struct s61 y) {}
+
+// CHECK: define void @f62(i32 %x, %struct.s62* byval align 4)
+typedef int T62 __attribute((vector_size(16)));
+struct s62 { T62 x; int y; } __attribute((packed, aligned(8)));
+void f62(int x, struct s62 y) {}
+
+// CHECK: define i32 @f63
+// CHECK: ptrtoint
+// CHECK: and {{.*}}, -16
+// CHECK: inttoptr
+typedef int T63 __attribute((vector_size(16)));
+struct s63 { T63 x; int y; };
+int f63(int i, ...) {
+ __builtin_va_list ap;
+ __builtin_va_start(ap, i);
+ struct s63 s = __builtin_va_arg(ap, struct s63);
+ __builtin_va_end(ap);
+ return s.y;
+}
OpenPOWER on IntegriCloud