blob: ff4a3bd658f80ded6c88c7c6208e0dfade7df7b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
; a load or store of a pointer indicates that the pointer is not null.
; Any succeeding uses of the pointer should get this info
; RUN: as < %s | opt -cee -instcombine -simplifycfg | dis | not grep br
implementation ; Functions:
int %nullptr(int* %j) {
bb0:
store int 7, int* %j ; j != null
%cond220 = seteq int* %j, null ; F
br bool %cond220, label %bb3, label %bb4 ; direct branch
bb3:
ret int 4 ; Dead code
bb4:
ret int 3 ; Live code
}
|