diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2015-06-17 20:55:25 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2015-06-17 20:55:25 +0000 |
| commit | 417c93e3c1d4ff2640e500bfa30a7c9207f76150 (patch) | |
| tree | bfb132a024a3d0016408e1f5afe15f7f040929ca /llvm/lib/Target | |
| parent | a3f423b4fcaf889b8cc233ec090e83f83d9aa03c (diff) | |
| download | bcm5719-llvm-417c93e3c1d4ff2640e500bfa30a7c9207f76150.tar.gz bcm5719-llvm-417c93e3c1d4ff2640e500bfa30a7c9207f76150.zip | |
AMDGPU: Change unreachable into reported error
llvm-svn: 239943
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp index 29c2da61add..afc6bcb52bb 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp @@ -338,8 +338,10 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo, 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; } |

