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/] [vrp08.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
/* { dg-do compile } */
2
/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp1-details" } */
3
 
4
/* Compile with -fno-tree-fre -O2 to prevent CSEing *p.  */
5
foo (int a, int *p)
6
{
7
  int x = *p + 2;
8
  int y = *p - 1;
9
  int z = *p + 9;
10
 
11
  /* This should be folded to if (1), but only one ASSERT_EXPR should
12
     be inserted.  */
13
  if (p)
14
    a = x + y + z;
15
  else
16
    a = x - y;
17
 
18
  return a;
19
}
20
/* Target with fno-delete-null-pointer-checks should not fold checks */
21
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
22
/* { dg-final { scan-tree-dump-times "PREDICATE: p_.* ne_expr 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
23
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp1" { target {   keeps_null_pointer_checks } } } } */
24
/* { 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.