[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 08:54:26 PDT 2024


================
@@ -4824,6 +4824,9 @@ llvm::CallInst *CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee,
   llvm::CallInst *call = Builder.CreateCall(
       callee, args, getBundlesForFunclet(callee.getCallee()), name);
   call->setCallingConv(getRuntimeCC());
+
+  if (getTarget().getTriple().isSPIRVLogical() && call->isConvergent())
+    return dyn_cast<llvm::CallInst>(addControlledConvergenceToken(call));
----------------
arsenm wrote:

can this just be cast<>? 

https://github.com/llvm/llvm-project/pull/88918


More information about the cfe-commits mailing list