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/] [tree-ssa/] [gen-vect-25.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run { target vect_cmdline_needed } } */
2
/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
3
/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
4
 
5
#include <stdlib.h>
6
 
7
#define N 128
8
 
9
#if __LONG_MAX__ == 2147483647
10
typedef short half_word;
11
#else
12
typedef int half_word;
13
#endif
14
 
15
int main_1 (int n, int *p)
16
{
17
  int i;
18
  half_word ib[N];
19
  half_word ia[N];
20
  int k;
21
 
22
  for (i = 0; i < N; i++)
23
    {
24
      ia[i] = n;
25
    }
26
 
27
  /* check results:  */
28
  for (i = 0; i < N; i++)
29
    {
30
      if (ia[i] != n)
31
        abort ();
32
    }
33
 
34
  k = *p;
35
  for (i = 0; i < N; i++)
36
    {
37
      ib[i] = k;
38
    }
39
 
40
  /* check results:  */
41
  for (i = 0; i < N; i++)
42
    {
43
      if (ib[i] != k)
44
        abort ();
45
    }
46
 
47
  return 0;
48
}
49
 
50
static volatile int n = 1;
51
 
52
int main (void)
53
{
54
  return main_1 (n + 2, (int *) &n);
55
}
56
 
57
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! avr-*-* } } } } */
58
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! avr-*-* } } } } */
59
/* { 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.