blob: 3568571bf8c4883e7f87bbdbc1919974241f6e16 [file] [log] [blame]
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00001; RUN: opt %s -simplifycfg -S | not grep br
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattnerb46665e2008-03-18 03:45:45 +00003declare void @bar(i32)
4
5define void @test(i1 %P, i32* %Q) {
6 br i1 %P, label %T, label %F
7T: ; preds = %0
8 store i32 1, i32* %Q
9 %A = load i32* %Q ; <i32> [#uses=1]
10 call void @bar( i32 %A )
11 ret void
12F: ; preds = %0
13 store i32 1, i32* %Q
14 %B = load i32* %Q ; <i32> [#uses=1]
15 call void @bar( i32 %B )
16 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017}
18