gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-36.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fdump-tree-fre1-details" } */ |
| 3 | |
| 4 | extern int opening; |
| 5 | extern int middle_game; |
| 6 | int s; |
| 7 | extern int d[1]; |
| 8 | void PreEvaluate(int wtm) |
| 9 | { |
| 10 | int i, j; |
| 11 | if (opening) { |
| 12 | d[0]=1; |
| 13 | } |
| 14 | else if (middle_game) { |
| 15 | d[0]=-1; |
| 16 | } |
| 17 | if (4 != opening) { |
| 18 | return; |
| 19 | } |
| 20 | s = 1; |
| 21 | } |
| 22 | |
| 23 | /* We should be able to CSE the second load of opening. */ |
| 24 | |
| 25 | /* { dg-final { scan-tree-dump "Replaced opening" "fre1" } } */ |