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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-iv-2.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 16
7
 
8
__attribute__ ((noinline)) int main1 ()
9
{
10
  int arr1[N];
11
  int k = 0;
12
  int m = 3, i = 0;
13
 
14
  /* Vectorization of induction that is used after the loop.
15
     Currently vectorizable because scev_ccp disconnects the
16
     use-after-the-loop from the iv def inside the loop.  */
17
 
18
   do {
19
        k = k + 2;
20
        arr1[i] = k;
21
        m = m + k;
22
        i++;
23
   } while (i < N);
24
 
25
  /* check results:  */
26
  for (i = 0; i < N; i++)
27
    {
28
      if (arr1[i] != 2+2*i)
29
        abort ();
30
    }
31
 
32
  return m + k;
33
}
34
 
35
int main (void)
36
{
37
  int res;
38
 
39
  check_vect ();
40
 
41
  res = main1 ();
42
  if (res != 32 + 275)
43
    abort ();
44
 
45
  return 0;
46
}
47
 
48
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
49
/* { 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.