Debian Codegraph @

gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips -fno-inline -fipa-ra -mcompact-branches=never" } */
3 /* { dg-skip-if "needs codesize optimization" { *-*-* } { "-O0" "-O1" "-O2" "-O3" } { "" } } */
4
5 static int foo (void* p) { return 0; }
6
7 static int bar (void* p) { return 1; }
8
9 int
10 test (void* p)
11 {
12 int res = !p ? foo(p) : bar(p);
13
14 register int tmp __asm__("$t0") = -1;
15 __asm__ (""::"r"(tmp));
16
17 return res;
18 }
19
20 /* { dg-final { scan-assembler-not "\\\.reloc\t1f,R_MIPS_JALR,foo" } } */
21 /* { dg-final { scan-assembler-not "\\\.reloc\t1f,R_MIPS_JALR,bar" } } */
22 /* { dg-final { scan-assembler "\\.set\tnomacro\n\tjalr\t\\\$25" } } */