| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -mcbcond" } */ |
| 3 |
|
| 4 |
extern void foo (void); |
| 5 |
extern void bar (void); |
| 6 |
|
| 7 |
void cbcondne (int a) |
| 8 |
{ |
| 9 |
if (a != 0) |
| 10 |
foo (); |
| 11 |
bar (); |
| 12 |
} |
| 13 |
|
| 14 |
void cbconde (int a) |
| 15 |
{ |
| 16 |
if (a == 0) |
| 17 |
foo (); |
| 18 |
bar (); |
| 19 |
} |
| 20 |
|
| 21 |
void cbcondl (int a) |
| 22 |
{ |
| 23 |
if (a < 0) |
| 24 |
foo (); |
| 25 |
bar (); |
| 26 |
} |
| 27 |
|
| 28 |
void cbcondle (int a) |
| 29 |
{ |
| 30 |
if (a <= 0) |
| 31 |
foo (); |
| 32 |
bar (); |
| 33 |
} |
| 34 |
|
| 35 |
/* { dg-final { scan-assembler "cwbe\t%" { target ilp32 } } } */ |
| 36 |
/* { dg-final { scan-assembler "cwbne\t%" { target ilp32 } } } */ |
| 37 |
/* { dg-final { scan-assembler "cwbl\t%" } } */ |
| 38 |
/* { dg-final { scan-assembler "cwble\t%" } } */ |