blob: 658e6ebea08ceaf8fea79e0ff783d849560f7583 [file] [log] [blame]
Akira Hatanakaf0cc2082012-01-07 00:25:33 +00001// RUN: %clang -ccc-host-triple mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s
2
3typedef struct {
4 double d;
5 long double ld;
6} S0;
7
8// Insert padding to ensure arugments of type S0 are aligned to 16-byte boundaries.
9
10// 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)
11// 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)
12// CHECK: declare void @foo2(i32, i32, i32, i64, double, i64, i64, i64, double, i64, i64, i64, i32, i64, double, i64, i64, i64)
13
14extern void foo2(int, int, int, S0, S0, int, S0);
15
16void foo1(int a0, S0 a1, S0 a2, int b, S0 a3) {
17 foo2(1, 2, a0, a1, a2, 3, a3);
18}
19