================ @@ -469,14 +479,22 @@ 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->getNextNode() : &*F.getEntryBlock().begin(); + IRBuilder<> B(IP); + SmallVector<OperandBundleDef, 1> OB; + if (Token) { ---------------- s-perron wrote:
Good call. Done. 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