aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG/basictest.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SimplifyCFG/basictest.ll')
-rw-r--r--test/Transforms/SimplifyCFG/basictest.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/basictest.ll b/test/Transforms/SimplifyCFG/basictest.ll
new file mode 100644
index 000000000000..1fd629a4fd41
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/basictest.ll
@@ -0,0 +1,25 @@
+; Test CFG simplify removal of branch instructions...
+;
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
+
+define void @test1() {
+ br label %BB1
+BB1: ; preds = %0
+ ret void
+}
+
+define void @test2() {
+ ret void
+BB1: ; No predecessors!
+ ret void
+}
+
+define void @test3(i1 %T) {
+ br i1 %T, label %BB1, label %BB1
+BB1: ; preds = %0, %0
+ ret void
+}
+
+
+
+