summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-05-20 01:23:40 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-05-20 01:23:40 +0000
commitd52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b (patch)
treec00b5abebd9a613232f62650ef6c5cfd5a857e96 /llvm/test/Bitcode
parent57cccec4467282be31fb1c8b47bd1a71629ff732 (diff)
downloadbcm5719-llvm-d52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b.tar.gz
bcm5719-llvm-d52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b.zip
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
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/attributes.ll5
1 files changed, 5 insertions, 0 deletions
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 }
OpenPOWER on IntegriCloud