repo.or.cz
/
llvm
/
avr.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
[llvm/avr.git]
/
test
/
Transforms
/
Reassociate
/
mul-neg-add.ll
blob
dd6ddd9b62ec383785e09ae4e56bdc66d4380ec8
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
}