| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O2 --save-temps -fno-inline" } */ |
| 3 |
/* { dg-require-effective-target arm32 } */ |
| 4 |
extern void abort (void); |
| 5 |
int |
| 6 |
bics_si_test1 (int a, int b, int c) |
| 7 |
{ |
| 8 |
if ((a | b) == a) |
| 9 |
return a; |
| 10 |
else |
| 11 |
return c; |
| 12 |
} |
| 13 |
|
| 14 |
int |
| 15 |
bics_si_test2 (int a, int b, int c) |
| 16 |
{ |
| 17 |
if ((a | b) == b) |
| 18 |
return b; |
| 19 |
else |
| 20 |
return c; |
| 21 |
} |
| 22 |
|
| 23 |
int |
| 24 |
main () |
| 25 |
{ |
| 26 |
int x; |
| 27 |
x = bics_si_test1 (0xf00d, 0xf11f, 0); |
| 28 |
if (x != 0) |
| 29 |
abort (); |
| 30 |
|
| 31 |
x = bics_si_test1 (0xf11f, 0xf00d, 0); |
| 32 |
if (x != 0xf11f) |
| 33 |
abort (); |
| 34 |
|
| 35 |
x = bics_si_test2 (0xf00d, 0xf11f, 0); |
| 36 |
if (x != 0xf11f) |
| 37 |
abort (); |
| 38 |
|
| 39 |
x = bics_si_test2 (0xf11f, 0xf00d, 0); |
| 40 |
if (x != 0) |
| 41 |
abort (); |
| 42 |
|
| 43 |
return 0; |
| 44 |
} |
| 45 |
|
| 46 |
/* { dg-final { scan-assembler-times "bics\tr\[0-9\]+, r\[0-9\]+, r\[0-9\]+" 2 } } */ |