gcc/testsuite/gcc.dg/tree-ssa/pr31531-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 | /* PR tree-optimization/31531 */ |
| 4 | |
| 5 | int f(int a) |
| 6 | { |
| 7 | int b = ~a; |
| 8 | return b<0; |
| 9 | } |
| 10 | |
| 11 | |
| 12 | int f1(unsigned a) |
| 13 | { |
| 14 | int b = ~a; |
| 15 | return b<0; |
| 16 | } |
| 17 | /* We should convert the above two functions from b <0 to ((int)a) >= 0. */ |
| 18 | /* { dg-final { scan-tree-dump-times ">= 0" 2 "optimized"} } */ |
| 19 | /* { dg-final { scan-tree-dump-times "~" 0 "optimized"} } */ |