| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ |
| 3 |
/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ |
| 4 |
/* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */ |
| 5 |
|
| 6 |
/* |
| 7 |
**advance: |
| 8 |
**.LFB0: |
| 9 |
** .cfi_startproc |
| 10 |
** testl %edi, %edi |
| 11 |
** jle .L2 |
| 12 |
** imull %edi, %edi |
| 13 |
** leal \(%rdi,%rdi\), %eax |
| 14 |
** ret |
| 15 |
**... |
| 16 |
*/ |
| 17 |
|
| 18 |
/* Verify there is an early return without the prolog and shrink-wrap |
| 19 |
the function. */ |
| 20 |
|
| 21 |
int f (int); |
| 22 |
int |
| 23 |
advance (int dz) |
| 24 |
{ |
| 25 |
if (dz > 0) |
| 26 |
return (dz + dz) * dz; |
| 27 |
else |
| 28 |
return dz * f (dz); |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-rtl-dump-times "Performing shrink-wrapping" 1 "pro_and_epilogue" } } */ |