[llvm] r304991 - [PowerPC] add memcmp test with nobuiltin attr; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 10:37:41 PDT 2017


Thanks, Eli! I would have done a lame one-off fix if left on my own, but
let me try for the better fix...

I found some more background for the CGP and SDAG behaviors. We're
intentionally not checking for nobuiltin in CGP on fortified calls after:
https://bugs.llvm.org/show_bug.cgi?id=23093
https://reviews.llvm.org/rL233776

The SDAG checks were added with the sanitizers in mind:
https://reviews.llvm.org/D19781
https://reviews.llvm.org/D19801


On Thu, Jun 8, 2017 at 11:28 AM, Friedman, Eli <efriedma at codeaurora.org>
wrote:

> On 6/8/2017 10:09 AM, Sanjay Patel via llvm-commits wrote:
>
>> Author: spatel
>> Date: Thu Jun  8 12:09:18 2017
>> New Revision: 304991
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=304991&view=rev
>> Log:
>> [PowerPC] add memcmp test with nobuiltin attr; NFC
>>
>> In SDAG, we don't expand libcalls with a nobuiltin attribute.
>> It's not clear if that's correct from the existing code comment:
>> "Don't do the check if marked as nobuiltin for some reason."
>>
>> ...adding a test here either way to show that there is currently
>> a different behavior implemented in the CGP-based expansion.
>>
>
> It's unlikely to actually cause problems for memcmp specifically
> (freestanding environments are supposed to have a standard memcmp anyway),
> but we probably should fix this for so someone doesn't accidentally
> copy-paste it somewhere it does matter.
>
> We should add an overload of TargetLibraryInfo::getLibFunc which takes a
> CallSite, so it's harder to make this mistake.
>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170608/3bcd1fda/attachment.html>


More information about the llvm-commits mailing list