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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-scevccp-noreassoc-outer-1.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-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 40
7
 
8
int a[N];
9
 
10
__attribute__ ((noinline)) int
11
foo (){
12
  int i,j,k=0;
13
  int sum,x;
14
 
15
  for (i = 0; i < N; i++) {
16
    sum = 0;
17
    for (j = 0; j < N; j++) {
18
      sum += (i + j);
19
      i++;
20
    }
21
    a[k++] = sum;
22
  }
23
}
24
 
25
int main (void)
26
{
27
  int i,j,k=0;
28
  int sum;
29
 
30
  check_vect ();
31
 
32
  foo ();
33
 
34
    /* check results:  */
35
  for (i=0; i<N; i++)
36
    {
37
      sum = 0;
38
      for (j = 0; j < N; j++){
39
        sum += (j + i);
40
        i++;
41
      }
42
      if (a[k++] != sum)
43
        abort();
44
    }
45
 
46
  return 0;
47
}
48
 
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.