| 1 |
/* Verify that we do optimize away the frame header in foo when using |
| 2 |
-mframe-header-opt by checking the stack pointer increment done in |
| 3 |
that function. Without the optimization foo should increment the |
| 4 |
stack by 24 bytes, with the optimization it would only be 8 bytes. */ |
| 5 |
|
| 6 |
/* { dg-do compile } */ |
| 7 |
/* { dg-options "-mframe-header-opt -mabi=32 -mno-abicalls" } */ |
| 8 |
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 9 |
/* { dg-final { scan-assembler "\taddiu\t\\\$sp,\\\$sp,-8" } } */ |
| 10 |
|
| 11 |
NOMIPS16 void __attribute__((noinline)) __attribute__((noipa)) |
| 12 |
bar (int* a) |
| 13 |
{ |
| 14 |
*a = 1; |
| 15 |
} |
| 16 |
|
| 17 |
NOMIPS16 void |
| 18 |
foo (int a) |
| 19 |
{ |
| 20 |
bar (&a); |
| 21 |
} |