2012-04-27 Paolo Bonzini <bonzini@gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-pre-28.c
blob55887a694dc12f7dd216fc2950f999550c4defc0
1 /* PR37997 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-pre-details" } */
5 int foo (int i, int b, int result)
7 int mask;
8 if (b)
9 mask = -2;
10 else
11 mask = 0;
12 result = i + 1;
13 result = result & mask;
14 return result;
17 /* We should insert i + 1 into the if (b) path as well as the simplified
18 i + 1 & -2 expression. And do replacement with two PHI temps. */
20 /* { dg-final { scan-tree-dump-times "with prephitmp" 2 "pre" } } */
21 /* { dg-final { cleanup-tree-dump "pre" } } */