summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/fuse-caller-save.c
blob: 4a76744edfe3a19963515643557013d62c004b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-fipa-ra addressing=absolute" } */
/* At -O0 and -O1, the register allocator behaves more conservatively, and
   the fipa-ra optimization doesnt' trigger.  */
/* { dg-skip-if "" { *-*-* }  { "-O0" "-O1" } } */
/* Testing -fipa-ra optimization option.  */

#define ATTRIBUTE NOCOMPRESSION
#include "fuse-caller-save.h"

/* Check that there are only 2 stack-saves: r31 in main and foo.  */

/* Check that there only 2 sw/sd.  */
/* { dg-final { scan-assembler-times "(?n)s\[wd\]\t\\\$.*,.*\\(\\\$sp\\)" 2 } } */

/* Check that the first caller-save register is unused.  */
/* { dg-final { scan-assembler-not "\\\$16" } } */