[llvm] [AIX] Set memrchr to unavailable (PR #92588)
Qiongsi Wu via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 11:52:34 PDT 2024
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/92588
`memrchr` is not available on AIX. This patch turns it off so the optimizer will not generate it to cause link errors.
>From 2e6b2eb29f1589d3576aaa7da3541da84f415b90 Mon Sep 17 00:00:00 2001
From: Qiongsi Wu <qwu at ibm.com>
Date: Fri, 17 May 2024 14:14:03 -0400
Subject: [PATCH] Set memrchr to unavailable on AIX.
---
llvm/lib/Analysis/TargetLibraryInfo.cpp | 3 +++
1 file changed, 3 insertions(+)
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