New testcase for PR932
authorChris Lattner <sabre@nondot.org>
Tue, 3 Oct 2006 07:00:13 +0000 (07:00 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 3 Oct 2006 07:00:13 +0000 (07:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30695 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll [new file with mode: 0644]

diff --git a/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll b/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
new file mode 100644 (file)
index 0000000..cce885b
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -domtree -break-crit-edges -analyze -domtree | grep '3.*%brtrue$'
+; PR932
+implementation   ; Functions:
+
+declare void %use1(int)
+
+void %f(int %i, bool %c) {
+entry:
+       %A = seteq int %i, 0            ; <bool> [#uses=1]
+       br bool %A, label %brtrue, label %brfalse
+
+brtrue:                ; preds = %brtrue, %entry
+       %B = phi bool [ true, %brtrue ], [ false, %entry ]              ; <bool> [#uses=1]
+       call void %use1( int %i )
+       br bool %B, label %brtrue, label %brfalse
+
+brfalse:               ; preds = %brtrue, %entry
+       call void %use1( int %i )
+       ret void
+}