gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-8.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -g -fdump-tree-optimized --param logical-op-non-short-circuit=1" } */ |
| 3 | |
| 4 | /* PR tree-optimization/85605 */ |
| 5 | /* Like ssa-ifcombine-ccmp-2.c but with conversion from unsigned to signed in the |
| 6 | inner bb which should be able to move too. */ |
| 7 | |
| 8 | int t (int a, unsigned b) |
| 9 | { |
| 10 | if (a > 0) |
| 11 | goto L1; |
| 12 | signed t = b; |
| 13 | if (t > 0) |
| 14 | goto L1; |
| 15 | return 0; |
| 16 | L1: |
| 17 | return 1; |
| 18 | } |
| 19 | /* { dg-final { scan-tree-dump "\|" "optimized" } } */ |