gcc/testsuite/gcc.target/aarch64/fuse-caller-save.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fipa-ra" } */ |
| 3 | /* Testing -fipa-ra optimization option. */ |
| 4 | |
| 5 | static int __attribute__((noinline)) |
| 6 | bar (int x) |
| 7 | { |
| 8 | return x + 3; |
| 9 | } |
| 10 | |
| 11 | int __attribute__((noinline)) |
| 12 | foo (int y) |
| 13 | { |
| 14 | return y + bar (y); |
| 15 | } |
| 16 | |
| 17 | int |
| 18 | main (void) |
| 19 | { |
| 20 | return !(foo (5) == 13); |
| 21 | } |
| 22 | |
| 23 | /* { dg-final { scan-assembler-times "\\\[sp, -16\\\]!" 2 } } */ |
| 24 | /* { dg-final { scan-assembler-not "\\\[sp, -32\\\]!" } } */ |