correct suffix matching to search for s/l/t suffixes on
[oota-llvm.git] / test / Transforms / SimplifyCFG / PhiBlockMerge.ll
1 ; Test merging of blocks that only have PHI nodes in them
2 ;
3 ; RUN: opt < %s -simplifycfg -S | not grep N:
4 ;
5
6 define i32 @test(i1 %a, i1 %b) {
7 ; <label>:0
8         br i1 %a, label %M, label %O
9 O:              ; preds = %0
10         br i1 %b, label %N, label %Q
11 Q:              ; preds = %O
12         br label %N
13 N:              ; preds = %Q, %O
14         ; This block should be foldable into M
15         %Wp = phi i32 [ 0, %O ], [ 1, %Q ]              ; <i32> [#uses=1]
16         br label %M
17 M:              ; preds = %N, %0
18         %W = phi i32 [ %Wp, %N ], [ 2, %0 ]             ; <i32> [#uses=1]
19         %R = add i32 %W, 1              ; <i32> [#uses=1]
20         ret i32 %R
21 }
22