aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/JumpThreading/undef.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/JumpThreading/undef.ll')
-rw-r--r--test/Transforms/JumpThreading/undef.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/undef.ll b/test/Transforms/JumpThreading/undef.ll
new file mode 100644
index 000000000000..497a87a65641
--- /dev/null
+++ b/test/Transforms/JumpThreading/undef.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -jump-threading | llvm-dis | not grep {br }
+; RUN: llvm-as < %s | opt -jump-threading | llvm-dis | grep {ret i32} | count 1
+
+define i32 @test(i1 %cond) {
+ br i1 undef, label %T1, label %F1
+
+T1:
+ ret i32 42
+
+F1:
+ ret i32 17
+}