diff options
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 +} |