Debian Codegraph @

gcc/testsuite/gcc.target/riscv/xtheadmempair-3.c

raw
1 /* { dg-do compile { target { ! riscv_abi_e } } } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-g" "-Oz" "-Os" "-flto" } } */
3 /* { dg-options "-march=rv64gc_xtheadmempair -mtune=thead-c906" { target { rv64 } } } */
4 /* { dg-options "-march=rv32gc_xtheadmempair -mtune=thead-c906" { target { rv32 } } } */
5
6 #include <inttypes.h>
7
8 #if __riscv_xlen == 32
9 typedef uint32_t xlen_t;
10 #else
11 typedef uint64_t xlen_t;
12 #endif
13
14 void foo (xlen_t, xlen_t, xlen_t, xlen_t, xlen_t, xlen_t, xlen_t, xlen_t);
15 void bar (xlen_t, xlen_t, xlen_t, xlen_t, xlen_t, xlen_t, xlen_t, xlen_t);
16
17 void baz (xlen_t a, xlen_t b, xlen_t c, xlen_t d, xlen_t e, xlen_t f, xlen_t g, xlen_t h)
18 {
19 foo (a, b, c, d, e, f, g, h);
20 bar (a, b, c, d, e, f, g, h);
21 }
22
23 /* { dg-final { scan-assembler-times "th.ldd\t" 4 { target { rv64 } } } } */
24 /* { dg-final { scan-assembler-times "th.sdd\t" 4 { target { rv64 } } } } */
25
26 /* { dg-final { scan-assembler-times "th.lwd\t" 4 { target { rv32 } } } } */
27 /* { dg-final { scan-assembler-times "th.swd\t" 4 { target { rv32 } } } } */