================
@@ -5233,17 +5233,32 @@ llvm::CallInst 
*CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee,
                                                  const llvm::Twine &name) {
   llvm::CallInst *call = Builder.CreateCall(
       callee, args, getBundlesForFunclet(callee.getCallee()), name);
-  // Intrinsics must use CallingConv::C; only apply the runtime CC to
-  // non-intrinsic callees.
-  if (auto *F = dyn_cast<llvm::Function>(callee.getCallee());
-      !F || !F->isIntrinsic())
-    call->setCallingConv(getRuntimeCC());
+  call->setCallingConv(getRuntimeCC());
 
   if (CGM.shouldEmitConvergenceTokens() && call->isConvergent())
     return cast<llvm::CallInst>(addConvergenceControlToken(call));
   return call;
 }
 
+llvm::CallInst *CodeGenFunction::EmitIntrinsicCall(llvm::FunctionCallee Callee,
----------------
wenju-he wrote:

done, now pass Intrinsic::ID to EmitIntrinsicCall

https://github.com/llvm/llvm-project/pull/197380
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to