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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-outer-2.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_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[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
8
float out[N];
9
 
10
/* Outer-loop vectorization.  */
11
 
12
__attribute__ ((noinline)) void
13
foo (){
14
  int i,j;
15
 
16
  for (i = 0; i < N; i++) {
17
    for (j = 0; j < N; j++) {
18
      image[j][i] = j+i;
19
    }
20
  }
21
}
22
 
23
int main (void)
24
{
25
  check_vect ();
26
  int i, j;
27
 
28
  foo ();
29
 
30
  for (i = 0; i < N; i++) {
31
    for (j = 0; j < N; j++) {
32
      if (image[j][i] != j+i)
33
        abort ();
34
    }
35
  }
36
 
37
  return 0;
38
}
39
 
40
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
41
/* { 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.