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-99.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 <stdlib.h>
4
#include "tree-vect.h"
5
 
6
int ca[100];
7
 
8
__attribute__ ((noinline))
9
void foo (int n)
10
{
11
  unsigned int i;
12
 
13
  for (i = 0; i < n; i++)
14
    ca[i] = 2;
15
}
16
 
17
int main (void)
18
{
19
  int i;
20
 
21
  check_vect ();
22
 
23
  foo(100);
24
 
25
  for (i = 0; i < 100; ++i) {
26
    if (ca[i] != 2)
27
      abort();
28
  }
29
  return 0;
30
}
31
 
32
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
33
/* { 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.