<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20140709152100066183 { }body { font-size: 10.5pt; font-family: 'Segoe UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>    Thank you Kevin!!!</div><div>    If I use fptrunc and bitcast realise NEON vcvtt ( I can sure, "fptrunc  double %tmp to float" is right, but "fptrunc float %tmp to half" is wrong). My target platform is MIPS.  The command as following:</div><div><br></div><div><span style="font-family: "" segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">NEON:</span><span style="font-family: ''; font-size: 10.5pt; line-height: 1.5; background-color: window;">    </span></div><div><span style="font-family: ''; font-size: 10.5pt; line-height: 1.5; background-color: window;">    </span><span style="font-family: ''; font-size: 10.5pt; line-height: 1.5; background-color: window;">    </span><span style="background-color: window; font-family: ''; font-size: 10.5pt; line-height: 1.5;">vcvtt.f16.f32  s2, s0</span></div><div><span style="font-family: "" segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><br></span></div><div><span style="font-family: "" segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">llvm Code:</span></div><div><span style="font-family: "" segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><br> %Vt_2 = load float* %VFP_s0, align 4
<br> %Vt3_1 = fptrunc float %Vt_2 to half
<br> %Vt4_1 = bitcast half %Vt3_1 to i16
<br> %Vt2_2 = bitcast float* %VFP_s2 to  <2 x i16>*
<br> %Vrti_1 = load <2 x i16>* %Vt2_2, align 4
<br> %Vrti_2 = insertelement <2 x i16> %Vrti_1, i16 %Vt4_1, i32 1
<br> %Vt2_3 = bitcast float* %VFP_s2 to <2 x i16>*
<br> store <2 x i16> %Vrti_2, <2 x i16>* %Vt2_3, align 4 <br></span></div><div><br></div><div>Error Log:</div><div><div>LLVM ERROR: Cannot select: 0x9f554b0: ch = store 0x9d0f28c, 0x9f5d900, 0x9f54ba8, 0x9f54b20<ST2[FixedStack0](align=4), trunc to f16> [ID=52] <br>0x9f5d900: f32,ch = load 0x9f5e290, 0x9f5dd40, 0x9f54b20<LD4[%sunkaddr69]> [ORD=1810] [ID=51] <br>0x9f5dd40: i32 = add 0x9f55318, 0x9f5e0f8 [ORD=1808] [ID=31] <br>0x9f55318: i32,ch = CopyFromReg 0x9d0f28c, 0x9f6a3a0 [ORD=1796] [ID=26] <br>0x9f6a3a0: i32 = Register %vreg32 [ORD=1796] [ID=1] <br>0x9f5e0f8: i32 = Constant<64> [ORD=1808] [ID=17] <br>0x9f54b20: i32 = undef [ORD=1797] [ID=6] <br>0x9f54ba8: i32 = FrameIndex<0> [ID=24] <br>0x9f54b20: i32 = undef [ORD=1797] [ID=6] <br>In function: testVCVTT32TO16Function <br></div></div><div><br></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>yalong@multicorewareinc.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:kevinqindev@gmail.com">Kevin Qin</a></div><div><b>Date:</b> 2014-07-09 00:03</div><div><b>To:</b> <a href="mailto:yalong@multicorewareinc.com">yalong@multicorewareinc.com</a></div><div><b>CC:</b> <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev</a></div><div><b>Subject:</b> Re: [LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!</div></div></div><div><div class="FoxDiv20140709152100066183"><div dir="ltr">Hi,<div><br></div><div>Can you show us the command line you are using? At least can you tell us the backend you tried on? If you can upload the test case as well, it will be very useful to find out the problem.</div>
<div><br></div><div><br></div><div>Regards,</div><div>Kevin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-10 1:53 GMT+08:00 <a href="mailto:yalong@multicorewareinc.com">yalong@multicorewareinc.com</a> <span dir="ltr"><<a href="mailto:yalong@multicorewareinc.com" target="_blank">yalong@multicorewareinc.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div>
<div><span></span>Hi all, </div><div>    I am new to llvm. I need help. Thank you every!</div><div><br></div><div>    I want to realize vcvtt.f16.f32  NEON instruction by llvm. This instruction covert top-16bits of a single type to f16. I use the intrinsics function llvm.convert.to.fp16, but cannot llc ,<b> </b><span style="font-size:10.5pt;line-height:1.5;background-color:window"><b>I meet is following problem</b> :</span></div>
<div><span style="font-size:10.5pt;line-height:1.5;background-color:window"><br></span></div><div><span>LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16]
<br>  0x9fc0750: f32,ch = load 0x3aafd68, 0x9fc2a20, 0x9feaab0<LD4[%sunkaddr85033]> [ORD=125117] [ID=15]
<br>    0x9fc2a20: i32 = add 0x9fed880, 0x9fd9ea0 [ORD=125115] [ID=13]
<br>      0x9fed880: i32,ch = CopyFromReg 0x3aafd68, 0x9fbea90 [ORD=125114] [ID=9]
<br>        0x9fbea90: i32 = Register %vreg13999 [ORD=125114] [ID=1]
<br>      0x9fd9ea0: i32 = Constant<80> [ORD=125115] [ID=2]
<br>    0x9feaab0: i32 = undef [ORD=125117] [ID=4]
<br>In function: internal_function_69
<br>Command exited with non-zero status 1</span></div><div><span style="font-size:10.5pt;line-height:1.5;background-color:window"><br></span></div><div>    If I change the method, I use " %1 = <span style="font-family:'';font-size:10.5pt;line-height:1.5;background-color:window">fptrunc float %0  to half ", then " %2 = bitcast half %1 to i16", I meet samiliar problem, <b>the log is following</b>:</span></div>
<div><span style="font-family:'';font-size:10.5pt;line-height:1.5;background-color:window"><br></span></div><div><span>LLVM ERROR: Cannot select: 0x9f554b0: ch = store 0x9d0f28c, 0x9f5d900, 0x9f54ba8, 0x9f54b20<ST2[FixedStack0](align=4), trunc to f16> [ID=52]
<br>  0x9f5d900: f32,ch = load 0x9f5e290, 0x9f5dd40, 0x9f54b20<LD4[%sunkaddr69]> [ORD=1810] [ID=51]
<br>    0x9f5dd40: i32 = add 0x9f55318, 0x9f5e0f8 [ORD=1808] [ID=31]
<br>      0x9f55318: i32,ch = CopyFromReg 0x9d0f28c, 0x9f6a3a0 [ORD=1796] [ID=26]
<br>        0x9f6a3a0: i32 = Register %vreg32 [ORD=1796] [ID=1]
<br>      0x9f5e0f8: i32 = Constant<64> [ORD=1808] [ID=17]
<br>    0x9f54b20: i32 = undef [ORD=1797] [ID=6]
<br>  0x9f54ba8: i32 = FrameIndex<0> [ID=24]
<br>  0x9f54b20: i32 = undef [ORD=1797] [ID=6]
<br>In function: testVCVTT32TO16Function <br></span></div>
<div><br></div><div><br></div><div>    Anyone can help me?? Thank you again.</div><div><br></div><hr style="width:210px;min-height:1px" color="#b5c4df" size="1" align="left"><span class="HOEnZb"><font color="#888888">
<div><span><div style="MARGIN:10px;FONT-FAMILY:verdana;FONT-SIZE:10pt"><div><a href="mailto:yalong@multicorewareinc.com" target="_blank">yalong@multicorewareinc.com</a></div></div></span></div>
</font></span></div><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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Best Regards,<div><br></div><div>Kevin Qin</div></div>
</div>
</div></div></blockquote>
</body></html>