OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-scevccp-outer-19.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 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.