diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2017-09-09 18:23:11 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2017-09-09 18:23:11 +0000 |
commit | 404f106d71178d3a9f27167e6a060ad577b5fadb (patch) | |
tree | c77b721b647825ed1de4f0df7f6a51434482fcb4 /llvm/test/Transforms/FunctionAttrs | |
parent | 97a56866a2510f8ae3ecfde7b9d9faf444299897 (diff) | |
download | bcm5719-llvm-404f106d71178d3a9f27167e6a060ad577b5fadb.tar.gz bcm5719-llvm-404f106d71178d3a9f27167e6a060ad577b5fadb.zip |
Merge isKnownNonNull into isKnownNonZero
It now knows the tricks of both functions.
Also, fix a bug that considered allocas of non-zero address space to be always non null
Differential Revision: https://reviews.llvm.org/D37628
llvm-svn: 312869
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
-rw-r--r-- | llvm/test/Transforms/FunctionAttrs/nonnull.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nonnull.ll b/llvm/test/Transforms/FunctionAttrs/nonnull.ll index 4a1ff14b204..191e6781900 100644 --- a/llvm/test/Transforms/FunctionAttrs/nonnull.ll +++ b/llvm/test/Transforms/FunctionAttrs/nonnull.ll @@ -216,3 +216,14 @@ exc: unreachable } +; CHECK: define nonnull i32* @gep1( +define i32* @gep1(i32* %p) { + %q = getelementptr inbounds i32, i32* %p, i32 1 + ret i32* %q +} + +; CHECK: define i32 addrspace(3)* @gep2( +define i32 addrspace(3)* @gep2(i32 addrspace(3)* %p) { + %q = getelementptr inbounds i32, i32 addrspace(3)* %p, i32 1 + ret i32 addrspace(3)* %q +} |