projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
teach memdep to do trivial PHI translation of GEPs. More to
[oota-llvm.git]
/
test
/
Transforms
/
Reassociate
/
mul-neg-add.ll
1
; RUN: opt < %s -reassociate -instcombine -S |\
2
; RUN: not grep {sub i32 0}
3
4
define i32 @test(i32 %X, i32 %Y, i32 %Z) {
5
%A = sub i32 0, %X ; <i32> [#uses=1]
6
%B = mul i32 %A, %Y ; <i32> [#uses=1]
7
; (-X)*Y + Z -> Z-X*Y
8
%C = add i32 %B, %Z ; <i32> [#uses=1]
9
ret i32 %C
10
}