blob: 01060ed4ca87491dfe3c3b85d754d07069d1f127 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +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;
5; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N:
6;
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