OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

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 -fdump-tree-vrp1 -fno-early-inlining" } */
3
 
4
typedef struct {
5
  int code;
6
} *rtx;
7
 
8
static inline void *zero ()
9
{
10
  return 0;
11
}
12
static inline int three ()
13
{
14
  return 3;
15
}
16
 
17
int
18
can_combine_p (rtx insn, rtx elt)
19
{
20
  rtx set;
21
 
22
  set = zero ();
23
  if (insn->code == three ())
24
    set = insn;
25
  else
26
    {
27
      set = elt;
28
      if (set == zero ())
29
        return 0;
30
    }
31
 
32
  if (set == zero ())
33
    return 1;
34
 
35
  return 0;
36
}
37
 
38
/* Target with fno-delete-null-pointer-checks should not fold checks */
39
/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
40
/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 0 "vrp1" { target {   keeps_null_pointer_checks } } } } */
41
/* { 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.