Add a testcase cee should eventually pass
[oota-llvm.git] / test / Transforms / CorrelatedExprs / nullpointer.ll
1 ; a load or store of a pointer indicates that the pointer is not null.
2 ; Any succeeding uses of the pointer should get this info
3
4 ; RUN: if as < %s | opt -cee -instcombine -simplifycfg | dis | grep br
5 ; RUN: then exit 1
6 ; RUN: else exit 0
7 ; RUN: fi
8
9 implementation   ; Functions:
10
11 int %nullptr(int* %j) {
12 bb0:
13         store int 7, int* %j               ; j != null
14         %cond220 = seteq int* %j, null     ; F
15         br bool %cond220, label %bb3, label %bb4  ; direct branch
16
17 bb3:
18         ret int 4                          ; Dead code
19 bb4:
20         ret int 3                          ; Live code
21 }