summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/xor.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-01 08:02:51 +0000
committerChris Lattner <sabre@nondot.org>2006-04-01 08:02:51 +0000
commit1d4b07cfee1ccc697c3a6223de69dd49e91680b6 (patch)
tree3f28d295258d346686209e8361441e1b1258b8b3 /test/Transforms/InstCombine/xor.ll
parent60a05cc118763c680834a61280f48530482a1f86 (diff)
downloadllvm-1d4b07cfee1ccc697c3a6223de69dd49e91680b6.tar.gz
llvm-1d4b07cfee1ccc697c3a6223de69dd49e91680b6.tar.bz2
llvm-1d4b07cfee1ccc697c3a6223de69dd49e91680b6.tar.xz
new testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/xor.ll')
-rw-r--r--test/Transforms/InstCombine/xor.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/xor.ll b/test/Transforms/InstCombine/xor.ll
index 9baff65c8b..e9f4d3fd70 100644
--- a/test/Transforms/InstCombine/xor.ll
+++ b/test/Transforms/InstCombine/xor.ll
@@ -166,3 +166,18 @@ bool %test24(int %c, int %d) {
%tmp.4 = setne int %tmp.2, %c
ret bool %tmp.4
}
+
+int %test25(int %g, int %h) {
+ %h2 = xor int %h, -1
+ %tmp2 = and int %h2, %g
+ %tmp4 = xor int %tmp2, %g ; (h2&g)^g -> ~h2 & g -> h & g
+ ret int %tmp4
+}
+
+int %test26(int %a, int %b) {
+ %b2 = xor int %b, -1
+ %tmp2 = xor int %a, %b2
+ %tmp4 = and int %tmp2, %a ; (a^b2)&a -> ~b2 & a -> b & a
+ ret int %tmp4
+}
+