gcc/testsuite/gcc.target/riscv/zbs-bclri-nottwobits.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-march=rv64gc_zbs -mabi=lp64" } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */ |
| 4 | |
| 5 | int and_two_bit(int idx) { |
| 6 | return idx & ~3; |
| 7 | } |
| 8 | |
| 9 | int and_bclr_two_bit(int idx) { |
| 10 | return idx & ~(0x4001); |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-assembler-times "\tandi\t" 2 } } */ |
| 14 | /* { dg-final { scan-assembler-times "\tbclri\t" 1 } } */ |