diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp --- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp @@ -259,7 +259,7 @@ IRBuilder<> Builder(Ctx); for (Function &Func : M.functions()) { - if (!Func.isDeclaration() && AMDGPU::isKernelCC(&Func)) { + if (!Func.isDeclaration() && AMDGPU::isKernel(Func.getCallingConv())) { const CallGraphNode *N = CG[&Func]; const bool CalleesRequireModuleLDS = N->size() > 0; diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp @@ -41,7 +41,7 @@ SmallPtrSet Visited; SmallVector Stack(GV.users()); - assert(!F || isKernelCC(F)); + assert(!F || isKernel(F->getCallingConv())); while (!Stack.empty()) { const User *V = Stack.pop_back_val(); @@ -62,7 +62,7 @@ } else if (!F) { // For module LDS lowering, lowering is required if the user instruction // is from non-kernel function. - Ret |= !isKernelCC(UF); + Ret |= !isKernel(UF->getCallingConv()); } continue; }