[llvm] a53e568 - [AIX] Set memrchr to unavailable (#92588)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 06:45:05 PDT 2024
Author: Qiongsi Wu
Date: 2024-05-21T09:45:01-04:00
New Revision: a53e568b16db60eaeb4886232841c2a884f484fc
URL: https://github.com/llvm/llvm-project/commit/a53e568b16db60eaeb4886232841c2a884f484fc
DIFF: https://github.com/llvm/llvm-project/commit/a53e568b16db60eaeb4886232841c2a884f484fc.diff
LOG: [AIX] Set memrchr to unavailable (#92588)
`memrchr` is not available on AIX. This patch turns it off so the
optimizer will not generate it to cause link errors.
Added:
Modified:
llvm/lib/Analysis/TargetLibraryInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 7ce42447b6308..592caf2d0e23a 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -882,6 +882,9 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T,
TLI.setUnavailable(LibFunc_vec_free);
}
+ if (T.isOSAIX())
+ TLI.setUnavailable(LibFunc_memrchr);
+
TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary, T);
}
More information about the llvm-commits
mailing list