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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-scevccp-outer-6.c] - Blame information for rev 816

Go to most recent revision | 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
__attribute__ ((noinline)) int
9
foo (int * __restrict__ b, int k){
10
  int i,j;
11
  int sum,x;
12
  int a[N];
13
 
14
  for (i = 0; i < N; i++) {
15
    sum = b[i];
16
    for (j = 0; j < N; j++) {
17
      sum += j;
18
    }
19
    a[i] = sum;
20
  }
21
 
22
  return a[k];
23
}
24
 
25
int main (void)
26
{
27
  int i,j;
28
  int sum;
29
  int b[N];
30
  int a[N];
31
 
32
  check_vect ();
33
 
34
  for (i=0; i<N; i++)
35
    b[i] = i + 2;
36
 
37
  for (i=0; i<N; i++)
38
    a[i] = foo (b,i);
39
 
40
    /* check results:  */
41
  for (i=0; i<N; i++)
42
    {
43
      sum = b[i];
44
      for (j = 0; j < N; j++){
45
        sum += j;
46
      }
47
      if (a[i] != sum)
48
        abort();
49
    }
50
 
51
  return 0;
52
}
53
 
54
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { unaligned_stack || vect_no_align } } } } */
55
/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { xfail *-*-* } } } */
56
/* { 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.