OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-98.c] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 4
7
#define DOT4( a, b )  ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] )
8
 
9
__attribute__ ((noinline))
10
int main1 (int ia[][N])
11
{
12
  int i, j;
13
  int ib[N] = {0,3,6,9};
14
  int ic[N][N];
15
 
16
  for (i = 0; i < N; i++)
17
    {
18
        ic[0][i] = DOT4 (ia[i], ib);
19
    }
20
 
21
  /* check results: */
22
  for (i = 0; i < N; i++)
23
    {
24
       if (ic[0][i] != DOT4 (ia[i], ib))
25
           abort();
26
    }
27
 
28
  return 0;
29
}
30
 
31
int main (void)
32
{
33
  int ia[N][N] = {{1,2,3,4},{2,3,5,7},{2,4,6,8},{22,43,55,77}};
34
 
35
  check_vect ();
36
 
37
  return main1 (ia);
38
}
39
 
40
/* Needs interleaving support.  */
41
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd_wide } } } } */
42
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail  { vect_interleave && vect_extract_even_odd_wide } } } } */
43
/* { 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.