OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-pre-28.c
1 /* PR37997 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-pre-details" } */
4
5 int foo (int i, int b, int result)
6 {
7   int mask;
8   if (b)
9     mask = -1;
10   else
11     mask = 0;
12   result = i + 1;
13   result = result & mask;
14   return result;
15 }
16
17 /* We should insert i + 1 into the if (b) path as well as the simplified
18    i + 1 & -1 expression.  And do replacement with two PHI temps.  */
19
20 /* { dg-final { scan-tree-dump-times "with prephitmp" 2 "pre" } } */
21 /* { dg-final { cleanup-tree-dump "pre" } } */