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/] [vect-35.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 16
7
 
8
__attribute__ ((noinline))
9
int main1 ()
10
{
11
  union {
12
    unsigned char a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
13
    unsigned char b[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
14
  } s;
15
  int i;
16
 
17
  /* Initialization.  */
18
  for (i = 0; i < N; i++)
19
    {
20
      s.b[i] = i;
21
    }
22
 
23
  /* Dependence analysis fails cause s.a and s.b may overlap.
24
     Use runtime aliasing test with versioning.  */
25
  for (i = 0; i < N; i++)
26
    {
27
      s.a[i] = s.b[i] + 1;
28
    }
29
 
30
  /* check results:  */
31
  for (i = 0; i < N; i++)
32
    {
33
      if (s.a[i] != i + 1)
34
        abort ();
35
    }
36
 
37
  return 0;
38
}
39
 
40
int main (void)
41
{
42
  check_vect ();
43
 
44
  return main1 ();
45
}
46
 
47
 
48
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  { xfail { ia64-*-* sparc*-*-* } } } } */
49
/* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */
50
/* { 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.