PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-pre-28.c
blobaad3f3969d1a5dfba80a4492ee975507491a816b
1 /* PR37997 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-pre-details -fno-code-hoisting" } */
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. */
19 /* With hoisting enabled we'd hoist i + 1 to before the if, retaining
20 only one PHI node. */
22 /* { dg-final { scan-tree-dump-times "with prephitmp" 2 "pre" } } */