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-85.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
 
8
__attribute__ ((noinline))
9
int main1 (int *a)
10
{
11
  int i, j, k;
12
  int b[N];
13
 
14
  for (i = 0; i < N; i++)
15
    {
16
      for (j = 0; j < N; j++)
17
        {
18
          k = i + N;
19
          a[j] = k;
20
        }
21
      b[i] = k;
22
    }
23
 
24
 
25
  for (j = 0; j < N; j++)
26
    if (a[j] != i + N - 1)
27
      abort();
28
 
29
  for (j = 0; j < N; j++)
30
    if (b[j] != j + N)
31
      abort();
32
 
33
  return 0;
34
}
35
 
36
int main (void)
37
{
38
  int a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
39
 
40
  check_vect ();
41
 
42
  main1 (a);
43
 
44
  return 0;
45
}
46
 
47
/* Fails for targets that don't vectorize PLUS (e.g alpha).  */
48
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
49
/* { 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.