test instruction combiner opts for select instruction
authorChris Lattner <sabre@nondot.org>
Fri, 12 Mar 2004 06:01:00 +0000 (06:01 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 12 Mar 2004 06:01:00 +0000 (06:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12328 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/select.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll
new file mode 100644 (file)
index 0000000..d635ffd
--- /dev/null
@@ -0,0 +1,18 @@
+; This test makes sure that these instructions are properly eliminated.
+;
+
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select
+
+implementation
+
+int %test1(int %A, int %B) {
+       %C = select bool false, int %A, int %B
+       ret int %C
+}
+
+int %test2(int %A, int %B) {
+       %C = select bool true, int %A, int %B
+       ret int %C
+}
+
+