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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-24.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 64
7
 
8
__attribute__ ((noinline)) int
9
main1 ()
10
{
11
  int i;
12
  int ia[N];
13
  int ib[N]=
14
    {1,1,0,0,1,0,1,0,
15
     1,1,0,0,1,0,1,0,
16
     1,1,0,0,1,0,1,0,
17
     1,1,0,0,1,0,1,0,
18
     1,1,0,0,1,0,1,0,
19
     1,1,0,0,1,0,1,0,
20
     1,1,0,0,1,0,1,0,
21
     1,1,0,0,1,0,1,0};
22
  int ic[N] =
23
    {1,1,0,0,1,0,1,0,
24
     1,1,0,0,1,0,1,0,
25
     1,1,0,0,1,0,1,0,
26
     1,1,0,0,1,0,1,0,
27
     1,1,0,0,1,0,1,0,
28
     1,1,0,0,1,0,1,0,
29
     1,1,0,0,1,0,1,0,
30
     1,1,0,0,1,0,1,0};
31
 
32
  char ca[N];
33
  char cb[N] =
34
    {1,1,0,0,1,0,1,0,
35
     1,1,0,0,1,0,1,0,
36
     1,1,0,0,1,0,1,0,
37
     1,1,0,0,1,0,1,0,
38
     1,1,0,0,1,0,1,0,
39
     1,1,0,0,1,0,1,0,
40
     1,1,0,0,1,0,1,0,
41
     1,1,0,0,1,0,1,0};
42
 
43
  char cc[N] =
44
    {1,1,0,0,1,0,1,0,
45
     1,1,0,0,1,0,1,0,
46
     1,1,0,0,1,0,1,0,
47
     1,1,0,0,1,0,1,0,
48
     1,1,0,0,1,0,1,0,
49
     1,1,0,0,1,0,1,0,
50
     1,1,0,0,1,0,1,0,
51
     1,1,0,0,1,0,1,0};
52
 
53
  short sa[N];
54
  short sb[N] =
55
    {1,1,0,0,1,0,1,0,
56
     1,1,0,0,1,0,1,0,
57
     1,1,0,0,1,0,1,0,
58
     1,1,0,0,1,0,1,0,
59
     1,1,0,0,1,0,1,0,
60
     1,1,0,0,1,0,1,0,
61
     1,1,0,0,1,0,1,0,
62
     1,1,0,0,1,0,1,0};
63
 
64
  short sc[N] =
65
    {1,1,0,0,1,0,1,0,
66
     1,1,0,0,1,0,1,0,
67
     1,1,0,0,1,0,1,0,
68
     1,1,0,0,1,0,1,0,
69
     1,1,0,0,1,0,1,0,
70
     1,1,0,0,1,0,1,0,
71
     1,1,0,0,1,0,1,0,
72
     1,1,0,0,1,0,1,0};
73
 
74
  /* Check ints.  */
75
 
76
  for (i = 0; i < N; i++)
77
    {
78
      ia[i] = (ib[i] || ic[i]);
79
    }
80
 
81
  /* check results:  */
82
  for (i = 0; i <N; i++)
83
    {
84
      if (ia[i] != (ib[i] || ic[i]))
85
        abort ();
86
    }
87
 
88
  /* Check chars.  */
89
 
90
  for (i = 0; i < N; i++)
91
    {
92
      ca[i] = (cb[i] || cc[i]);
93
    }
94
 
95
  /* check results:  */
96
  for (i = 0; i <N; i++)
97
    {
98
      if (ca[i] != (cb[i] || cc[i]))
99
        abort ();
100
    }
101
 
102
  /* Check shorts.  */
103
 
104
  for (i = 0; i < N; i++)
105
    {
106
      sa[i] = (sb[i] || sc[i]);
107
    }
108
 
109
  /* check results:  */
110
  for (i = 0; i <N; i++)
111
    {
112
      if (sa[i] != (sb[i] || sc[i]))
113
        abort ();
114
    }
115
 
116
  return 0;
117
}
118
 
119
int main (void)
120
{
121
  check_vect ();
122
 
123
  return main1 ();
124
}
125
 
126
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } } */
127
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
128
/* { 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.