summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/mips64-padding-arg.c
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-01-09 19:31:25 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-01-09 19:31:25 +0000
commit1632af603dba23db88af44f86206fc43f47cb55c (patch)
tree4ec8476ef133cf142701137ed622ba6f8ca8b85e /clang/test/CodeGen/mips64-padding-arg.c
parent01a82d1918cd9851be76156ae09e5e369cb33b99 (diff)
downloadbcm5719-llvm-1632af603dba23db88af44f86206fc43f47cb55c.tar.gz
bcm5719-llvm-1632af603dba23db88af44f86206fc43f47cb55c.zip
Insert padding before unaligned long double arguments.
llvm-svn: 147791
Diffstat (limited to 'clang/test/CodeGen/mips64-padding-arg.c')
-rw-r--r--clang/test/CodeGen/mips64-padding-arg.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/CodeGen/mips64-padding-arg.c b/clang/test/CodeGen/mips64-padding-arg.c
index 658e6ebea08..3958807974f 100644
--- a/clang/test/CodeGen/mips64-padding-arg.c
+++ b/clang/test/CodeGen/mips64-padding-arg.c
@@ -5,7 +5,7 @@ typedef struct {
long double ld;
} S0;
-// Insert padding to ensure arugments of type S0 are aligned to 16-byte boundaries.
+// Insert padding to ensure arguments of type S0 are aligned to 16-byte boundaries.
// CHECK: define void @foo1(i32 %a0, i64, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 %b, i64, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3)
// CHECK: tail call void @foo2(i32 1, i32 2, i32 %a0, i64 undef, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 3, i64 undef, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3)
@@ -17,3 +17,15 @@ void foo1(int a0, S0 a1, S0 a2, int b, S0 a3) {
foo2(1, 2, a0, a1, a2, 3, a3);
}
+// Insert padding before long double argument.
+//
+// CHECK: define void @foo3(i32 %a0, i64, fp128 %a1)
+// CHECK: tail call void @foo4(i32 1, i32 2, i32 %a0, i64 undef, fp128 %a1)
+// CHECK: declare void @foo4(i32, i32, i32, i64, fp128)
+
+extern void foo4(int, int, int, long double);
+
+void foo3(int a0, long double a1) {
+ foo4(1, 2, a0, a1);
+}
+
OpenPOWER on IntegriCloud