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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr21001.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR tree-optimization/21001
2
   VRP did not insert ASSERT_EXPRs when the variable tested in a
3
   COND_EXPR is a single-use variable.  By propagating the definition
4
   of the single-use variable into the COND_EXPR, we can get useful
5
   range infomation out of the conditional.  */
6
 
7
/* { dg-do compile } */
8
/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
9
 
10
int
11
foo (int a)
12
{
13
  int b = a != 0;
14
  if (b)
15
    if (a != 0)
16
      return 1;
17
  return 0;
18
}
19
 
20
/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
21
/* { dg-final { cleanup-tree-dump "vrp1" } } */

powered by: WebSVN 2.1.0

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