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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr45720.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-do run } */
2
/* { dg-options "-ftree-vectorize" } */
3
 
4
float val[256];
5
float x;
6
void __attribute__((noinline,noclone))
7
foo(int len, int beg)
8
{
9
  int i;
10
  for (i = len - 1; i >= beg; --i)
11
    x += val[i] * 2;
12
}
13
void __attribute__((noinline,noclone))
14
bar(void)
15
{
16
  int i;
17
  for (i = 255; i >= 0; --i)
18
    x += val[i] * 2;
19
  for (i = 254; i >= 0; --i)
20
    x += val[i] * 2;
21
  for (i = 253; i >= 0; --i)
22
    x += val[i] * 2;
23
  for (i = 252; i >= 0; --i)
24
    x += val[i] * 2;
25
}
26
float y[256];
27
void __attribute__((noinline,noclone))
28
foobar(void)
29
{
30
  int i;
31
  for (i = 0; i < 252; ++i)
32
    {
33
      float l = 0;
34
      l += val[255 - i] * 2;
35
      l += val[254 - i] * 2;
36
      l += val[253 - i] * 2;
37
      l += val[252 - i] * 2;
38
      y[i] = l;
39
    }
40
}
41
int main()
42
{
43
  foo(256-1, 0);
44
  foo(256-2, 0);
45
  foo(256-3, 0);
46
  foo(256-4, 0);
47
  bar();
48
  foobar();
49
  return 0;
50
}

powered by: WebSVN 2.1.0

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