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-vfa-01.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_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16
7
int result[N] = {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27};
8
int X[N] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
9
int Y[N] = {};
10
 
11
__attribute__ ((noinline)) void
12
foo (int *in, int *out)
13
{
14
  int i;
15
 
16
  for (i = 0; i < N; i++)
17
    out[i] = in[i] + 2;
18
}
19
 
20
int
21
main (void)
22
{
23
  int i;
24
 
25
  check_vect ();
26
 
27
  foo (X, Y);
28
 
29
  /* check results:  */
30
  for (i = 0; i < N; i++)
31
    {
32
      if (Y[i] != result[i])
33
        abort ();
34
    }
35
  return 0;
36
}
37
 
38
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
39
/* { 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.