projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New testcase
[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: if as < %s | opt -reassociate -constprop -dce | dis | grep 12
4
; RUN: then exit 1
5
; RUN: else exit 0
6
; RUN: fi
7
8
int "test"(int %A, int %B, int %C, int %D) {
9
%M = add int %A, 12
10
%N = add int %M, %B
11
%O = add int %N, %C
12
%P = sub int %D, %O
13
%Q = add int %P, 12
14
ret int %Q
15
}