Debian Codegraph @

gcc/testsuite/gcc.target/riscv/cmo-zicbop-2.c

raw
1 /* { dg-do compile { target rv64-*-* } } */
2 /* { dg-options "-march=rv32gc_zicbop -mabi=ilp32" } */
3
4 void foo (char *p)
5 {
6 __builtin_prefetch (p, 0, 0);
7 __builtin_prefetch (p, 0, 1);
8 __builtin_prefetch (p, 0, 2);
9 __builtin_prefetch (p, 0, 3);
10 __builtin_prefetch (p, 1, 0);
11 __builtin_prefetch (p, 1, 1);
12 __builtin_prefetch (p, 1, 2);
13 __builtin_prefetch (p, 1, 3);
14 }
15
16 int foo1()
17 {
18 return __builtin_riscv_zicbop_cbo_prefetchi(1);
19 }
20
21 /* { dg-final { scan-assembler-times "prefetch.i\t" 1 } } */
22 /* { dg-final { scan-assembler-times "prefetch.r\t" 4 } } */
23 /* { dg-final { scan-assembler-times "prefetch.w\t" 4 } } */