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

Subversion Repositories openrisc

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

powered by: WebSVN 2.1.0

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