projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git]
/
test
/
Transforms
/
Reassociate
/
2002-05-15-SubReassociate2.ll
1
; With sub reassociation, constant folding can eliminate the two 12 constants.
2
;
3
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -dce | llvm-dis | not grep 12
4
5
int "test"(int %A, int %B, int %C, int %D) {
6
%M = add int %A, 12
7
%N = add int %M, %B
8
%O = add int %N, %C
9
%P = sub int %D, %O
10
%Q = add int %P, 12
11
ret int %Q
12
}