gcc/testsuite/gcc.dg/tree-ssa/phi-opt-12.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fdump-tree-phiopt2" } */ |
| 3 | |
| 4 | int f(int a, int b, int c) { |
| 5 | if (c > 5) return c; |
| 6 | if (a == 0) return b; |
| 7 | return a + b; |
| 8 | } |
| 9 | |
| 10 | unsigned rot(unsigned x, int n) { |
| 11 | const int bits = __CHAR_BIT__ * __SIZEOF_INT__; |
| 12 | return (n == 0) ? x : ((x << n) | (x >> (bits - n))); |
| 13 | } |
| 14 | |
| 15 | unsigned m(unsigned a, unsigned b) { |
| 16 | if (a == 0) |
| 17 | return 0; |
| 18 | else |
| 19 | return a & b; |
| 20 | } |
| 21 | |
| 22 | /* { dg-final { scan-tree-dump-times "goto" 2 "phiopt2" } } */ |