summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
blob: 16095e30854ed5d67cbf11e1edb10bef68fbf1e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* { dg-do compile { target x86_64-*-* } } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue"  } */

int __attribute__((noinline, noclone))
foo (int a)
{
  return a + 5;
}

static int g;

int __attribute__((noinline, noclone))
bar (int a)
{
  int r;

  if (a)
    {
      r = foo (a);
      g = r + a;
    }
  else
    r = a+1;
  return r;
}

/* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira"  } } */
/* { dg-final { scan-rtl-dump "Split live-range of register" "ira"  } } */
/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue"  } } */
/* { dg-final { cleanup-rtl-dump "ira" } } */
/* { dg-final { cleanup-rtl-dump "pro_and_epilogue" } } */