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-nest-cycle-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
 
3
#include <stdarg.h>
4
#include <stdio.h>
5
#include "tree-vect.h"
6
 
7
#define N 16 
8
 
9
float out[N];
10
float check_res[N] = {880,864,848,832,816,800,784,768,752,736,720,704,688,672,656,640};
11
float a[2*N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
12
 
13
/* Outer-loop vectorization.  */
14
 
15
__attribute__ ((noinline)) void
16
foo ()
17
{
18
  int i, j;
19
  float res;
20
 
21
  for (i = 0; i < N; i++)
22
    {
23
      res = 1000;
24
 
25
      for (j = 0; j < N; j++)
26
        res = res - a[i+j];
27
 
28
      out[i] = res;
29
    }
30
 
31
  for (i = 0; i < N; i++)
32
    if (out[i] != check_res[i])
33
      abort ();
34
 
35
}
36
 
37
int main ()
38
{
39
  check_vect ();
40
 
41
  foo();
42
 
43
  return 0;
44
}
45
 
46
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
47
/* { dg-final { cleanup-tree-dump "vect" } } */
48
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.