2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gcc.target / arm / fuse-caller-save.c
blobef9256dced95a8f1ba976f7500846eaa3418ede1
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fipa-ra" } */
3 /* Testing -fipa-ra optimization option. */
5 static int __attribute__((noinline))
6 bar (int x)
8 return x + 3;
11 int __attribute__((noinline))
12 foo (int y)
14 return y + bar (y);
17 int
18 main (void)
20 return !(foo (5) == 13);
23 /* For thumb1, r3 is considered likely spilled, and treated differently in
24 ira_build_conflicts, which inhibits the fipa-ra optimization. */
25 /* { dg-final { scan-assembler-times "mov\tr3, r0" 1 { target { ! arm_thumb1 } } } } */