================ @@ -506,24 +507,15 @@ void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &F, // If the NVVM IR has some of reqntid* specified, then output // the reqntid directive, and set the unspecified ones to 1. // If none of Reqntid* is specified, don't output reqntid directive. - std::optional<unsigned> Reqntidx = getReqNTIDx(F); - std::optional<unsigned> Reqntidy = getReqNTIDy(F); - std::optional<unsigned> Reqntidz = getReqNTIDz(F); + const auto ReqNTID = getReqNTID(F); + if (!ReqNTID.empty()) + O << formatv(".reqntid {0:$[, ]}\n", + make_range(ReqNTID.begin(), ReqNTID.end())); ---------------- AlexMaclean wrote:
I agree it seems like it should not be necessary, but this was the only way I could get it to compile. If you know a cleaner/more idiomatic way to do this that would be great. https://github.com/llvm/llvm-project/pull/127736 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits