Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIX] Set memrchr to unavailable #92588

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

qiongsiwu
Copy link
Contributor

memrchr is not available on AIX. This patch turns it off so the optimizer will not generate it to cause link errors.

@llvmbot
Copy link
Collaborator

llvmbot commented May 17, 2024

@llvm/pr-subscribers-llvm-analysis

Author: Qiongsi Wu (qiongsiwu)

Changes

memrchr is not available on AIX. This patch turns it off so the optimizer will not generate it to cause link errors.


Full diff: https://github.com/llvm/llvm-project/pull/92588.diff

1 Files Affected:

  • (modified) llvm/lib/Analysis/TargetLibraryInfo.cpp (+3)
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);
 }
 

@qiongsiwu qiongsiwu self-assigned this May 17, 2024
Copy link
Contributor

@syzaara syzaara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@qiongsiwu qiongsiwu merged commit a53e568 into llvm:main May 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants