[llvm] [llvm][SimplifyLibCalls] Add option 'AllowMemcmpToBcmpTransform' (PR #82304)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 11:06:59 PST 2024


nickdesaulniers wrote:

> @gchatelet @nickdesaulniers do we intend on having an llvm-libc target triple ?

I think at some point we will need to add this to clang.

> That would probably be a better long-term solution to support differences between llvm-libc and the glibc.

I agree.

Not a fan of this PR; we have different ways to represent if a function is available in a target environment. We can probably key off of that to determine if we should be transforming memcmp -> bcmp. `setLibcallName` comes to mind.

https://github.com/llvm/llvm-project/pull/82304


More information about the llvm-commits mailing list