aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/BrUnwind.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SimplifyCFG/BrUnwind.ll')
-rw-r--r--test/Transforms/SimplifyCFG/BrUnwind.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/BrUnwind.ll b/test/Transforms/SimplifyCFG/BrUnwind.ll
new file mode 100644
index 0000000..b19a27d
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/BrUnwind.ll
@@ -0,0 +1,15 @@
+; RUN: opt < %s -simplifycfg -S | \
+; RUN: not grep {br label}
+
+define void @test(i1 %C) {
+ br i1 %C, label %A, label %B
+A: ; preds = %0
+ call void @test( i1 %C )
+ br label %X
+B: ; preds = %0
+ call void @test( i1 %C )
+ br label %X
+X: ; preds = %B, %A
+ unwind
+}
+