From d52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 20 May 2014 01:23:40 +0000 Subject: Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden! llvm-svn: 209185 --- llvm/test/Bitcode/attributes.ll | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/test/Bitcode') diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll index 545f1cbb28c..02e1bb1c4e2 100644 --- a/llvm/test/Bitcode/attributes.ll +++ b/llvm/test/Bitcode/attributes.ll @@ -218,6 +218,11 @@ define void @f36(i8* inalloca) { ret void } +define nonnull i8* @f37(i8* nonnull %a) { +; CHECK: define nonnull i8* @f37(i8* nonnull %a) { + ret i8* %a +} + ; CHECK: attributes #0 = { noreturn } ; CHECK: attributes #1 = { nounwind } ; CHECK: attributes #2 = { readnone } -- cgit v1.2.3