<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Make sure you’re running LLVM with assertions enabled. You’ll get more information about what’s going wrong that way.<div><br></div><div>That said, yes, this looks like a bug. Specifically, SelectionDAGLegalize::ExpandConstantFP() assumes that f32 is the smallest floating point constant type it’ll need to handle, and that MVT enum ordering reflects that.</div><div><br></div><div>  while (SVT != MVT::f32) {                                                      <br>    SVT = (MVT::SimpleValueType)(SVT.getSimpleVT().SimpleTy - 1); </div><div>    ...</div><div>  }</div><div><br></div><div>That function, and possibly others, need to be taught how to handle half-floats, it looks like.</div><div><br></div><div>-Jim</div><div><br><div><div>On Jun 17, 2013, at 6:59 AM, Alessio Giovanni Baroni <<a href="mailto:alessiogiovanni.baroni@gmail.com">alessiogiovanni.baroni@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>if I write the following simple program:<br><br>target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"<br>target triple = "x86_64-unknown-linux-gnu"<br><br>define void @foo () {<br>    %1 = alloca half<br>    store half 0xH42CC, half* %1   ; 0xH42CC = 3.4<br>    %2 = load half* %1<br>    ret void<br>}<br><br></div>llc goes in SIGABRT. In the reference manual says that it's  correct syntax.<br><br></div>It's a bug?<br><br></div>Thanks.<br></div>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>        <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></blockquote></div><br></div></body></html>