================ @@ -2099,6 +2100,28 @@ void AMDGPUCodeGenPassBuilder::addMachineSSAOptimization( addPass(SIShrinkInstructionsPass()); } +static const char RegAllocNPMNotSupportedMessage[] = + "-regalloc-npm not supported with amdgcn. Use -sgpr-regalloc-npm, " + "-wwm-regalloc-npm, and -vgpr-regalloc-npm"; + +Error AMDGPUCodeGenPassBuilder::addRegAssignmentOptimized( + AddMachinePass &addPass) const { + if (Opt.RegAlloc != RegAllocType::Unset) + report_fatal_error(RegAllocNPMNotSupportedMessage, false); ---------------- arsenm wrote:
Why mix fatal errors and returned errors? https://github.com/llvm/llvm-project/pull/120557 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits