OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipacost-2.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized"  } */
3
/* { dg-add-options bind_pic_locally } */
4
 
5
int array[100];
6
 
7
int t(int);
8
 
9
static int
10
i_can_be_propagated_fully (int *a)
11
{
12
  int i;
13
  for (i=0;i<50;i++)
14
  {
15
    t(a[i]);
16
    t(a[i+1]);
17
    t(a[i+2]);
18
    t(a[i+3]);
19
  }
20
}
21
static int
22
i_can_be_propagated_fully2 (int *a)
23
{
24
  i_can_be_propagated_fully (a);
25
  i_can_be_propagated_fully (a);
26
  i_can_be_propagated_fully (a);
27
}
28
static int
29
i_can_not_be_propagated_fully (int *a)
30
{
31
  int i;
32
  for (i=0;i<50;i++)
33
  {
34
    t(a[i]);
35
    t(a[i+1]);
36
    t(a[i+2]);
37
    t(a[i+3]);
38
  }
39
}
40
int
41
i_can_not_be_propagated_fully2 (int *a)
42
{
43
  i_can_not_be_propagated_fully (a);
44
  i_can_not_be_propagated_fully (a);
45
  i_can_not_be_propagated_fully (a);
46
}
47
main()
48
{
49
  int i;
50
  i_can_be_propagated_fully2 (array);
51
  i_can_be_propagated_fully2 (array);
52
 
53
  for (i = 0; i < 100; i++)
54
    i_can_not_be_propagated_fully2 (array);
55
  i_can_not_be_propagated_fully2 (array);
56
}
57
 
58
/* { dg-final { scan-ipa-dump-times "versioned function i_can_be_propagated_fully2" 1 "cp"  } } */
59
/* { dg-final { scan-ipa-dump-times "versioned function i_can_be_propagated_fully " 1 "cp"  } } */
60
/* { dg-final { scan-ipa-dump-times "versioned function i_can_not_be_propagated_fully2" 1 "cp"  } } */
61
/* { dg-final { scan-ipa-dump-times "versioned function i_can_not_be_propagated_fully " 1 "cp"  } } */
62
/* { dg-final { scan-tree-dump-not "i_can_be_propagated_fully \\(" "optimized"  } } */
63
/* { dg-final { scan-tree-dump-not "i_can_be_propagated_fully2 \\(" "optimized"  } } */
64
/* { dg-final { cleanup-ipa-dump "cp" } } */
65
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.