| 1 |
/* { dg-options "-mcompact-branches=never -mno-abicalls -G4" } */ |
| 2 |
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" "-Os" } { "" } } */ |
| 3 |
/* { dg-final { scan-assembler "beq.*\n\tlw" } } */ |
| 4 |
/* { dg-final { scan-assembler-times "\\(foo\\)" 2 } } */ |
| 5 |
|
| 6 |
/* Test that when compact branches are explicitly disabled, that a non-compact |
| 7 |
branch is produced. 'foo' should be referenced twice in the program text as the |
| 8 |
eager delay slot filler will duplicate the load of foo. */ |
| 9 |
|
| 10 |
struct list |
| 11 |
{ |
| 12 |
struct list *next; |
| 13 |
int element; |
| 14 |
}; |
| 15 |
|
| 16 |
struct list *gr; |
| 17 |
|
| 18 |
int foo; |
| 19 |
|
| 20 |
extern void t (int, int, int*); |
| 21 |
|
| 22 |
void |
| 23 |
f (struct list **ptr) |
| 24 |
{ |
| 25 |
if (gr) |
| 26 |
*ptr = gr->next; |
| 27 |
t (1, foo, &gr->element); |
| 28 |
} |