| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
/* { dg-final { scan-assembler-not {\tcmp|\ttest|\tmovu|\tmovs} } } */ |
| 4 |
/* { dg-final { scan-assembler-times "\tbound.b" 1 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "\tbound.w" 1 } } */ |
| 6 |
|
| 7 |
unsigned int ub (unsigned int a, unsigned char *b, int *c) |
| 8 |
{ |
| 9 |
unsigned int d = a < *b ? a : *b; |
| 10 |
*c = d == 0; |
| 11 |
return d; |
| 12 |
} |
| 13 |
|
| 14 |
unsigned int us (unsigned int a, unsigned short *b, int *c) |
| 15 |
{ |
| 16 |
unsigned int d = a < *b ? a : *b; |
| 17 |
*c = d == 0; |
| 18 |
return d; |
| 19 |
} |