Skip to content

Commit a53e568

Browse files
authored
[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.
1 parent 8f1c984 commit a53e568

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Analysis/TargetLibraryInfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,9 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T,
882882
TLI.setUnavailable(LibFunc_vec_free);
883883
}
884884

885+
if (T.isOSAIX())
886+
TLI.setUnavailable(LibFunc_memrchr);
887+
885888
TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary, T);
886889
}
887890

0 commit comments

Comments
 (0)