[InstCombine] add test to show potential nonnull attribute propagation; NFC

This will change with the current draft of:
https://reviews.llvm.org/D28204

llvm-svn: 290797
This commit is contained in:
Sanjay Patel 2017-01-01 17:18:00 +00:00
parent f872d230ad
commit 07537c2b6e
1 changed files with 14 additions and 0 deletions

View File

@ -31,3 +31,17 @@ dead:
unreachable
}
declare void @bar(i8*, i8* nonnull)
declare void @baz(i8*, i8*)
define void @deduce_nonnull_from_another_call(i8* %a, i8* %b) {
; CHECK-LABEL: @deduce_nonnull_from_another_call(
; CHECK-NEXT: call void @bar(i8* %a, i8* %b)
; CHECK-NEXT: call void @baz(i8* %b, i8* %b)
; CHECK-NEXT: ret void
;
call void @bar(i8* %a, i8* %b)
call void @baz(i8* %b, i8* %b)
ret void
}