summaryrefslogtreecommitdiff
path: root/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
blob: 45efc4238114f1b0d550ef6163182c5ff90aade2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: opt < %s -domtree -break-crit-edges -analyze -domtree | FileCheck %s
; PR932

; CHECK: [3] %brtrue {1,2}

declare void @use1(i32)

define void @f(i32 %i, i1 %c) {
entry:
	%A = icmp eq i32 %i, 0		; <i1> [#uses=1]
	br i1 %A, label %brtrue, label %brfalse

brtrue:		; preds = %brtrue, %entry
	%B = phi i1 [ true, %brtrue ], [ false, %entry ]		; <i1> [#uses=1]
	call void @use1( i32 %i )
	br i1 %B, label %brtrue, label %brfalse

brfalse:		; preds = %brtrue, %entry
	call void @use1( i32 %i )
	ret void
}