2008-03-19 05:39:35 +00:00
|
|
|
; RUN: llvm-as < %s | opt -predsimplify -simplifycfg | llvm-dis | grep pass
|
2006-08-28 22:44:55 +00:00
|
|
|
|
2008-03-19 05:39:35 +00:00
|
|
|
define void @regtest(i32 %x) {
|
2006-08-28 22:44:55 +00:00
|
|
|
entry:
|
2008-03-19 05:39:35 +00:00
|
|
|
%A = icmp eq i32 %x, 0 ; <i1> [#uses=1]
|
|
|
|
br i1 %A, label %middle, label %after
|
|
|
|
middle: ; preds = %entry
|
|
|
|
br label %after
|
|
|
|
after: ; preds = %middle, %entry
|
|
|
|
%B = icmp eq i32 %x, 0 ; <i1> [#uses=1]
|
|
|
|
br i1 %B, label %then, label %else
|
|
|
|
then: ; preds = %after
|
|
|
|
br label %end
|
|
|
|
else: ; preds = %after
|
|
|
|
call void (...)* @pass( )
|
|
|
|
br label %end
|
|
|
|
end: ; preds = %else, %then
|
|
|
|
ret void
|
2006-08-28 22:44:55 +00:00
|
|
|
}
|
|
|
|
|
2008-03-19 05:39:35 +00:00
|
|
|
declare void @pass(...)
|
|
|
|
|