diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -547,6 +547,8 @@ if (T.isNVPTX()) { TLI.disableAllFunctions(); TLI.setAvailable(LibFunc_nvvm_reflect); + TLI.setAvailable(llvm::LibFunc_malloc); + TLI.setAvailable(llvm::LibFunc_free); } else { TLI.setUnavailable(LibFunc_nvvm_reflect); }