blob: 2f09c8baeb8c41c7e7256008aa47a3a488a7ac17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* { dg-do compile } */
/* ethread threading does not yet catch this but it might at some point. */
/* { dg-options "-O -fdump-tree-fre1-details -fno-thread-jumps" } */
int foo (int b, int x)
{
int i, j;
if (b)
i = x;
if (b)
j = x;
return j == i;
}
/* Even with different undefs we should CSE a PHI node with the
same controlling condition. */
/* { dg-final { scan-tree-dump "Replaced redundant PHI node" "fre1" } } */
/* { dg-final { scan-tree-dump "return 1;" "fre1" } } */
|