aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr69270-3.c
blob: 974961cedefe3535621d17a902fb0bd8a36da18d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-uncprop-details -w" } */

/* We're looking for a constant argument a PHI node.  There
   should only be one if we unpropagate correctly.  */
/* { dg-final { scan-tree-dump-times "<1\|, 1" 1 "uncprop1"} } */

typedef long unsigned int size_t;
typedef union gimple_statement_d *gimple;
int end_imm_use_stmt_p (void);
void next_imm_use_stmt (void);
int arf (void);
int boo (void);
void update_stmt (void);
unsigned char
propagate_with_phi ()
{
  gimple use_stmt;
  unsigned char phi_inserted;
  phi_inserted = 0;
  for (; !end_imm_use_stmt_p (); next_imm_use_stmt ())
    {
      if (!(arf () == 10 && boo () == 20))
        continue;
      if (!phi_inserted)
        phi_inserted = 1;
      else
        update_stmt ();
    }
}