git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239943
91177308-0d34-0410-b5e6-
96231b3b80d8
ProgInfo.NumSGPR = MaxSGPR + 1;
if (STM.hasSGPRInitBug()) {
- if (ProgInfo.NumSGPR > AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG)
- llvm_unreachable("Too many SGPRs used with the SGPR init bug");
+ if (ProgInfo.NumSGPR > AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG) {
+ LLVMContext &Ctx = MF.getFunction()->getContext();
+ Ctx.emitError("too many SGPRs used with the SGPR init bug");
+ }
ProgInfo.NumSGPR = AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG;
}