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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipacost-1.c] - Blame information for rev 706

Go to most recent revision | Details | Compare with Previous | View Log

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