diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index 25951d2a7fe63c..421f8a42e7e2c9 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -872,6 +872,12 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, TLI.setUnavailable(LibFunc_vec_free); } + if (T.isBPF()) { + TLI.setUnavailable(LibFunc_rust_alloc); + TLI.setUnavailable(LibFunc_rust_dealloc); + TLI.setUnavailable(LibFunc_rust_realloc); + } + TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary, T); }