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-35.c] - Blame information for rev 816

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