Debian Codegraph @

gcc/testsuite/gcc.target/riscv/pr116035-2.c

raw
1 /* { dg-do compile { target { ! riscv_abi_e } } } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" "-Os" "-Oz" } } */
3 /* { dg-options "-march=rv64g_xtheadbb_xtheadmemidx" { target { rv64 } } } */
4 /* { dg-options "-march=rv32g_xtheadbb_xtheadmemidx" { target { rv32 } } } */
5
6 void a(long);
7 unsigned b[11];
8 void c()
9 {
10 for (int d = 0; d < 11; ++d)
11 a(b[d]);
12 }
13
14 #if __riscv_xlen == 64
15 unsigned long zext64_32(unsigned int u32)
16 {
17 return u32; //th.extu a0, a0, 31, 0
18 }
19 #endif
20
21 /* { dg-final { scan-assembler "th.lwuia\t\[a-x0-9\]+,\\(\[a-x0-9\]+\\),4,0" { target { rv64 } } } } */
22 /* { dg-final { scan-assembler "th.lwia\t\[a-x0-9\]+,\\(\[a-x0-9\]+\\),4,0" { target { rv32 } } } } */
23
24 /* { dg-final { scan-assembler-not "lwu\t\[a-x0-9\]+,\\(\[a-x0-9\]+\\),4,0" } } */
25
26 /* { dg-final { scan-assembler "th.extu\t" { target rv64 } } } */