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-scevccp-outer-19.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 64
7
 
8
unsigned short a[N];
9
unsigned int b[N];
10
 
11
__attribute__ ((noinline)) int
12
foo (){
13
  unsigned short i,j;
14
  unsigned short sum;
15
 
16
  for (i = 0; i < N; i++) {
17
    sum = 0;
18
    for (j = 0; j < N; j++) {
19
      sum += j;
20
    }
21
    a[i] = sum;
22
    b[i] = (unsigned int)sum;
23
  }
24
}
25
 
26
int main (void)
27
{
28
  int i,j;
29
  short sum;
30
 
31
  check_vect ();
32
 
33
  for (i=0; i<N; i++)
34
    a[i] = i;
35
 
36
  foo ();
37
 
38
    /* check results:  */
39
  for (i=0; i<N; i++)
40
    {
41
      sum = 0;
42
      for (j = 0; j < N; j++)
43
        sum += j;
44
      if (a[i] != sum  || b[i] != (unsigned int)sum)
45
        abort();
46
    }
47
 
48
  return 0;
49
}
50
 
51
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! {vect_unpack } } } } } */
52
/* { 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.