diff options
author | Chris Lattner <sabre@nondot.org> | 2011-05-22 23:35:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-05-22 23:35:00 +0000 |
commit | de92d739ba0ef42a5a7dcfd6e170329549d0716b (patch) | |
tree | ffb78fa8d8c08732ff1aa3d77291944ca885e2c9 /test | |
parent | 855d227967f8332237f1f1cf8eb63a1e22d8be05 (diff) |
make the x86-32 backend specify a byval alignment, even when the
code generator will do it. With this patch, clang compiles the example
in PR9794 to not have an alloca temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/struct-passing.c | 4 | ||||
-rw-r--r-- | test/CodeGen/transparent-union.c | 2 | ||||
-rw-r--r-- | test/CodeGen/x86_32-arguments-darwin.c | 6 | ||||
-rw-r--r-- | test/CodeGen/x86_32-arguments-linux.c | 4 | ||||
-rw-r--r-- | test/CodeGenCXX/x86_32-arguments.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/test/CodeGen/struct-passing.c b/test/CodeGen/struct-passing.c index 3e173be651..8e5c0adcfc 100644 --- a/test/CodeGen/struct-passing.c +++ b/test/CodeGen/struct-passing.c @@ -20,5 +20,5 @@ void *ps[] = { f0, f1, f2, f3, f4, f5 }; // CHECK: declare i32 @f1() readonly // CHECK: declare void @f2({{.*}} sret) // CHECK: declare void @f3({{.*}} sret) -// CHECK: declare void @f4({{.*}} byval) -// CHECK: declare void @f5({{.*}} byval) +// CHECK: declare void @f4({{.*}} byval align 4) +// CHECK: declare void @f5({{.*}} byval align 4) diff --git a/test/CodeGen/transparent-union.c b/test/CodeGen/transparent-union.c index 97a731855c..afdb3d6090 100644 --- a/test/CodeGen/transparent-union.c +++ b/test/CodeGen/transparent-union.c @@ -11,7 +11,7 @@ typedef union { void f0(transp_t0 obj); // CHECK: define void @f1_0(i32* %a0) -// CHECK: call void @f0(%union.transp_t0* byval %{{.*}}) +// CHECK: call void @f0(%union.transp_t0* byval align 4 %{{.*}}) // CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}}) // CHECK: } void f1_0(int *a0) { diff --git a/test/CodeGen/x86_32-arguments-darwin.c b/test/CodeGen/x86_32-arguments-darwin.c index cf89de30a2..f7e2a5368d 100644 --- a/test/CodeGen/x86_32-arguments-darwin.c +++ b/test/CodeGen/x86_32-arguments-darwin.c @@ -53,7 +53,7 @@ void f8_2(struct s8 a0) {} // FIXME: llvm-gcc expands this, this may have some value for the // backend in terms of optimization but doesn't change the ABI. -// CHECK: define void @f9_2(%struct.s9* byval %a0) +// CHECK: define void @f9_2(%struct.s9* byval align 4 %a0) struct s9 { int a : 17; int b; @@ -229,7 +229,7 @@ typedef int v4i32 __attribute__((__vector_size__(16))); v4i32 f55(v4i32 arg) { return arg+arg; } // CHECK: define void @f56( -// CHECK: i8 signext %a0, %struct.s56_0* byval %a1, +// CHECK: i8 signext %a0, %struct.s56_0* byval align 4 %a1, // CHECK: x86_mmx %a2.coerce, %struct.s56_1* byval align 4, // CHECK: i64 %a4.coerce, %struct.s56_2* byval align 4, // CHECK: <4 x i32> %a6, %struct.s39* byval align 16 %a7, @@ -238,7 +238,7 @@ v4i32 f55(v4i32 arg) { return arg+arg; } // CHECK: <4 x double> %a12, %struct.s56_6* byval align 4) // CHECK: call void (i32, ...)* @f56_0(i32 1, -// CHECK: i32 %{{[^ ]*}}, %struct.s56_0* byval %{{[^ ]*}}, +// CHECK: i32 %{{[^ ]*}}, %struct.s56_0* byval align 4 %{{[^ ]*}}, // CHECK: x86_mmx %{{[^ ]*}}, %struct.s56_1* byval align 4 %{{[^ ]*}}, // CHECK: i64 %{{[^ ]*}}, %struct.s56_2* byval align 4 %{{[^ ]*}}, // CHECK: <4 x i32> %{{[^ ]*}}, %struct.s39* byval align 16 %{{[^ ]*}}, diff --git a/test/CodeGen/x86_32-arguments-linux.c b/test/CodeGen/x86_32-arguments-linux.c index 230a20d139..2f246f85b5 100644 --- a/test/CodeGen/x86_32-arguments-linux.c +++ b/test/CodeGen/x86_32-arguments-linux.c @@ -2,7 +2,7 @@ // RUN: FileCheck < %t %s // CHECK: define void @f56( -// CHECK: i8 signext %a0, %struct.s56_0* byval %a1, +// CHECK: i8 signext %a0, %struct.s56_0* byval align 4 %a1, // CHECK: x86_mmx %a2.coerce, %struct.s56_1* byval align 4, // CHECK: <1 x double> %a4, %struct.s56_2* byval align 4, // CHECK: <4 x i32> %a6, %struct.s56_3* byval align 4, @@ -11,7 +11,7 @@ // CHECK: <4 x double> %a12, %struct.s56_6* byval align 4) // CHECK: call void (i32, ...)* @f56_0(i32 1, -// CHECK: i32 %{{.*}}, %struct.s56_0* byval %{{[^ ]*}}, +// CHECK: i32 %{{.*}}, %struct.s56_0* byval align 4 %{{[^ ]*}}, // CHECK: x86_mmx %{{[^ ]*}}, %struct.s56_1* byval align 4 %{{[^ ]*}}, // CHECK: <1 x double> %{{[^ ]*}}, %struct.s56_2* byval align 4 %{{[^ ]*}}, // CHECK: <4 x i32> %{{[^ ]*}}, %struct.s56_3* byval align 4 %{{[^ ]*}}, diff --git a/test/CodeGenCXX/x86_32-arguments.cpp b/test/CodeGenCXX/x86_32-arguments.cpp index e94e2cade5..4c0603346f 100644 --- a/test/CodeGenCXX/x86_32-arguments.cpp +++ b/test/CodeGenCXX/x86_32-arguments.cpp @@ -31,7 +31,7 @@ void f(C) { } // CHECK: define void @_ZThn4_N18BasicAliasAnalysis13getModRefInfoE8CallSite // ... -// CHECK: %struct.CallSite* byval %CS) +// CHECK: %struct.CallSite* byval align 4 %CS) struct CallSite { unsigned Ptr; CallSite(unsigned XX) : Ptr(XX) {} @@ -89,7 +89,7 @@ struct s5 { s5(); int &x; }; s5 f5() { return s5(); } // CHECK: define i32 @_Z4f6_0M2s6i(i32 %a) -// CHECK: define i64 @_Z4f6_1M2s6FivE(%{{.*}} byval) +// CHECK: define i64 @_Z4f6_1M2s6FivE(%{{.*}} byval align 4) // FIXME: It would be nice to avoid byval on the previous case. struct s6 {}; typedef int s6::* s6_mdp; |