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

via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 24 10:33:12 PST 2024


goldsteinn wrote:

> `-fno-builtin-bcmp` should allow disabling the transform already, as far as I know.
> 
> If you want to just remove the transform completely, that seems fine to me; it seems like the whole "optimize bcmp" effort sort of failed. We don't want to keep around optimization flags if we don't think they're actually useful. We can always resurrect the code later if we need it in some form.

If you want to keep the same optimization in at least some cases `glibc` has a properly `bcmp` function named `__memcmpeq`.
I don't think any other `libc` impl has this, however.

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


More information about the llvm-commits mailing list