[llvm] r239943 - AMDGPU: Change unreachable into reported error

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Jun 17 18:35:24 PDT 2015


Is it testable?
On Jun 17, 2015 5:11 PM, "Matt Arsenault" <Matthew.Arsenault at amd.com> wrote:

> Author: arsenm
> Date: Wed Jun 17 15:55:25 2015
> New Revision: 239943
>
> URL: http://llvm.org/viewvc/llvm-project?rev=239943&view=rev
> Log:
> AMDGPU: Change unreachable into reported error
>
> Modified:
>     llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
>
> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=239943&r1=239942&r2=239943&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Wed Jun 17 15:55:25
> 2015
> @@ -338,8 +338,10 @@ void AMDGPUAsmPrinter::getSIProgramInfo(
>    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;
>    }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150617/81c06fc9/attachment.html>


More information about the llvm-commits mailing list