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-20.c] - Blame information for rev 149

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 64
7
 
8
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
 
23
  signed char ca[N];
24
  signed char cb[N] =
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
     1,1,0,0,1,0,1,0,
32
     1,1,0,0,1,0,1,0};
33
 
34
  short sa[N];
35
  short sb[N] =
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
     1,1,0,0,1,0,1,0,
43
     1,1,0,0,1,0,1,0};
44
 
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.