projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
371da99
)
test case we alredy get right.
author
Chris Lattner
<sabre@nondot.org>
Fri, 1 Jan 2010 00:50:00 +0000
(
00:50
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 1 Jan 2010 00:50:00 +0000
(
00:50
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92380
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/Reassociate/basictest.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/Reassociate/basictest.ll
b/test/Transforms/Reassociate/basictest.ll
index 0f137dc8add9db029fcecb63149cc611b5046550..ba0c9f210fcfeb14fb25a277c947e7cb28b68097 100644
(file)
--- a/
test/Transforms/Reassociate/basictest.ll
+++ b/
test/Transforms/Reassociate/basictest.ll
@@
-179,3
+179,15
@@
define i32 @test12(i32 %X) {
; CHECK-NEXT: ret i32
}
+define i32 @test13(i32 %X1, i32 %X2, i32 %X3) {
+ %A = sub i32 0, %X1
+ %B = mul i32 %A, %X2 ; -X1*X2
+ %C = mul i32 %X1, %X3 ; X1*X3
+ %D = add i32 %B, %C ; -X1*X2 + X1*X3 -> X1*(X3-X2)
+ ret i32 %D
+; CHECK: @test13
+; CHECK-NEXT: sub i32 %X3, %X2
+; CHECK-NEXT: mul i32 {{.*}}, %X1
+; CHECK-NEXT: ret i32
+}
+