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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-outer-2c.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_float } */
2
/* { dg-require-effective-target vect_intfloat_cvt } */
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 40
7
float image[2*N][2*N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
8
 
9
__attribute__ ((noinline)) void
10
foo (){
11
  int i,j,k;
12
 
13
 for (k=0; k<N; k++) {
14
  for (i = 0; i < N; i++) {
15
    for (j = 0; j < N; j+=2) {
16
      image[k][j][i] = j+i+k;
17
    }
18
  }
19
 }
20
}
21
 
22
int main (void)
23
{
24
  check_vect ();
25
  int i, j, k;
26
 
27
  foo ();
28
 
29
 for (k=0; k<N; k++) {
30
  for (i = 0; i < N; i++) {
31
    for (j = 0; j < N; j+=2) {
32
      if (image[k][j][i] != j+i+k)
33
        abort ();
34
    }
35
  }
36
 }
37
 
38
  return 0;
39
}
40
 
41
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
42
/* { 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.