Skip to content

Commit

Permalink
[AIX] Set memrchr to unavailable (llvm#92588)
Browse files Browse the repository at this point in the history
`memrchr` is not available on AIX. This patch turns it off so the
optimizer will not generate it to cause link errors.
  • Loading branch information
qiongsiwu authored May 21, 2024
1 parent 8f1c984 commit a53e568
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/Analysis/TargetLibraryInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a53e568

Please sign in to comment.