libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gcc.dg / ira-shrinkwrap-prep-2.c
blob2e5a9cfdc2928cbba6eb232c699a9546f344bd9e
1 /* { dg-do compile { target { { x86_64-*-* && lp64 } || { powerpc*-*-* && lp64 } } } } */
2 /* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
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" } } */