From: Steve Ellcey Date: Tue, 24 Nov 2015 22:11:27 +0000 (+0000) Subject: frame-header-4.c: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4607d3700e024777a54f16ad4306fd9fef96b6b9;p=gcc.git frame-header-4.c: New test. 2015-11-24 Steve Ellcey * gcc.target/mips/frame-header-4.c: New test. From-SVN: r230846 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5c229ceb4f2..5b240482457 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-11-24 Steve Ellcey + + * gcc.target/mips/frame-header-4.c: New test. + 2015-11-24 Steven G. Kargl PR fortran/68486 diff --git a/gcc/testsuite/gcc.target/mips/frame-header-4.c b/gcc/testsuite/gcc.target/mips/frame-header-4.c new file mode 100644 index 00000000000..3cddba14de5 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/frame-header-4.c @@ -0,0 +1,20 @@ +/* Verify that we can optimize away the frame header allocation in bar + by having it use its frame header to store $31 in before calling foo. */ + +/* { dg-do compile } */ +/* { dg-options "-mframe-header-opt -mabi=32" } */ +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ +/* { dg-final { scan-assembler-not "\taddiu\t\\\$sp" } } */ + +int __attribute__ ((noinline)) +foo (int a, int b) +{ + return a + b; +} + +int __attribute__ ((noinline)) +bar (int a, int b) +{ + return 1 + foo(a,b); +} +