summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/arm-aapcs-vfp.c
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2014-02-11 09:25:50 +0000
committerOliver Stannard <oliver.stannard@arm.com>2014-02-11 09:25:50 +0000
commit405bdeddd18318d3b10edd474f6f08caa5e3a1d4 (patch)
treefabd5c9b2bc246816881c151d0b6b5aec38de886 /clang/test/CodeGen/arm-aapcs-vfp.c
parent70e6585f0c7fd6385734ccf9d88fc1ad87e62a0d (diff)
downloadbcm5719-llvm-405bdeddd18318d3b10edd474f6f08caa5e3a1d4.tar.gz
bcm5719-llvm-405bdeddd18318d3b10edd474f6f08caa5e3a1d4.zip
AAPCS: Do not split structs after CPRC allocated on stack
According to the AAPCS, we can split structs between GPRs and the stack, except for when an argument has already been allocated on the stack. This can occur when a large number of floating-point arguments fill up the VFP registers, and are alllocated on the stack before the general-purpose argument registers are full. llvm-svn: 201137
Diffstat (limited to 'clang/test/CodeGen/arm-aapcs-vfp.c')
-rw-r--r--clang/test/CodeGen/arm-aapcs-vfp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/arm-aapcs-vfp.c b/clang/test/CodeGen/arm-aapcs-vfp.c
index 071b7cf91ba..a3be64ef975 100644
--- a/clang/test/CodeGen/arm-aapcs-vfp.c
+++ b/clang/test/CodeGen/arm-aapcs-vfp.c
@@ -103,3 +103,13 @@ void test_neon(struct neon_struct arg) {
// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval %s)
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
+
+typedef struct { long long x; int y; } struct_long_long_int;
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_1(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i64 %k, i32 %l)
+void test_vfp_stack_gpr_split_1(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, long long k, int l) {}
+
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_2(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [3 x i32], i64 %k.0, i32 %k.1)
+void test_vfp_stack_gpr_split_2(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_long_long_int k) {}
+
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_3(%struct.struct_long_long_int* noalias sret %agg.result, double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, [3 x i32], i64 %k.0, i32 %k.1)
+struct_long_long_int test_vfp_stack_gpr_split_3(double a, double b, double c, double d, double e, double f, double g, double h, double i, struct_long_long_int k) {}
OpenPOWER on IntegriCloud