blob: 4f8af01bc3991f2ca069e441fb86ff3b0922a7a4 [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 +00003 %struct.cube_struct = type { i32, i32, i32, i32*, i32*, i32*, i32*, i32*, i32*, i32*, i32**, i32**, i32*, i32*, i32, i32, i32*, i32, i32 }
4@cube = external global %struct.cube_struct ; <%struct.cube_struct*> [#uses=2]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
Tanya Lattner97b38e12008-03-19 05:39:35 +00006define fastcc void @cube_setup() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007entry:
Tanya Lattner97b38e12008-03-19 05:39:35 +00008 %tmp = load i32* getelementptr (%struct.cube_struct* @cube, i32 0, i32 2) ; <i32> [#uses=2]
9 %tmp.upgrd.1 = icmp slt i32 %tmp, 0 ; <i1> [#uses=1]
10 br i1 %tmp.upgrd.1, label %bb, label %cond_next
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011cond_next: ; preds = %entry
Tanya Lattner97b38e12008-03-19 05:39:35 +000012 %tmp2 = load i32* getelementptr (%struct.cube_struct* @cube, i32 0, i32 1) ; <i32> [#uses=2]
13 %tmp5 = icmp slt i32 %tmp2, %tmp ; <i1> [#uses=1]
14 br i1 %tmp5, label %bb, label %bb6
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015bb: ; preds = %cond_next, %entry
16 unreachable
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017bb6: ; preds = %cond_next
Tanya Lattner97b38e12008-03-19 05:39:35 +000018 %tmp98124 = icmp sgt i32 %tmp2, 0 ; <i1> [#uses=1]
19 br i1 %tmp98124, label %bb42, label %bb99
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020bb42: ; preds = %bb6
21 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022bb99: ; preds = %bb6
23 ret void
24}
Tanya Lattner97b38e12008-03-19 05:39:35 +000025