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-23.c] - Rev 689

Compare with Previous | Blame | View Log

/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-reassoc1" } */
 
unsigned int
foo(unsigned int a, unsigned int b, unsigned int c, unsigned int d,
    unsigned int e, unsigned int f, unsigned int g, unsigned int h)
{
  /* Should be transformed into e = 20 */
  unsigned int i = (a + 9) + (c + 8);
  unsigned int j = (-c + 1) + (-a + 2);
 
  e = i + j;
  return e;
}
 
/* { dg-final { scan-tree-dump-times "= 20" 1 "reassoc1"} } */
/* { dg-final { cleanup-tree-dump "reassoc1" } } */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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