gcc/testsuite/gcc.dg/pr85529.c
raw| 1 | /* PR tree-optimization/85529 */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-options "-O2 -fno-ssa-phiopt" } */ |
| 4 | |
| 5 | __attribute__((noinline, noclone)) int |
| 6 | foo (int x) |
| 7 | { |
| 8 | x &= 31; |
| 9 | x -= 25; |
| 10 | x *= 2; |
| 11 | if (x < 0) |
| 12 | return 1; |
| 13 | int y = x >> 2; |
| 14 | if (x >= y) |
| 15 | return 1; |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | int |
| 20 | main () |
| 21 | { |
| 22 | int i; |
| 23 | for (i = 0; i < 63; i++) |
| 24 | if (foo (i) != 1) |
| 25 | __builtin_abort (); |
| 26 | return 0; |
| 27 | } |