New testcase, check that dead code doesn't pessimize instcombine
authorChris Lattner <sabre@nondot.org>
Wed, 10 May 2006 18:56:04 +0000 (18:56 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 10 May 2006 18:56:04 +0000 (18:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28214 91177308-0d34-0410-b5e6-96231b3b80d8

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

diff --git a/test/Transforms/InstCombine/deadcode.ll b/test/Transforms/InstCombine/deadcode.ll
new file mode 100644 (file)
index 0000000..e738576
--- /dev/null
@@ -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
+}