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

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 10:28:01 PDT 2017


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



More information about the llvm-commits mailing list