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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-prof/] [val-prof-4.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */
2
unsigned int a[1000];
3
unsigned int b = 999;
4
unsigned int c = 1002;
5
unsigned int d = 1003;
6
main ()
7
{
8
  int i;
9
  unsigned int n;
10
  for (i = 0; i < 1000; i++)
11
    {
12
            a[i]=1000+i;
13
    }
14
  for (i = 0; i < 1000; i++)
15
    {
16
      if (i % 2)
17
        n = b;
18
      else if (i % 3)
19
        n = c;
20
      else
21
        n = d;
22
      a[i] %= n;
23
    }
24
  return 0;
25
}
26
/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */
27
/* This is part of code checking that n is greater than the divisor so we are sure that it
28
   didn't get optimized out.  */
29
/* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* \\>" "optimized"} } */
30
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
31
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
32
/* { dg-final-use { cleanup-ipa-dump "profile" } } */

powered by: WebSVN 2.1.0

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