summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/deadcode.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-10 18:56:04 +0000
committerChris Lattner <sabre@nondot.org>2006-05-10 18:56:04 +0000
commit99266d81a2a1fddd8c8587367b9ba83cf7e02efe (patch)
tree0bc462cc2e0cd564a84de116070c6a52b96a39db /test/Transforms/InstCombine/deadcode.ll
parent3e6a35076ed072525d3eda1945033863b613aef8 (diff)
downloadllvm-99266d81a2a1fddd8c8587367b9ba83cf7e02efe.tar.gz
llvm-99266d81a2a1fddd8c8587367b9ba83cf7e02efe.tar.bz2
llvm-99266d81a2a1fddd8c8587367b9ba83cf7e02efe.tar.xz
New testcase, check that dead code doesn't pessimize instcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/deadcode.ll')
-rw-r--r--test/Transforms/InstCombine/deadcode.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/deadcode.ll b/test/Transforms/InstCombine/deadcode.ll
new file mode 100644
index 0000000000..e738576f5f
--- /dev/null
+++ b/test/Transforms/InstCombine/deadcode.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'ret int %A'
+
+int %test(int %A) {
+ %X = or bool false, false
+ br bool %X, label %T, label %C
+T:
+ %B = add int %A, 1
+ br label %C
+C:
+ %C = phi int [%B, %T], [%A, %0]
+ ret int %C
+}