gcc/testsuite/gcc.dg/tree-ssa/phi-opt-33.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-optimized-raw" } */ |
| 3 | /* PR tree-optimization/100798 */ |
| 4 | |
| 5 | int f(int a, int t) |
| 6 | { |
| 7 | return (a=='s' ? ~t : t); |
| 8 | } |
| 9 | |
| 10 | /* This should be convert into t^-(a=='s'). */ |
| 11 | /* { dg-final { scan-tree-dump-times "bit_xor_expr, " 1 "optimized" } } */ |
| 12 | /* { dg-final { scan-tree-dump-times "negate_expr, " 1 "optimized" } } */ |
| 13 | /* { dg-final { scan-tree-dump-not "bit_not_expr, " "optimized" } } */ |