diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-01-01 17:18:00 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-01-01 17:18:00 +0000 |
commit | b3a13c4218a2f4798a3ed94599e63f565da92418 (patch) | |
tree | 8eeab6099ec411f6266cc4bf76c70369b593d812 /test | |
parent | 16f02040e60477ad31ad3a85f5e1aeb50a9766a8 (diff) |
[InstCombine] add test to show potential nonnull attribute propagation; NFC
This will change with the current draft of:
https://reviews.llvm.org/D28204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/call_nonnull_arg.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/call_nonnull_arg.ll b/test/Transforms/InstCombine/call_nonnull_arg.ll index 58cf3bcb756..adbae0af283 100644 --- a/test/Transforms/InstCombine/call_nonnull_arg.ll +++ b/test/Transforms/InstCombine/call_nonnull_arg.ll @@ -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 +} + |