projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merging r259798, r259835:
[oota-llvm.git]
/
test
/
Transforms
/
Reassociate
/
negation1.ll
1
; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
2
3
; Test that we can turn things like A*B + X - A*B -> X.
4
5
define i32 @test1(i32 %a, i32 %b, i32 %x) {
6
; CHECK-LABEL: test1
7
; CHECK: ret i32 %x
8
9
%c = mul i32 %a, %b
10
%d = add i32 %c, %x
11
%c1 = mul i32 %a, %b
12
%f = sub i32 %d, %c1
13
ret i32 %f
14
}
15