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/] [no-vfa-pr29145.c] - Blame information for rev 424

Go to most recent revision | 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
__attribute__ ((noinline))
7
void with_restrict(int * __restrict p)
8
{
9
  int i;
10
  int *q = p - 2;
11
 
12
  for (i = 0; i < 1000; ++i) {
13
    p[i] = q[i];
14
  }
15
}
16
 
17
__attribute__ ((noinline))
18
void without_restrict(int * p)
19
{
20
  int i;
21
  int *q = p - 2;
22
 
23
  for (i = 0; i < 1000; ++i) {
24
    p[i] = q[i];
25
  }
26
}
27
 
28
int main(void)
29
{
30
  int i;
31
  int a[1002];
32
  int b[1002];
33
 
34
  check_vect ();
35
 
36
  for (i = 0; i < 1002; ++i) {
37
    a[i] = b[i] = i;
38
  }
39
 
40
  with_restrict(a + 2);
41
  without_restrict(b + 2);
42
 
43
  for (i = 0; i < 1002; ++i) {
44
    if (a[i] != b[i])
45
      abort();
46
  }
47
  return 0;
48
}
49
 
50
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect"  { xfail vect_no_align } } } */
51
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  { xfail vect_no_align } } } */
52
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.