diff options
author | Steve Ellcey <sellcey@imgtec.com> | 2015-11-24 22:11:27 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2015-11-24 22:11:27 +0000 |
commit | 4607d3700e024777a54f16ad4306fd9fef96b6b9 (patch) | |
tree | 357e6bcd784d3ae58cd7e789d057eb8cbbec136a /gcc/testsuite/gcc.target | |
parent | 0bfbc1662bc4aa9bcdc00b6a20e3cb9d23be0efe (diff) | |
download | gcc-4607d3700e024777a54f16ad4306fd9fef96b6b9.zip gcc-4607d3700e024777a54f16ad4306fd9fef96b6b9.tar.gz gcc-4607d3700e024777a54f16ad4306fd9fef96b6b9.tar.bz2 |
frame-header-4.c: New test.
2015-11-24 Steve Ellcey <sellcey@imgtec.com>
* gcc.target/mips/frame-header-4.c: New test.
From-SVN: r230846
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/frame-header-4.c | 20 |
1 files changed, 20 insertions, 0 deletions
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 0000000..3cddba1 --- /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); +} + |