2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / fuse-caller-save-mips16.c
blob9071fcc8ace057e163a46c4fad826cc828011253
1 /* { dg-do compile } */
2 /* { dg-options "-fipa-ra (-mips16) addressing=absolute isa_rev=0" } */
3 /* At -O0 and -O1, the register allocator behaves more conservatively, and
4 the fipa-ra optimization doesnt' trigger. */
5 /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */
6 /* Testing -fipa-ra optimization option. */
8 #define ATTRIBUTE MIPS16
9 #include "fuse-caller-save.h"
11 /* Check that there are only 2 stack-saves: r31 in main and foo. */
13 /* Check that there only 2 sw/sd. */
14 /* { dg-final { scan-assembler-times "(?n)s\[wd\]\t\\\$.*,.*\\(\\\$sp\\)" 2 } } */
16 /* Check that the first caller-save register is unused. */
17 /* { dg-final { scan-assembler-not "\\\$16" } } */