gcc/testsuite/gcc.target/riscv/zbb-andn-orn-01.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "-O0" "-g" "-Oz" "-Os" } } */ |
| 4 | |
| 5 | int foo1(int rs1) |
| 6 | { |
| 7 | return 100 & ~rs1; |
| 8 | } |
| 9 | |
| 10 | int foo2(int rs1) |
| 11 | { |
| 12 | return 100 | ~rs1; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler-times "andn\t" 1 } } */ |
| 16 | /* { dg-final { scan-assembler-times "orn\t" 1 } } */ |
| 17 | /* { dg-final { scan-assembler-times "li\t" 2 } } */ |