2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / ira-shrinkwrap-prep-2.c
blobed08494cfa0d39a697c6b0ece6a3a71b76150730
1 /* { dg-do compile { target { { x86_64-*-* && lp64 } || { powerpc*-*-* && lp64 } } } } */
2 /* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue" } */
4 long __attribute__((noinline, noclone))
5 foo (long a)
7 return a + 5;
10 static long g;
12 long __attribute__((noinline, noclone))
13 bar (long a)
15 long r;
17 if (a)
19 r = a;
20 while (r < 500)
21 if (r % 2)
22 r = foo (r);
23 else
24 r = foo (r+1);
25 g = r + a;
27 else
28 r = g+1;
29 return r;
32 /* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira" } } */
33 /* { dg-final { scan-rtl-dump "Split live-range of register" "ira" } } */
34 /* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
35 /* { dg-final { cleanup-rtl-dump "ira" } } */
36 /* { dg-final { cleanup-rtl-dump "pro_and_epilogue" } } */