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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [loop-3.c] - Blame information for rev 816

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* A test for strength reduction and induction variable elimination.
2
   Target is restricted to x86 type architectures, so that we may
3
   assume something about memory addressing modes.  */
4
 
5
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && nonpic } } } */
6
/* { dg-options "-O1 -fdump-tree-optimized" } */
7
 
8
int arr_base[100];
9
 
10
int foo(int);
11
 
12
void xxx(void)
13
{
14
  long iter;
15
 
16
  for (iter = 0; iter < 100; iter++)
17
    arr_base[iter] = foo (iter);
18
}
19
 
20
/* Access to arr_base[iter].y should not be strength reduced, since
21
   we have a memory mode including multiplication by 4.  */
22
 
23
/* { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } */
24
/* { dg-final { scan-tree-dump-times "step:" 1 "optimized" } } */
25
 
26
/* And original induction variable should be preserved.  */
27
 
28
/* { dg-final { scan-tree-dump-times "int iter" 1 "optimized" } } */
29
 
30
/* { 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.