OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-scevccp-vect-iv-2.c] - Blame information for rev 384

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