<div dir="ltr"><div><div>I believe the node you're looking for is fpround.<br></div>That one has a type profile with the source larger than the target. The fround does not - they have to be the same.<br><br></div>I imagine this is a result of:<br>------------------------------------------------------------------------<br>r279129 | mkuper | 2016-08-18 15:08:15 -0500 (Thu, 18 Aug 2016) | 8 lines<br><br>[SelectionDAG] Rename fextend -> fpextend, fround -> fpround, frnd -> fround<br><br>The names of the tablegen defs now match the names of the ISD nodes.<br>This makes the world a slightly saner place, as previously "fround" matched<br>ISD::FP_ROUND and not ISD::FROUND.<br><br>Differential Revision: <a href="https://reviews.llvm.org/D23597">https://reviews.llvm.org/D23597</a><br><br>------------------------------------------------------------------------<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 23, 2017 at 12:41 PM, Martin J. O'Riordan via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="EN-IE"><div class="m_9085094472999389420WordSection1"><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">I am trying to upgrade to the LLVM v4.0 branch, but I am seeing failures in my TableGen descriptions for conversion from FP32 to FP16 (scalar and vector).<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">The patterns I have are along the lines of:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:12.0pt;font-family:"Courier New"">[(set (f16 RF16:$dst), (fround (f32 RF32:$src)))]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">or:<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:12.0pt;font-family:"Courier New"">[(set (v2f16 VF16:$dst), (fround (v2f32 VF32:$src)))]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">and these now produce the errors:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:12.0pt;font-family:"Courier New";color:black">error: In CONV_f32_f16: Type inference contradiction found, merging 'f32' into 'f16'<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">or:<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:12.0pt;font-family:"Courier New";color:black">error: In CONV_v2f32_v2f16: Type inference contradiction found, merging 'v2f32' into 'v2f16'<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">For the scalar version, the conflict is between two rules that have different mutually exclusive predicates (for alternative chip versions).  But in the case of the vector, the conflict is for a vector of a different size, in the case:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:12.0pt;font-family:"Courier New"">[(set (v4f16 VF16:$dst), (fround (v4f32 VF32:$src)))]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">and ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">CONV_v4f32_v4f16</span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’.  What adjustments do I need to make to the TD descriptions to make these work again?  I know that FP16 is not hugely common on the mainstream platforms, but it is vital to ours.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">I did notice that ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">fextend</span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’ was replaced by ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">fpextend</span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’, is there some new ISD node type I should use for ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">fround</span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">            MartinO<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p></div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>