aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/and.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-09-28 21:39:35 +0000
committerChris Lattner <sabre@nondot.org>2004-09-28 21:39:35 +0000
commit3b03395b38ea901803806c7b227980308ca21041 (patch)
treea16433bed5b0b78f3fc7f21cf9227d2a1614d6c4 /test/Transforms/InstCombine/and.ll
parent8d5c50329b00324c838e1fa28b5b7f0bc834176d (diff)
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/and.ll')
-rw-r--r--test/Transforms/InstCombine/and.ll36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll
index 3743cbc8ff..1b2dafb218 100644
--- a/test/Transforms/InstCombine/and.ll
+++ b/test/Transforms/InstCombine/and.ll
@@ -142,3 +142,39 @@ sbyte %test21(sbyte %A) {
%D = and sbyte %C, 1 ;; chop off sign
ret sbyte %D
}
+
+bool %test22(int %A) {
+ %B = seteq int %A, 1
+ %C = setge int %A, 3
+ %D = and bool %B, %C ;; False
+ ret bool %D
+}
+
+bool %test23(int %A) {
+ %B = setgt int %A, 1
+ %C = setle int %A, 2
+ %D = and bool %B, %C ;; A == 2
+ ret bool %D
+}
+
+bool %test24(int %A) {
+ %B = setgt int %A, 1
+ %C = setne int %A, 2
+ %D = and bool %B, %C ;; A > 2
+ ret bool %D
+}
+
+bool %test25(int %A) {
+ %B = setge int %A, 50
+ %C = setlt int %A, 100
+ %D = and bool %B, %C ;; (A-50) <u 50
+ ret bool %D
+}
+
+bool %test26(int %A) {
+ %B = setne int %A, 50
+ %C = setne int %A, 51
+ %D = and bool %B, %C ;; (A-50) > 1
+ ret bool %D
+}
+