blob: 47f912de5e8bd12332bc2afcfb9fdd67d66d725d [file] [log] [blame]
Tanya Lattner97b38e12008-03-19 05:39:35 +00001; RUN: llvm-as < %s | opt -predsimplify -disable-output
2; END.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003target datalayout = "e-p:32:32"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004target triple = "i686-pc-linux-gnu"
5deplibs = [ "c", "crtend" ]
Tanya Lattner97b38e12008-03-19 05:39:35 +00006 %struct.VDIR_ST = type { i32, i32, i32, %struct.acl*, %struct.pfile*, %struct.vlink*, %struct.vlink*, %struct.vlink*, %struct.VDIR_ST*, %struct.VDIR_ST* }
7 %struct.acl = type { i32, i8*, i8*, i8*, %struct.restrict*, %struct.acl*, %struct.acl* }
8 %struct.avalue = type { i8* }
9 %struct.pattrib = type { i8, i8*, i8*, %struct.avalue, %struct.pattrib*, %struct.pattrib* }
10 %struct.pfile = type { i32, i32, i32, i32, i32, %struct.vlink*, %struct.vlink*, %struct.pattrib*, %struct.pfile*, %struct.pfile* }
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011 %struct.restrict = type { %struct.acl*, %struct.acl* }
Tanya Lattner97b38e12008-03-19 05:39:35 +000012 %struct.vlink = type { i32, i8*, i8, i32, i8*, %struct.vlink*, %struct.vlink*, i8*, i8*, i8*, i8*, i32, i32, %struct.acl*, i32, i32, i8*, %struct.pattrib*, %struct.pfile*, %struct.vlink*, %struct.vlink* }
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013
Tanya Lattner97b38e12008-03-19 05:39:35 +000014define void @vl_insert(%struct.vlink* %vl) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015entry:
Tanya Lattner97b38e12008-03-19 05:39:35 +000016 %tmp91 = call i32 @vl_comp( ) ; <i32> [#uses=2]
17 %tmp93 = icmp sgt i32 %tmp91, 0 ; <i1> [#uses=1]
18 br i1 %tmp93, label %cond_next84, label %bb94
Dan Gohmanf17a25c2007-07-18 16:29:46 +000019cond_next84: ; preds = %entry
20 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000021bb94: ; preds = %entry
Tanya Lattner97b38e12008-03-19 05:39:35 +000022 %tmp96 = icmp eq i32 %tmp91, 0 ; <i1> [#uses=1]
23 br i1 %tmp96, label %cond_true97, label %cond_next203
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024cond_true97: ; preds = %bb94
Tanya Lattner97b38e12008-03-19 05:39:35 +000025 br i1 false, label %cond_next105, label %cond_true102
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026cond_true102: ; preds = %cond_true97
27 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000028cond_next105: ; preds = %cond_true97
Tanya Lattner97b38e12008-03-19 05:39:35 +000029 %tmp110 = getelementptr %struct.vlink* %vl, i32 0, i32 12 ; <i32*> [#uses=1]
30 %tmp111 = load i32* %tmp110 ; <i32> [#uses=1]
31 %tmp129 = icmp eq i32 %tmp111, 0 ; <i1> [#uses=1]
32 br i1 %tmp129, label %cond_true130, label %cond_next133
Dan Gohmanf17a25c2007-07-18 16:29:46 +000033cond_true130: ; preds = %cond_next105
34 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000035cond_next133: ; preds = %cond_next105
36 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000037cond_next203: ; preds = %bb94
38 ret void
39}
40
Tanya Lattner97b38e12008-03-19 05:39:35 +000041declare i32 @vl_comp()