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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-85.c] - Blame information for rev 154

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

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