<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 5, 2009, at 12:51 PM, BGB wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="EN-US" vlink="purple" link="blue" bgcolor="#ffffff"><o:smarttagtype name="City" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><o:smarttagtype name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><o:smarttagtype name="address" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:smarttagtype><div><font face="Arial" size="2"></font> </div><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left-color: rgb(0, 0, 0); border-left-width: 2px; border-left-style: solid; margin-right: 0px; "><div style="font: normal normal normal 10pt/normal arial; ">----- Original Message -----</div><div style="background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(228, 228, 228); font: normal normal normal 10pt/normal arial; background-position: initial initial; "><b>From:</b><span class="Apple-converted-space"> </span><a title="Micah.Villmow@amd.com" href="mailto:Micah.Villmow@amd.com" style="color: blue; text-decoration: underline; ">Villmow, Micah</a></div><div style="font: normal normal normal 10pt/normal arial; "><b>To:</b><span class="Apple-converted-space"> </span><a title="llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu" style="color: blue; text-decoration: underline; ">LLVM Developers Mailing List</a></div><div style="font: normal normal normal 10pt/normal arial; "><b>Sent:</b><span class="Apple-converted-space"> </span>Friday, February 06, 2009 5:47 AM</div><div style="font: normal normal normal 10pt/normal arial; "><b>Subject:</b><span class="Apple-converted-space"> </span>[LLVMdev] 16 bit floats</div><div><br></div><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; ">I need to support 16 bit floats for some operations, outside of datatypes.td and the constants class, is there anything else I will need to modify to add f16 support?<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p></o:p></span></font> </div></div></blockquote><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p>probably also code generation (can't give specifics, no real expert on the LLVM codebase).</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p>this would be because, even if the core typesystem knows of the type, the codegen might not know how to emit operations on that type.</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p></o:p></span></font> </div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p>now, of note:</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p>in my project (not LLVM based), float16 had not been supported directly (since it is not known to the CPU), rather, some loader and saver thunks were used which converted to/from float32 (this used as the 'internal' representation of the type). in most cases, I would think this would be faster than directly operating on the float16, since the CPU supports float32, but float16 would have to be emulated.</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p></o:p></span></font> </div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; "><o:p>(unless of course newer CPUs are adding native float16 support or similar?...).</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><br></div></div></span></blockquote><br>Right.  Micah, does your CPU support float16 operations like add/sub etc natively?</div><div><br></div><div>-Chirs</div></body></html>