gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-14.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-sink" } */ |
| 3 | |
| 4 | int x; |
| 5 | void foo (int b) |
| 6 | { |
| 7 | if (b) |
| 8 | x = b; |
| 9 | else |
| 10 | x = 2; |
| 11 | } |
| 12 | |
| 13 | /* We should have sunk the store and inserted a PHI to merge the |
| 14 | stored values. */ |
| 15 | |
| 16 | /* { dg-final { scan-tree-dump-times " = PHI" 1 "sink1" } } */ |
| 17 | /* { dg-final { scan-tree-dump-times "x = " 1 "sink1" } } */ |