OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-section-anchors-vect-outer-4h.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
#include <stdarg.h>
3
#include "tree-vect.h"
4
 
5
 
6
#define N 40
7
#define M 128
8
unsigned short a[M][N];
9
unsigned int out[N];
10
 
11
/* Outer-loop vectorization. */
12
 
13
__attribute__ ((noinline))
14
void
15
foo (){
16
  int i,j;
17
  unsigned int diff;
18
 
19
  for (i = 0; i < N; i++) {
20
    for (j = 0; j < M; j++) {
21
      a[j][i] = 4;
22
    }
23
    out[i]=5;
24
  }
25
}
26
 
27
int main (void)
28
{
29
  int i, j;
30
  check_vect ();
31
 
32
  foo ();
33
 
34
  for (i = 0; i < N; i++) {
35
    for (j = 0; j < M; j++) {
36
      if (a[j][i] != 4)
37
        abort ();
38
    }
39
    if (out[i] != 5)
40
      abort ();
41
  }
42
 
43
  return 0;
44
}
45
 
46
 
47
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
48
/* { 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.