| 1 |
/* { dg-do compile { target powerpc*-*-* } } */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
/* { dg-final { scan-assembler {\mmflr\M.*\mbl\M.*\mmflr\M.*\mbl\M} } } */ |
| 4 |
|
| 5 |
/* This tests if shrink-wrapping for separate components creates more |
| 6 |
than one prologue when that is useful. In this case, it saves the |
| 7 |
link register before both the call to g and the call to h. */ |
| 8 |
|
| 9 |
void g(void) __attribute__((noreturn)); |
| 10 |
void h(void) __attribute__((noreturn)); |
| 11 |
|
| 12 |
void f(int x) |
| 13 |
{ |
| 14 |
if (x == 42) |
| 15 |
g(); |
| 16 |
if (x == 31) |
| 17 |
h(); |
| 18 |
} |