https://github.com/uweigand commented: You'll also have to update `TargetLibraryInfo::initExtensionsForTriple` so the middle-end will make the correct choices for library calls inserted by optimization passes. https://github.com/llvm/llvm-project/pull/206833