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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-pre-27.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre" } */
/* { dg-options "-O2 -fdump-tree-pre" } */
 
 
int foo (int i, int j, int b)
int foo (int i, int j, int b)
{
{
  int res = 0;
  int res = 0;
  if (b)
  if (b)
    res = i/j;
    res = i/j;
  /* We should insert the possibly trapping i/j.  */
  /* We should insert the possibly trapping i/j.  */
  res += i/j;
  res += i/j;
  return res;
  return res;
}
}
 
 
extern void bar (void);
extern void bar (void);
int foo2 (int i, int j, int b)
int foo2 (int i, int j, int b)
{
{
  int res = 0;
  int res = 0;
  if (b)
  if (b)
    res = i/j;
    res = i/j;
  /* But we fail so here because of the possibly not returning
  /* But we fail so here because of the possibly not returning
     call in the same basic-block.  */
     call in the same basic-block.  */
  res += i/j;
  res += i/j;
  bar ();
  bar ();
  return res;
  return res;
}
}
 
 
/* { dg-final { scan-tree-dump-times "# prephitmp" 1 "pre" } } */
/* { dg-final { scan-tree-dump-times "# prephitmp" 1 "pre" } } */
/* { dg-final { scan-tree-dump-times "# prephitmp" 2 "pre" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "# prephitmp" 2 "pre" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
 
 

powered by: WebSVN 2.1.0

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