gcc/testsuite/gcc.target/arc/or-cnst-size.c
raw| 1 | /* Tests to check if or instructions are emitted efficiently. */ |
| 2 | /* { dg-require-effective-target codedensity } */ |
| 3 | /* { dg-options "-Os" } */ |
| 4 | |
| 5 | int check_bset1 (int a) |
| 6 | { |
| 7 | return a | 0x80000000; |
| 8 | } |
| 9 | |
| 10 | int check_bset2(int a) |
| 11 | { |
| 12 | return a | 0x2022; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler-times "bset_s" 2 } } */ |
| 16 | /* { dg-final { scan-assembler "or" } } */ |