Make the testcase more interesting so that DCE does not eliminate it.
[oota-llvm.git] / test / Transforms / InstCombine / phi.ll
1 ; This test makes sure that these instructions are properly eliminated.
2 ;
3
4 ; RUN: if as < %s | opt -instcombine -die | dis | grep phi
5 ; RUN: then exit 1
6 ; RUN: else exit 0
7 ; RUN: fi
8
9 implementation
10
11 int "test1"(int %A, bool %b) {
12 BB0:    br bool %b, label %BB1, label %BB2
13 BB1:
14         %B = phi int [%A, %BB0]     ; Combine away one argument PHI nodes
15         ret int %B
16 BB2:
17         ret int %A
18 }
19