gcc/testsuite/gcc.dg/tree-ssa/phi-opt-37.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O1 -fdump-tree-phiopt1" } */ |
| 3 | |
| 4 | unsigned abs_with_convert0 (int x) |
| 5 | { |
| 6 | unsigned int y = x; |
| 7 | |
| 8 | if (x < 0) |
| 9 | y = -y; |
| 10 | |
| 11 | return y; |
| 12 | } |
| 13 | unsigned abs_with_convert1 (unsigned x) |
| 14 | { |
| 15 | int y = x; |
| 16 | |
| 17 | if (y < 0) |
| 18 | x = -x; |
| 19 | |
| 20 | return x; |
| 21 | } |
| 22 | |
| 23 | /* { dg-final { scan-tree-dump-times "ABSU_EXPR <" 2 "phiopt1" } } */ |
| 24 | /* { dg-final { scan-tree-dump-not "if " "phiopt1" } } */ |