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/] [tree-ssa/] [loop-8.c] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* A test for strength reduction of ivs with nonconstant step.  */
2
 
3
/* { dg-do compile } */
4
/* { dg-options "-O1 -fdump-tree-optimized" } */
5
 
6
int bar (void);
7
 
8
int a[100];
9
 
10
void xxx (void)
11
{
12
  int iter, step = bar ();
13
 
14
  for (iter = 0; iter < 10; iter++)
15
    a[iter * step] = bar ();
16
}
17
 
18
/* The array access should be strength reduced.  But to determine the value of
19
   the step, we need to calculate step * sizeof (int), thus we need to be
20
   a bit careful about which multiplications we disallow.  */
21
 
22
/* { dg-final { scan-tree-dump-times "step \\* \[^0-9\]" 0 "optimized" } } */
23
/* { dg-final { scan-tree-dump-times "\[^0-9\] \\* step" 0 "optimized" } } */
24
 
25
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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