| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv64gc_zbs -mabi=lp64" } */ |
| 3 |
/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */ |
| 4 |
|
| 5 |
|
| 6 |
_Bool match(const int ch, int fMap) { |
| 7 |
return ((fMap & (1<<(ch))) == 0); |
| 8 |
} |
| 9 |
|
| 10 |
_Bool match2(const int ch, int fMap) { |
| 11 |
return ((fMap & (1UL<<(ch))) == 0); |
| 12 |
} |
| 13 |
|
| 14 |
|
| 15 |
/* { dg-final { scan-assembler-times "bext\t" 2 } } */ |
| 16 |
/* { dg-final { scan-assembler-times "seqz\t|xori\t" 2 } } */ |
| 17 |
/* { dg-final { scan-assembler-not "sraw\t" } } */ |
| 18 |
/* { dg-final { scan-assembler-not "not\t" } } */ |
| 19 |
/* { dg-final { scan-assembler-not "andi\t" } } */ |