summaryrefslogtreecommitdiff
path: root/test/Transforms/SSI/2009-08-17-CritEdge.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SSI/2009-08-17-CritEdge.ll')
-rw-r--r--test/Transforms/SSI/2009-08-17-CritEdge.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/SSI/2009-08-17-CritEdge.ll b/test/Transforms/SSI/2009-08-17-CritEdge.ll
new file mode 100644
index 000000000000..61bd2dc693f4
--- /dev/null
+++ b/test/Transforms/SSI/2009-08-17-CritEdge.ll
@@ -0,0 +1,15 @@
+; RUN: opt < %s -ssi-everything -disable-output
+
+define void @test(i32 %x) {
+entry:
+ br label %label1
+label1:
+ %A = phi i32 [ 0, %entry ], [ %A.1, %label2 ]
+ %B = icmp slt i32 %A, %x
+ br i1 %B, label %label2, label %label2
+label2:
+ %A.1 = add i32 %A, 1
+ br label %label1
+label3: ; No predecessors!
+ ret void
+}