summaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-09 23:34:18 +0000
committerChris Lattner <sabre@nondot.org>2002-08-09 23:34:18 +0000
commit22fae29835adbc57044ae027686cdbbac337cac3 (patch)
treeafdc8703e972d9a132a0178ef529ef5d1e5c6122 /test/Transforms
parentf8e2cf92216baedebb5a4e3075f4a83e6947b6c8 (diff)
downloadexternal_llvm-22fae29835adbc57044ae027686cdbbac337cac3.zip
external_llvm-22fae29835adbc57044ae027686cdbbac337cac3.tar.gz
external_llvm-22fae29835adbc57044ae027686cdbbac337cac3.tar.bz2
setcc of booleans should always be eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/set.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/set.ll b/test/Transforms/InstCombine/set.ll
index e7057bd..38a490d 100644
--- a/test/Transforms/InstCombine/set.ll
+++ b/test/Transforms/InstCombine/set.ll
@@ -51,3 +51,30 @@ bool "test8"(uint %A) {
%B = setlt uint %A, 0 ; false
ret bool %B
}
+
+;; test operations on boolean values these should all be eliminated$a
+bool %test9(bool %A) {
+ %B = setlt bool %A, false ; false
+ ret bool %B
+}
+bool %test10(bool %A) {
+ %B = setgt bool %A, true ; false
+ ret bool %B
+}
+bool %test11(bool %A) {
+ %B = setle bool %A, true ; true
+ ret bool %B
+}
+bool %test12(bool %A) {
+ %B = setge bool %A, false ; true
+ ret bool %B
+}
+bool %test13(bool %A, bool %B) {
+ %C = setge bool %A, %B ; A | ~B
+ ret bool %C
+}
+bool %test14(bool %A, bool %B) {
+ %C = seteq bool %A, %B ; ~(A ^ B)
+ ret bool %C
+}
+