mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add a testcase cee should eventually pass
llvm-svn: 4484
This commit is contained in:
parent
fb09c1e402
commit
202087ea2a
21
test/Regression/Transforms/CorrelatedExprs/nullpointer.ll
Normal file
21
test/Regression/Transforms/CorrelatedExprs/nullpointer.ll
Normal file
@ -0,0 +1,21 @@
|
||||
; 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: if as < %s | opt -cee -instcombine -simplifycfg | dis | grep br
|
||||
; RUN: then exit 1
|
||||
; RUN: else exit 0
|
||||
; RUN: fi
|
||||
|
||||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user