aboutsummaryrefslogtreecommitdiffstats
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.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/deadcode.ll b/test/Transforms/InstCombine/deadcode.ll
new file mode 100644
index 0000000..370390a
--- /dev/null
+++ b/test/Transforms/InstCombine/deadcode.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: grep {ret i32 %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
+}