1 ; Test merging of blocks with phi nodes. 2 ; 3 ; RUN: opt < %s -simplifycfg -S | not grep N: 4 ; 5 6 define i32 @test(i1 %a) { 7 Q: 8 br i1 %a, label %N, label %M 9 N: ; preds = %Q 10 br label %M 11 M: ; preds = %N, %Q 12 ; It's ok to merge N and M because the incoming values for W are the 13 ; same for both cases... 14 %W = phi i32 [ 2, %N ], [ 2, %Q ] ; <i32> [#uses=1] 15 %R = add i32 %W, 1 ; <i32> [#uses=1] 16 ret i32 %R 17 } 18 19