Fix PR1146: parameter attributes are longer part of
[oota-llvm.git] / test / Transforms / SimplifyCFG / PhiBlockMerge.ll
1 ; Test merging of blocks that only have PHI nodes in them
2 ;
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N:
4 ;
5
6 int %test(bool %a, bool %b) {
7         br bool %a, label %M, label %O
8
9 O:
10         br bool %b, label %N, label %Q
11 Q:
12         br label %N
13 N:
14         %Wp = phi int [0, %O], [1, %Q]
15         ; This block should be foldable into M
16         br label %M
17
18 M:
19         %W = phi int [%Wp, %N], [2, %0]
20         %R = add int %W, 1
21         ret int %R
22 }
23