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

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 1 10:33:24 PST 2017


Yes, good point. Added a blurb in r290798, and the proposed transform is
shown in D28204.
Thanks for reviewing!

On Sun, Jan 1, 2017 at 11:07 AM, Sean Silva <chisophugis at gmail.com> wrote:

>
>
> On Sun, Jan 1, 2017 at 9:18 AM, Sanjay Patel via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: spatel
>> Date: Sun Jan  1 11:18:00 2017
>> New Revision: 290797
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=290797&view=rev
>> Log:
>> [InstCombine] add test to show potential nonnull attribute propagation;
>> NFC
>>
>
> Can you describe the "potential" in a comment in the test case? It's clear
> from context for me right now, but these things can get lost in the mists
> of time.
>
> -- Sean Silva
>
>
>> This will change with the current draft of:
>> https://reviews.llvm.org/D28204
>>
>> Modified:
>>     llvm/trunk/test/Transforms/InstCombine/call_nonnull_arg.ll
>>
>> Modified: llvm/trunk/test/Transforms/InstCombine/call_nonnull_arg.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transfor
>> ms/InstCombine/call_nonnull_arg.ll?rev=290797&r1=290796&
>> r2=290797&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/test/Transforms/InstCombine/call_nonnull_arg.ll (original)
>> +++ llvm/trunk/test/Transforms/InstCombine/call_nonnull_arg.ll Sun Jan
>> 1 11:18:00 2017
>> @@ -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
>> +}
>> +
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170101/cec797d7/attachment.html>


More information about the llvm-commits mailing list