remove unused files
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / hoist-register-pressure-1.c
1 /* { dg-options "-Os -fdump-rtl-hoist" }  */
2 /* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { nonpic } } } } */
3 /* { dg-final { cleanup-rtl-dump "hoist" } } */
4
5 #define BUF 100
6 int a[BUF];
7
8 void com (int);
9 void bar (int);
10
11 int foo (int x, int y, int z)
12 {
13   /* "x+y" won't be hoisted if "-fira-hoist-pressure" is disabled,
14      because its rtx_cost is too small.  */
15   if (z)
16     {
17       a[1] = a[0] + a[2];
18       a[2] = a[1] + a[3];
19       a[3] = a[2] + a[4];
20       a[4] = a[3] + a[5];
21       a[5] = a[4] + a[6];
22       a[6] = a[5] + a[7];
23       a[7] = a[6] + a[8];
24       com (x+y);
25     }
26   else
27     {
28       bar (x+y);
29     }
30
31   return 0;
32 }