projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New testcases for sub/neg reassociation
[oota-llvm.git]
/
test
/
Transforms
/
Reassociate
/
subtest.ll
1
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
2
;
3
; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 12
4
; RUN: then exit 1
5
; RUN: else exit 0
6
; RUN: fi
7
8
int "test"(int %A, int %B) {
9
%X = add int -12, %A
10
%Y = sub int %X, %B
11
%Z = add int %Y, 12
12
ret int %Z
13
}