================ @@ -469,14 +480,21 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { for (auto &F : M.functions()) { if (!F.hasFnAttribute("hlsl.shader")) continue; - IRBuilder<> B(&F.getEntryBlock(), F.getEntryBlock().begin()); + auto* Token = getConvergenceToken(F.getEntryBlock()); + Instruction* IP = Token ? Token : &*F.getEntryBlock().begin(); + IRBuilder<> B(IP); + std::vector<OperandBundleDef> OB; + if (Token) { + llvm::Value *bundleArgs[] = {Token}; + OB.emplace_back("convergencectrl", bundleArgs); + } ---------------- s-perron wrote:
Once this is merged I will open up a PR for that branch. https://github.com/llvm/llvm-project/pull/112757 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits