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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-scevccp-outer-12.c] - Blame information for rev 338

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 64
7
 
8
int a[N];
9
short b[N];
10
 
11
__attribute__ ((noinline)) int
12
foo (){
13
  int i,j;
14
  int sum;
15
 
16
  for (i = 0; i < N; i++) {
17
    sum = 0;
18
    for (j = 0; j < N; j++) {
19
      sum += j;
20
    }
21
    a[i] = sum;
22
    b[i] = (short)sum;
23
  }
24
}
25
 
26
int main (void)
27
{
28
  int i,j;
29
  int sum;
30
 
31
  check_vect ();
32
 
33
  foo ();
34
 
35
    /* check results:  */
36
  for (i=0; i<N; i++)
37
    {
38
      sum = 0;
39
      for (j = 0; j < N; j++)
40
        sum += j;
41
      if (a[i] != sum  || b[i] != (short)sum)
42
        abort();
43
    }
44
 
45
  return 0;
46
}
47
 
48
/* Until we support multiple types in the inner loop  */
49
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail *-*-* } } } */
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.