summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-09 23:43:48 +0000
committerChris Lattner <sabre@nondot.org>2004-04-09 23:43:48 +0000
commita5c5830d5330beeb8fe424c4cbe5f3758beb6938 (patch)
treefef3581a9e9ddac9465fae910faed621832f418e /test/Transforms
parent570751c2a7d8851bc61e408746a903b0253d2d21 (diff)
downloadllvm-a5c5830d5330beeb8fe424c4cbe5f3758beb6938.tar.gz
llvm-a5c5830d5330beeb8fe424c4cbe5f3758beb6938.tar.bz2
llvm-a5c5830d5330beeb8fe424c4cbe5f3758beb6938.tar.xz
Add testcases for harder combining cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/select.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll
index b09cae4d7a..e89c25250f 100644
--- a/test/Transforms/InstCombine/select.ll
+++ b/test/Transforms/InstCombine/select.ll
@@ -61,3 +61,21 @@ int %test11(int %a) {
ret int %R
}
+int %test12(bool %cond, int %a) {
+ %b = or int %a, 1
+ %c = select bool %cond, int %b, int %a
+ ret int %c
+}
+
+int %test12a(bool %cond, int %a) {
+ %b = shr int %a, ubyte 1
+ %c = select bool %cond, int %b, int %a
+ ret int %c
+}
+
+int %test12b(bool %cond, int %a) {
+ %b = shr int %a, ubyte 1
+ %c = select bool %cond, int %a, int %b
+ ret int %c
+}
+