diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/aarch64/fuse-caller-save.c')
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/fuse-caller-save.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/fuse-caller-save.c b/gcc/testsuite/gcc.target/aarch64/fuse-caller-save.c new file mode 100644 index 00000000000..bfedc94c33a --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/fuse-caller-save.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fipa-ra" } */ +/* Testing -fipa-ra optimization option. */ + +static int __attribute__((noinline)) +bar (int x) +{ + return x + 3; +} + +int __attribute__((noinline)) +foo (int y) +{ + return y + bar (y); +} + +int +main (void) +{ + return !(foo (5) == 13); +} + +/* { dg-final { scan-assembler-times "\\\[sp, -16\\\]!" 2 } } */ +/* { dg-final { scan-assembler-not "\\\[sp, -32\\\]!" } } */ |