projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
call optimize_cf() to delete dead-code that might arise after cond_eval
[libfirm]
/
ir
/
be
/
test
/
phi_bad.c
1
static int A;
2
3
/* This function produces unnecessary Phi nodes due to the way
4
* x is assigned. Note: This is not a bug, its by the Phi construction algorithm. */
5
void test(int l, int m) {
6
int i, x = m;
7
8
for (i = 0; i < l; ++i) {
9
A = x;
10
11
if (l > 5)
12
x = m;
13
}
14
}
15
16
int main()
17
{
18
test(4,5);
19
printf("A = %d\n", A);
20
return 0;
21
}