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/] [tree-ssa/] [ldist-11.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 "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
3
 
4
void foo (int * __restrict__ ia,
5
          int * __restrict__ ib,
6
          int * __restrict__ oxa,
7
          int * __restrict__ oxb,
8
          int * __restrict__ oya,
9
          int * __restrict__ oyb)
10
{
11
  int i;
12
  long int mya[52];
13
  long int myb[52];
14
 
15
  for (i=0; i < 52; i++)
16
    {
17
      mya[i] = ia[i] * oxa[i] + ib[i] * oxb[i];
18
      myb[i] = -ia[i] * oxb[i] + ib[i] * oxa[i];
19
      oya[i] = 0;
20
      oyb[i] = myb[i] >> 10;
21
    }
22
 
23
  /* This loop should be distributed, and the result should look like
24
     this:
25
     |  memset (oya, 0, 208);
26
     |  for (i=0; i < 52; i++)
27
     |    oyb[i] = -ia[i] * oxb[i] + ib[i] * oxa[i] >> 10;
28
  */
29
}
30
 
31
/* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 1 "ldist" } } */
32
/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */
33
/* { dg-final { cleanup-tree-dump "ldist" } } */

powered by: WebSVN 2.1.0

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