gcc/testsuite/gcc.dg/tree-ssa/phiprop-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O1 -fdump-tree-phiprop1-details -fdump-tree-release_ssa" } */ |
| 3 | int max(int a, int b) |
| 4 | { |
| 5 | int *ptr; |
| 6 | if (a > b) |
| 7 | ptr = &a; |
| 8 | else |
| 9 | ptr = &b; |
| 10 | return *ptr; |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-tree-dump-times "Inserting PHI for result of load" 1 "phiprop1"} } */ |
| 14 | /* { dg-final { scan-tree-dump-times "MAX_EXPR" 1 "release_ssa"} } */ |