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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-86.c] - Blame information for rev 298

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