1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fuse-caller-save -fomit-frame-pointer -fno-optimize-sibling-calls" } */
3 /* { dg-additional-options "-mregparm=1" { target ia32 } } */
5 /* Test -fuse-caller-save optimization on self-recursive function. */
7 static int __attribute__((noinline
))
15 int __attribute__((noinline
))
21 /* Check that no registers are saved/restored. */
22 /* { dg-final { scan-assembler-not "push" } } */
23 /* { dg-final { scan-assembler-not "pop" } } */
25 /* Check that addition uses dx. */
26 /* { dg-final { scan-assembler-times "addl\t%\[re\]?dx, %\[re\]?ax" 1 } } */
28 /* Verify that bar is self-recursive. */
29 /* { dg-final { scan-assembler-times "call\t_?bar" 2 } } */