blob: 083e45e016c49b4377359ca5806368e43b1b3a0b [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;
Misha Brukmane78760e2003-09-16 15:29:54 +00005; RUN: llvm-as < %s | opt -simplifycfg | llvm-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