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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-20.c] - Blame information for rev 826

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 64
7
 
8
  int ia[N];
9
  int ib[N]=
10
    {1,1,0,0,1,0,1,0,
11
     1,1,0,0,1,0,1,0,
12
     1,1,0,0,1,0,1,0,
13
     1,1,0,0,1,0,1,0,
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
 
19
  signed char ca[N];
20
  signed char cb[N] =
21
    {1,1,0,0,1,0,1,0,
22
     1,1,0,0,1,0,1,0,
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
 
30
  short sa[N];
31
  short sb[N] =
32
    {1,1,0,0,1,0,1,0,
33
     1,1,0,0,1,0,1,0,
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
 
41
__attribute__ ((noinline)) int
42
main1 ()
43
{
44
  int i;
45
 
46
  /* Check ints.  */
47
 
48
  for (i = 0; i < N; i++)
49
    {
50
      ia[i] = ~ib[i];
51
    }
52
 
53
  /* check results:  */
54
  for (i = 0; i <N; i++)
55
    {
56
      if (ia[i] != ~ib[i])
57
        abort ();
58
    }
59
 
60
  /* Check chars.  */
61
 
62
  for (i = 0; i < N; i++)
63
    {
64
      ca[i] = ~cb[i];
65
    }
66
 
67
  /* check results:  */
68
  for (i = 0; i <N; i++)
69
    {
70
      if (ca[i] != ~cb[i])
71
        abort ();
72
    }
73
 
74
  /* Check shorts.  */
75
 
76
  for (i = 0; i < N; i++)
77
    {
78
      sa[i] = ~sb[i];
79
    }
80
 
81
  /* check results:  */
82
  for (i = 0; i <N; i++)
83
    {
84
      if (sa[i] != ~sb[i])
85
        abort ();
86
    }
87
 
88
  return 0;
89
}
90
 
91
int main (void)
92
{
93
  check_vect ();
94
 
95
  return main1 ();
96
}
97
 
98
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
99
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
100
/* { 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.