<p dir="ltr">Is it testable? </p>
<div class="gmail_quote">On Jun 17, 2015 5:11 PM, "Matt Arsenault" <<a href="mailto:Matthew.Arsenault@amd.com">Matthew.Arsenault@amd.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: arsenm<br>
Date: Wed Jun 17 15:55:25 2015<br>
New Revision: 239943<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D239943-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=KS2NQwcnohet17QXV8KYlBIb1Jy9ZIG8lCFrF-DyHg4&s=Ethq2jc6i5wBrTf3zXht2sbqKDCGthYv1EAvwFuHgYU&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=239943&view=rev</a><br>
Log:<br>
AMDGPU: Change unreachable into reported error<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_AMDGPU_AMDGPUAsmPrinter.cpp-3Frev-3D239943-26r1-3D239942-26r2-3D239943-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=KS2NQwcnohet17QXV8KYlBIb1Jy9ZIG8lCFrF-DyHg4&s=ekucDYIkRRyMAEabUaqiXdBTXn0N5NZePe-aqS9ttdc&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=239943&r1=239942&r2=239943&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)<br>
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Wed Jun 17 15:55:25 2015<br>
@@ -338,8 +338,10 @@ void AMDGPUAsmPrinter::getSIProgramInfo(<br>
ProgInfo.NumSGPR = MaxSGPR + 1;<br>
<br>
if (STM.hasSGPRInitBug()) {<br>
- if (ProgInfo.NumSGPR > AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG)<br>
- llvm_unreachable("Too many SGPRs used with the SGPR init bug");<br>
+ if (ProgInfo.NumSGPR > AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG) {<br>
+ LLVMContext &Ctx = MF.getFunction()->getContext();<br>
+ Ctx.emitError("too many SGPRs used with the SGPR init bug");<br>
+ }<br>
<br>
ProgInfo.NumSGPR = AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG;<br>
}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>