blob: 94cd5934eb4bf149db688977de3065d02c5c4614 [file] [log] [blame]
Chris Lattnera1040192003-03-05 21:34:35 +00001; Test merging of blocks that only have PHI nodes in them. This tests the case
2; where the mergedinto block doesn't have any PHI nodes, and is in fact
3; dominated by the block-to-be-eliminated
4;
Chris Lattnerd808e452003-06-28 23:13:12 +00005; RUN: as < %s | opt -simplifycfg | dis | not grep 'N:'
Chris Lattnera1040192003-03-05 21:34:35 +00006;
7
8int %test(bool %a, bool %b) {
9 br bool %b, label %N, label %Q
10Q:
11 br label %N
12N:
13 %W = phi int [0, %0], [1, %Q]
14 ; This block should be foldable into M
15 br label %M
16
17M:
18 %R = add int %W, 1
19 ret int %R
20}
21