new testcase
[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 ; XFAIL: *
5 ; RUN: llvm-as < %s | opt -cee -instcombine -simplifycfg | llvm-dis | not grep br
6
7 implementation   ; Functions:
8
9 declare void %foo()
10 declare void %bar()
11
12 int %nullptr(int* %j) {
13 bb0:
14         store int 7, int* %j               ; j != null
15         %cond220 = seteq int* %j, null     ; F
16         br bool %cond220, label %bb3, label %bb4  ; direct branch
17
18 bb3:
19         call void %foo()
20         ret int 4                          ; Dead code
21 bb4:
22         call void %bar()
23         ret int 3                          ; Live code
24 }