gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-93.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fdump-tree-fre1" } */ |
| 3 | |
| 4 | void bar (); |
| 5 | void foo (int pred, int *other) |
| 6 | { |
| 7 | *other = 0; |
| 8 | if (*other) |
| 9 | goto cnt; |
| 10 | if (pred) |
| 11 | { |
| 12 | *other = 1; |
| 13 | cnt: |
| 14 | if (!pred) |
| 15 | bar (); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | /* The first VN pass should figure that if (!pred) is false because |
| 20 | if (*other) is and thus the predicate test is redundant. */ |
| 21 | /* { dg-final { scan-tree-dump-not "bar" "fre1" } } */ |