aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/x86_32-arguments-darwin.c
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
commit7b1fb81a512def2a20e2834b4598a7b3a740dc7f (patch)
tree276a52d287050a636616cde00756e0cca9a7a803 /test/CodeGen/x86_32-arguments-darwin.c
parent506d4e375a6a36a49eb70578983dc4acaf2f15ae (diff)
A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/x86_32-arguments-darwin.c')
-rw-r--r--test/CodeGen/x86_32-arguments-darwin.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/x86_32-arguments-darwin.c b/test/CodeGen/x86_32-arguments-darwin.c
index cc203d2add..31802ab8a3 100644
--- a/test/CodeGen/x86_32-arguments-darwin.c
+++ b/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;
+}