summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/or.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-12 19:10:50 +0000
committerChris Lattner <sabre@nondot.org>2003-08-12 19:10:50 +0000
commitc6da691cfea63d844ad31ee77d1bce4275686d9f (patch)
treeaf4261a3ee661313ce750c8b6fa07f510104aecd /test/Transforms/InstCombine/or.ll
parentd741bcfa1612e418216450b1893bb0763341f24d (diff)
downloadllvm-c6da691cfea63d844ad31ee77d1bce4275686d9f.tar.gz
llvm-c6da691cfea63d844ad31ee77d1bce4275686d9f.tar.bz2
llvm-c6da691cfea63d844ad31ee77d1bce4275686d9f.tar.xz
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/or.ll')
-rw-r--r--test/Transforms/InstCombine/or.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll
index 43ed83d618..4165c52a6a 100644
--- a/test/Transforms/InstCombine/or.ll
+++ b/test/Transforms/InstCombine/or.ll
@@ -100,3 +100,16 @@ bool %test15(uint %A, uint %B) {
ret bool %D
}
+int %test16(int %A) {
+ %B = and int %A, 1
+ %C = and int %A, -2 ; -2 = ~1
+ %D = or int %B, %C ; %D = and int %B, -1 == %B
+ ret int %D
+}
+
+int %test17(int %A) {
+ %B = and int %A, 1
+ %C = and int %A, 4
+ %D = or int %B, %C ; %D = and int %B, 5
+ ret int %D
+}