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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-iv-11.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdio.h>
4
#include <stdarg.h>
5
#include "tree-vect.h"
6
 
7
int main1 (int len)
8
{
9
  int s = 0;
10
  int i = len;
11
 
12
  /* vectorization of induction with reduction.  */
13
  for ( ; i > 1; i -=2)
14
    s += i;
15
 
16
  return s;
17
}
18
 
19
int main (void)
20
{
21
  int s;
22
  check_vect ();
23
 
24
  s = main1 (26);
25
  if (s != 182)
26
    abort ();
27
 
28
  return 0;
29
}
30
 
31
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
32
/* { 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.