diff options
Diffstat (limited to 'test/CodeGen/mips64-padding-arg.c')
-rw-r--r-- | test/CodeGen/mips64-padding-arg.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/test/CodeGen/mips64-padding-arg.c b/test/CodeGen/mips64-padding-arg.c index 85dc00c..49a29c1 100644 --- a/test/CodeGen/mips64-padding-arg.c +++ b/test/CodeGen/mips64-padding-arg.c @@ -1,5 +1,6 @@ // RUN: %clang -target mipsel-unknown-linux -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=O32 // RUN: %clang -target mips64el-unknown-linux -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s -check-prefix=N64 +// RUN: %clang -target mipsel-unknown-linux -mfp64 -O3 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=O32 typedef struct { double d; @@ -8,7 +9,7 @@ typedef struct { // Insert padding to ensure arguments of type S0 are aligned to 16-byte boundaries. -// N64: 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) +// N64-LABEL: 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) // N64: 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) // N64: declare void @foo2(i32, i32, i32, i64, double, i64, i64, i64, double, i64, i64, i64, i32, i64, double, i64, i64, i64) @@ -20,7 +21,7 @@ void foo1(int a0, S0 a1, S0 a2, int b, S0 a3) { // Insert padding before long double argument. // -// N64: define void @foo3(i32 %a0, i64, fp128 %a1) +// N64-LABEL: define void @foo3(i32 %a0, i64, fp128 %a1) // N64: tail call void @foo4(i32 1, i32 2, i32 %a0, i64 undef, fp128 %a1) // N64: declare void @foo4(i32, i32, i32, i64, fp128) @@ -32,7 +33,7 @@ void foo3(int a0, long double a1) { // Insert padding after hidden argument. // -// N64: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0) +// N64-LABEL: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0) // N64: call void @foo6(%struct.S0* sret %agg.result, i32 1, i32 2, i64 undef, fp128 %a0) // N64: declare void @foo6(%struct.S0* sret, i32, i32, i64, fp128) @@ -44,7 +45,7 @@ S0 foo5(long double a0) { // Do not insert padding if ABI is O32. // -// O32: define void @foo7(float %a0, double %a1) +// O32-LABEL: define void @foo7(float %a0, double %a1) // O32: declare void @foo8(float, double) extern void foo8(float, double); @@ -53,3 +54,18 @@ void foo7(float a0, double a1) { foo8(a0 + 1.0f, a1 + 2.0); } +// O32-LABEL: define void @foo9() +// O32: declare void @foo10(i32, i32 + +typedef struct __attribute__((aligned(16))) { + int a; +} S16; + +S16 s16; + +void foo10(int, S16); + +void foo9(void) { + foo10(1, s16); +} + |