aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/bit-checks.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
commitd39c594d39df7f283c2fb8a704a3f31c501180d9 (patch)
tree36453626c792cccd91f783a38a169d610a6b9db9 /test/Transforms/InstCombine/bit-checks.ll
parent6144c1de6a7674dad94290650e4e14f24d42e421 (diff)
Diffstat (limited to 'test/Transforms/InstCombine/bit-checks.ll')
-rw-r--r--test/Transforms/InstCombine/bit-checks.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/bit-checks.ll b/test/Transforms/InstCombine/bit-checks.ll
index f97fb45af161..d774c0972def 100644
--- a/test/Transforms/InstCombine/bit-checks.ll
+++ b/test/Transforms/InstCombine/bit-checks.ll
@@ -13,3 +13,14 @@ entry:
%retval.0 = select i1 %or.cond, i32 2, i32 1 ; <i32> [#uses=1]
ret i32 %retval.0
}
+
+define i32 @main2(i32 %argc, i8** nocapture %argv) nounwind readnone ssp {
+entry:
+ %and = and i32 %argc, 1 ; <i32> [#uses=1]
+ %tobool = icmp eq i32 %and, 0 ; <i1> [#uses=1]
+ %and2 = and i32 %argc, 2 ; <i32> [#uses=1]
+ %tobool3 = icmp eq i32 %and2, 0 ; <i1> [#uses=1]
+ %or.cond = or i1 %tobool, %tobool3 ; <i1> [#uses=1]
+ %storemerge = select i1 %or.cond, i32 0, i32 1 ; <i32> [#uses=1]
+ ret i32 %storemerge
+} \ No newline at end of file