blob: f3d58e9102d08889c937cfe77cd09c924ebfc0de [file] [log] [blame]
Tanya Lattner97b38e12008-03-19 05:39:35 +00001; RUN: llvm-as < %s | opt -predsimplify -disable-output
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner97b38e12008-03-19 05:39:35 +00003define void @gs_image_next() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004entry:
Tanya Lattner97b38e12008-03-19 05:39:35 +00005 %tmp = load i32* null ; <i32> [#uses=2]
6 br i1 false, label %cond_next21, label %UnifiedReturnBlock
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007cond_next21: ; preds = %entry
Tanya Lattner97b38e12008-03-19 05:39:35 +00008 br i1 false, label %cond_next42, label %UnifiedReturnBlock
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009cond_next42: ; preds = %cond_next21
10 br label %cond_true158
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011cond_next134: ; preds = %cond_true158
Tanya Lattner97b38e12008-03-19 05:39:35 +000012 %tmp1571 = icmp eq i32 0, %min ; <i1> [#uses=0]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014cond_true158: ; preds = %cond_true158, %cond_next42
Tanya Lattner97b38e12008-03-19 05:39:35 +000015 %tmp47 = sub i32 %tmp, 0 ; <i32> [#uses=2]
16 %tmp49 = icmp ule i32 %tmp47, 0 ; <i1> [#uses=1]
17 %min = select i1 %tmp49, i32 %tmp47, i32 0 ; <i32> [#uses=2]
18 %tmp92 = add i32 %min, 0 ; <i32> [#uses=1]
19 %tmp101 = icmp eq i32 %tmp92, %tmp ; <i1> [#uses=1]
20 br i1 %tmp101, label %cond_next134, label %cond_true158
Dan Gohmanf17a25c2007-07-18 16:29:46 +000021UnifiedReturnBlock: ; preds = %cond_next21, %entry
22 ret void
23}
Tanya Lattner97b38e12008-03-19 05:39:35 +000024