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/] [vect-112.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 16
7
 
8
char cb[N] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
9
char cc[N] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
10
 
11
__attribute__ ((noinline)) int
12
main1 (void)
13
{
14
  int i;
15
  int diff = 0;
16
 
17
  /* Cross-iteration cycle.  */
18
  diff = 0;
19
  for (i = 0; i < N; i++) {
20
    diff += (cb[i] - cc[i]);
21
  }
22
 
23
  /* Check results.  */
24
  if (diff != 16)
25
    abort();
26
 
27
  return 0;
28
}
29
 
30
int main (void)
31
{
32
  check_vect ();
33
  return main1 ();
34
}
35
 
36
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */
37
/* { dg-final { cleanup-tree-dump "vect" } } */
38
 
39
 

powered by: WebSVN 2.1.0

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