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
/
csetest.c
1
/*$ -fno-inline $*/
2
#include <stdio.h>
3
4
int cse1(int a) {
5
int x = a * 3;
6
int y = 3 * a;
7
return x + y;
8
}
9
10
int cse2(int a, int b) {
11
int x = a * b;
12
int y = b * a;
13
return x - y;
14
}
15
16
int main() {
17
printf("cse1(3) = %d (should be 18)\n", cse1(3));
18
printf("cse2(3,4) = %d (should be 0)\n", cse2(3,4));
19
return 0;
20
}