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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [slp-25.c] - Blame information for rev 298

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 128
7
 
8
/* Unaligned stores.  */
9
 
10
int ia[N+1];
11
short sa[N+1];
12
 
13
int main1 (int n)
14
{
15
  int i;
16
 
17
  for (i = 1; i <= N/2; i++)
18
    {
19
      ia[2*i] = 25;
20
      ia[2*i + 1] = 5;
21
    }
22
 
23
  /* check results:  */
24
  for (i = 1; i <= N/2; i++)
25
    {
26
      if (ia[2*i] != 25
27
          || ia[2*i + 1] != 5)
28
        abort ();
29
    }
30
 
31
  for (i = 1; i <= n/2; i++)
32
    {
33
      sa[2*i] = 25;
34
      sa[2*i + 1] = 5;
35
    }
36
 
37
  /* check results:  */
38
  for (i = 1; i <= n/2; i++)
39
    {
40
      if (sa[2*i] != 25
41
          || sa[2*i + 1] != 5)
42
        abort ();
43
    }
44
 
45
 
46
  return 0;
47
}
48
 
49
int main (void)
50
{
51
 
52
  check_vect ();
53
 
54
  return main1 (N);
55
}
56
 
57
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  } } */
58
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
59
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align } } } } */
60
/* { 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.