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:
07f30fb
)
Add an additional InstructionSimplify factorization test.
author
Duncan Sands
<baldrick@free.fr>
Tue, 21 Dec 2010 15:12:22 +0000
(15:12 +0000)
committer
Duncan Sands
<baldrick@free.fr>
Tue, 21 Dec 2010 15:12:22 +0000
(15:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122333
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/InstSimplify/2010-12-20-Distribute.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/InstSimplify/2010-12-20-Distribute.ll
b/test/Transforms/InstSimplify/2010-12-20-Distribute.ll
index 56f782341724a71ecde84910500972a68bd3e064..4aac8dd5884a9dfa5be4a962d673861704036296 100644
(file)
--- a/
test/Transforms/InstSimplify/2010-12-20-Distribute.ll
+++ b/
test/Transforms/InstSimplify/2010-12-20-Distribute.ll
@@
-10,6
+10,16
@@
define i32 @factorize(i32 %x, i32 %y) {
; CHECK: ret i32 %x
}
+define i32 @factorize2(i32 %x) {
+; CHECK: @factorize2
+; 3*X - 2*X -> X
+ %l = mul i32 3, %x
+ %r = mul i32 2, %x
+ %z = sub i32 %l, %r
+ ret i32 %z
+; CHECK: ret i32 %x
+}
+
define i32 @expand(i32 %x) {
; CHECK: @expand
; ((X & 1) | 2) & 1 -> ((X & 1) & 1) | (2 & 1) -> (X & 1) | 0 -> X & 1