2012-04-24 10:45:44 +00:00
|
|
|
; RUN: opt < %s -domtree -break-crit-edges -analyze -domtree | FileCheck %s
|
2006-10-03 07:00:13 +00:00
|
|
|
; PR932
|
|
|
|
|
2012-04-24 10:45:44 +00:00
|
|
|
; CHECK: [3] %brtrue {1,2}
|
|
|
|
|
2008-02-14 06:56:27 +00:00
|
|
|
declare void @use1(i32)
|
2006-10-03 07:00:13 +00:00
|
|
|
|
2008-02-14 06:56:27 +00:00
|
|
|
define void @f(i32 %i, i1 %c) {
|
2006-10-03 07:00:13 +00:00
|
|
|
entry:
|
2008-02-14 06:56:27 +00:00
|
|
|
%A = icmp eq i32 %i, 0 ; <i1> [#uses=1]
|
|
|
|
br i1 %A, label %brtrue, label %brfalse
|
2006-10-03 07:00:13 +00:00
|
|
|
|
|
|
|
brtrue: ; preds = %brtrue, %entry
|
2008-02-14 06:56:27 +00:00
|
|
|
%B = phi i1 [ true, %brtrue ], [ false, %entry ] ; <i1> [#uses=1]
|
|
|
|
call void @use1( i32 %i )
|
|
|
|
br i1 %B, label %brtrue, label %brfalse
|
2006-10-03 07:00:13 +00:00
|
|
|
|
|
|
|
brfalse: ; preds = %brtrue, %entry
|
2008-02-14 06:56:27 +00:00
|
|
|
call void @use1( i32 %i )
|
2006-10-03 07:00:13 +00:00
|
|
|
ret void
|
|
|
|
}
|