| 1 |
|
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
/* PR target/100942 */ |
| 4 |
void f1(int a, int b, _Bool *x) |
| 5 |
{ |
| 6 |
x[0] = x[1] = a == 0 || b == 0; |
| 7 |
} |
| 8 |
|
| 9 |
void f2(int a, int b, int *x) |
| 10 |
{ |
| 11 |
x[0] = x[1] = a == 0 || b == 0; |
| 12 |
} |
| 13 |
|
| 14 |
|
| 15 |
/* Both functions should be using ccmp rather than 2 cset/orr. */ |
| 16 |
/* { dg-final { scan-assembler-times "\tccmp\t" 2 } } */ |
| 17 |
/* { dg-final { scan-assembler-times "\tcset\t" 2 } } */ |
| 18 |
/* { dg-final { scan-assembler-times "\tcmp\t" 2 } } */ |
| 19 |
/* { dg-final { scan-assembler-not "\torr\t" } } */ |
| 20 |
|