Debian Codegraph @

gcc/testsuite/gcc.target/riscv/pr93304.c

raw
1 /* Verify the regrename won't rename registers to register which never used
2 before. */
3 /* { dg-do compile } */
4 /* { dg-options "-frename-registers" } */
5 /* { dg-skip-if "" { *-*-* } { "-O0" } } */
6
7 static unsigned _t = 0;
8
9 void __attribute__ ((interrupt))
10 foo (void)
11 {
12 _t++;
13 }
14
15 /* Register rename will try to use registers from the lower register
16 regradless of the REG_ALLOC_ORDER.
17 In theory, t2 should not used in such small program if regrename
18 not executed incorrectly, because t0-a2 should be enough. */
19 /* { dg-final { scan-assembler-not {\t[a-zA-Z0-9]+\t.*t2} } } */