gcc/testsuite/gcc.target/riscv/zbs-if_then_else-01.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-march=rv64gc_zbb_zbs -mabi=lp64" } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O1" } } */ |
| 4 | |
| 5 | void g(); |
| 6 | |
| 7 | void f1 (long a) |
| 8 | { |
| 9 | if ((a & ((1ul << 33) | (1 << 4))) == (1ul << 33)) |
| 10 | g(); |
| 11 | } |
| 12 | |
| 13 | void f2 (long a) |
| 14 | { |
| 15 | if ((a & 0x12) == 0x10) |
| 16 | g(); |
| 17 | } |
| 18 | |
| 19 | /* { dg-final { scan-assembler-times "bexti\t" 2 } } */ |
| 20 | /* { dg-final { scan-assembler-times "andn\t" 1 } } */ |