From 99266d81a2a1fddd8c8587367b9ba83cf7e02efe Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 10 May 2006 18:56:04 +0000 Subject: [PATCH] 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 --- test/Transforms/InstCombine/deadcode.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/Transforms/InstCombine/deadcode.ll diff --git a/test/Transforms/InstCombine/deadcode.ll b/test/Transforms/InstCombine/deadcode.ll new file mode 100644 index 00000000000..e738576f5ff --- /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 +}