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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-98-big-array.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_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16
7
#define DOT16( a, b)   ( a[0]*b[0]   + a[1]*b[1]   + a[2]*b[2]   + a[3]*b[3] + \
8
                         a[4]*b[4]   + a[5]*b[5]   + a[6]*b[6]   + a[7]*b[7] + \
9
                         a[8]*b[8]   + a[9]*b[9]   + a[10]*b[10] + a[11]*b[11] + \
10
                         a[12]*b[12] + a[13]*b[13] + a[14]*b[14] + a[15]*b[15])
11
 
12
volatile int y = 0;
13
 
14
__attribute__ ((noinline))
15
int main1 (int ia[][N])
16
{
17
  int i, j;
18
  int ib[N] = {0,3,6,9};
19
  int ic[N][N];
20
 
21
  for (i = 0; i < N; i++)
22
    {
23
        ic[0][i] = DOT16 (ia[i], ib);
24
    }
25
 
26
  /* check results: */
27
  for (i = 0; i < N; i++)
28
    {
29
       if (ic[0][i] != DOT16 (ia[i], ib))
30
           abort ();
31
    }
32
 
33
  return 0;
34
}
35
 
36
int main (void)
37
{
38
  int ia[N][N];
39
  int i,j;
40
  for (i = 0; i < N; i++)
41
    for (j = 0; j < N; j++)
42
      {
43
        ia[i][j] = i + j + 1;
44
        /* Avoid vectorization.  */
45
        if (y)
46
          abort ();
47
      }
48
 
49
  check_vect ();
50
 
51
  return main1 (ia);
52
}
53
 
54
/* Needs interleaving support.  */
55
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided4 } } } */
56
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail  vect_strided4 } } } */
57
/* { 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.