diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-01 17:29:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-01 17:29:35 +0000 |
commit | 09e89faf8c4b4489bbbfe76ade6b39a998cb7680 (patch) | |
tree | 6d53778d182c65bc84ca988bc77cd428bd179ad0 /test | |
parent | 1b3b4c5ab03ca06d6c8cf59ed515a419e59ce5bf (diff) | |
download | external_llvm-09e89faf8c4b4489bbbfe76ade6b39a998cb7680.zip external_llvm-09e89faf8c4b4489bbbfe76ade6b39a998cb7680.tar.gz external_llvm-09e89faf8c4b4489bbbfe76ade6b39a998cb7680.tar.bz2 |
Add a testcase cee should eventually pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/CorrelatedExprs/nullpointer.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Transforms/CorrelatedExprs/nullpointer.ll b/test/Transforms/CorrelatedExprs/nullpointer.ll new file mode 100644 index 0000000..cf2245d --- /dev/null +++ b/test/Transforms/CorrelatedExprs/nullpointer.ll @@ -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 +} |