Debian Codegraph @

gcc/testsuite/gcc.target/riscv/zbs-zext-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcb -mabi=lp64d" { target { rv64 } } } */
3 /* { dg-options "-march=rv32gcb -mabi=ilp32" { target { rv32 } } } */
4 /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
5
6 /* We need to adjust the constant so this works for rv32 and rv64. */
7 #if __riscv_xlen == 32
8 #define ONE 1U
9 #else
10 #define ONE 1ULL
11 #endif
12
13 void add_to_hard_reg_set(long long *a, unsigned int count) {
14 int i = 0;
15 while(i++ < count)
16 *a |= (1U << i);
17 }
18
19 void remove_from_hard_reg_set(long long *a, unsigned int count) {
20 int i = 0;
21 while(i++ < count)
22 *a &= ~(ONE << i);
23 }
24
25
26 /* { dg-final { scan-assembler-not "and\t" } } */
27 /* { dg-final { scan-assembler-not "andn\t" } } */