gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-11.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fdump-tree-optimized-details-blocks" } */ |
| 3 | |
| 4 | /* Testcase for PR31657. */ |
| 5 | int g(void); |
| 6 | int f(int x, int a, int b) |
| 7 | { |
| 8 | int t = 0; |
| 9 | int c = 1 << a; |
| 10 | if (!(x & 1)) |
| 11 | t = 0; |
| 12 | else |
| 13 | if (x & (1 << 2)) |
| 14 | t = g(); |
| 15 | else |
| 16 | t = 0; |
| 17 | return t; |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-tree-dump "& 5" "optimized" } } */ |
| 21 | /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */ |