gcc/testsuite/gcc.dg/tree-ssa/phi-opt-35.c
raw| 1 | /* PR tree-optimization/106164 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O1 -fdump-tree-phiopt2" } */ |
| 4 | |
| 5 | _Bool f2(int a) |
| 6 | { |
| 7 | if (a != 2) |
| 8 | return a > 1; |
| 9 | return 0; |
| 10 | } |
| 11 | /* phiopt2 should be able to optimize this to `a > 2` via match and simplify */ |
| 12 | /* { dg-final { scan-tree-dump "_\[0-9\]+ = a_\[0-9\]+.D. > 2" "phiopt2" } } */ |
| 13 | /* { dg-final { scan-tree-dump-not "a_\[0-9\]+.D. != 2" "phiopt2" } } */ |