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
/
subtest.ll
1
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
2
;
3
; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
4
5
int "test"(int %A, int %B) {
6
%X = add int -12, %A
7
%Y = sub int %X, %B
8
%Z = add int %Y, 12
9
ret int %Z
10
}