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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [reassoc-21.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
 
4
unsigned int f (unsigned int a0, unsigned int a1, unsigned int a2,
5
                unsigned int a3, unsigned int a4)
6
{
7
  unsigned int b0, b1, b2, b3, b4, e;
8
  /* this can be optimized to four additions... */
9
  b4 = a4 + a3 + a2 + a1 + a0;
10
  b3 = a3 + a2 + a1 + a0;
11
  b2 = a2 + a1 + a0;
12
  b1 = a1 + a0;
13
  /* This is actually 0 */
14
  e = b4 - b3 + b2 - b1 - a4 - a2;
15
  return e;
16
}
17
 
18
/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */
19
/* { 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.