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/] [vect/] [no-scevccp-outer-8.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 40
7
 
8
 
9
__attribute__ ((noinline)) int
10
foo (int *a){
11
  int i,j;
12
  int sum;
13
 
14
  for (i = 0; i < N; i++) {
15
    sum = 0;
16
    for (j = 0; j < N; j++) {
17
      sum += j;
18
    }
19
    a[i] = sum;
20
  }
21
}
22
 
23
int main (void)
24
{
25
  int i,j;
26
  int sum;
27
  int a[N];
28
 
29
  check_vect ();
30
 
31
  for (i=0; i<N; i++)
32
    a[i] = i;
33
 
34
  foo (a);
35
 
36
    /* check results:  */
37
  for (i=0; i<N; i++)
38
    {
39
      sum = 0;
40
      for (j = 0; j < N; j++)
41
        sum += j;
42
      if (a[i] != sum)
43
        abort();
44
    }
45
 
46
  return 0;
47
}
48
 
49
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! { vect_hw_misalign } } } } } */
50
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

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