================ @@ -1399,19 +1399,27 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { if (PTy) { O << "\t.param .u" << PTySizeInBits << " .ptr"; + bool IsCUDA = static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == + NVPTX::CUDA; switch (PTy->getAddressSpace()) { default: break; case ADDRESS_SPACE_GLOBAL: O << " .global"; break; case ADDRESS_SPACE_SHARED: + if (IsCUDA) + report_fatal_error(".shared ptr kernel args unsupported in CUDA."); O << " .shared"; break; case ADDRESS_SPACE_CONST: + if (IsCUDA) + report_fatal_error(".const ptr kernel args unsupported in CUDA."); ---------------- gonzalobg wrote:
> I wonder if it should be done somewhere in the input IR validation where we > can still dump the problematic IR. That's a great idea. https://github.com/llvm/llvm-project/pull/138706 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits