blob: 414235ba7cde26d64cff6168a414627a7e10eafa [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Basic block #2 should not be merged into BB #3!
2;
Dan Gohman3c7d3082009-09-11 18:01:28 +00003; RUN: opt < %s -simplifycfg -S | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004; RUN: grep {br label}
5;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattner003eae52008-03-10 07:21:50 +00007declare void @foo()
8
9define void @cprop_test12(i32* %data) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010bb0:
Tanya Lattner003eae52008-03-10 07:21:50 +000011 %reg108 = load i32* %data ; <i32> [#uses=2]
12 %cond218 = icmp ne i32 %reg108, 5 ; <i1> [#uses=1]
13 br i1 %cond218, label %bb3, label %bb2
14bb2: ; preds = %bb0
15 call void @foo( )
16 br label %bb3
17bb3: ; preds = %bb2, %bb0
18 %reg117 = phi i32 [ 110, %bb2 ], [ %reg108, %bb0 ] ; <i32> [#uses=1]
19 store i32 %reg117, i32* %data
20 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000021}
22