summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs/nonnull.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/nonnull.ll')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nonnull.ll13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nonnull.ll b/llvm/test/Transforms/FunctionAttrs/nonnull.ll
index 1ea14d034c8..cab72acb1a1 100644
--- a/llvm/test/Transforms/FunctionAttrs/nonnull.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nonnull.ll
@@ -40,14 +40,14 @@ define i8* @test3() {
; just never return period.)
define i8* @test4_helper() {
; FNATTR: define noalias nonnull i8* @test4_helper
-; ATTRIBUTOR: define noalias nonnull i8* @test4_helper
+; ATTRIBUTOR: define noalias nonnull dereferenceable(4294967295) i8* @test4_helper
%ret = call i8* @test4()
ret i8* %ret
}
define i8* @test4() {
; FNATTR: define noalias nonnull i8* @test4
-; ATTRIBUTOR: define noalias nonnull i8* @test4
+; ATTRIBUTOR: define noalias nonnull dereferenceable(4294967295) i8* @test4
%ret = call i8* @test4_helper()
ret i8* %ret
}
@@ -219,6 +219,15 @@ bb:
%tmp = call i32* @f1(i32* %arg)
ret i32* null
}
+
+; TEST 15
+define void @f15(i8* %arg) {
+; ATTRIBUTOR: tail call void @use1(i8* nonnull dereferenceable(4) %arg)
+
+ tail call void @use1(i8* dereferenceable(4) %arg)
+ ret void
+}
+
; Test propagation of nonnull callsite args back to caller.
declare void @use1(i8* %x)
OpenPOWER on IntegriCloud