summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/deadcode.ll
diff options
context:
space:
mode:
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
+}