<div dir="ltr">Was a fix for this ever applied to trunk?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 11:08 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes that definitely sounds like a bug, no intrinsically in mainline are a prefix if another one, or we are getting lucky.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Chris<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Nov 29, 2012, at 7:24 PM, "Relph, Richard" <<a href="mailto:Richard.Relph@amd.com">Richard.Relph@amd.com</a>> wrote:<br>
<br>
> If the source being scanned has "llvm.AMDIL.barrier.global, it will match the first barrier test and return AMDIL_barrier, not AMDIL_barrier_global.<br>
><br>
><br>
> On Nov 29, 2012, at 7:19 PM, Chris Lattner <<a href="mailto:clattner@apple.com">clattner@apple.com</a>><br>
> wrote:<br>
><br>
>> Out of curiosity, what is wrong about that? It looks ok to me.<br>
>><br>
>> -Chris<br>
>><br>
>> On Nov 29, 2012, at 6:52 PM, "Relph, Richard" <<a href="mailto:Richard.Relph@amd.com">Richard.Relph@amd.com</a>> wrote:<br>
>><br>
>>> Should tablegen detect this as an error, or is it documented as a limitation somewhere that we've missed?<br>
>>><br>
>>> In the tablegen-generated file AMDILGenIntrinsics.inc, we have a bunch of if statements comparing strings, many of which are dead, preventing correct recognition of some intrinsics in the their text form. I'm not quite sure what GET_FUNCTION_RECOGNIZER is used for, but if it's used, it's broken… ;-)<br>
>>><br>
>>> Here's a small segment:<br>
>>><br>
>>> // Function name -> enum value recognizer code.<br>
>>> #ifdef GET_FUNCTION_RECOGNIZER<br>
>>> StringRef NameR(Name+6, Len-6); // Skip over 'llvm.'<br>
>>> switch (Name[5]) { // Dispatch on first letter.<br>
>>> default: break;<br>
>>> case 'A':<br>
>>> …<br>
>>> if (NameR.startswith("MDIL.barrier.")) return AMDILIntrinsic::AMDIL_barrier;<br>
>>> if (NameR.startswith("MDIL.barrier.global.")) return AMDILIntrinsic::AMDIL_barrier_global;<br>
>>> if (NameR.startswith("MDIL.barrier.local.")) return AMDILIntrinsic::AMDIL_barrier_local;<br>
>>> if (NameR.startswith("MDIL.barrier.region.")) return AMDILIntrinsic::AMDIL_barrier_region;<br>
>>> …<br>
>>> if (NameR.startswith("MDIL.fma.")) return AMDILIntrinsic::AMDIL_fma;<br>
>>> if (NameR.startswith("MDIL.fma.rte.")) return AMDILIntrinsic::AMDIL_fma_rte;<br>
>>> if (NameR.startswith("MDIL.fma.rtn.")) return AMDILIntrinsic::AMDIL_fma_rtn;<br>
>>> if (NameR.startswith("MDIL.fma.rtp.")) return AMDILIntrinsic::AMDIL_fma_rtp;<br>
>>> if (NameR.startswith("MDIL.fma.rtz.")) return AMDILIntrinsic::AMDIL_fma_rtz;<br>
>>> …<br>
>>> and several other similar instances.<br>
>>><br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>><br>
><br>
><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div>