<div dir="ltr">Perhaps this should have some test coverage so it doesn't regress like this again/in other fun ways?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 3, 2015 at 5:14 PM, Justin Bogner via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@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">Author: bogner<br>
Date: Thu Dec  3 19:14:24 2015<br>
New Revision: 254679<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=254679&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=254679&view=rev</a><br>
Log:<br>
IR: Update a comment and a bool that've been out of date since 2012<br>
<br>
It became impossible to get here with a half in r157393, over 3 years<br>
ago.<br>
<br>
Modified:<br>
    llvm/trunk/lib/IR/AsmWriter.cpp<br>
<br>
Modified: llvm/trunk/lib/IR/AsmWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=254679&r1=254678&r2=254679&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=254679&r1=254678&r2=254679&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)<br>
+++ llvm/trunk/lib/IR/AsmWriter.cpp Thu Dec  3 19:14:24 2015<br>
@@ -1108,11 +1108,10 @@ static void WriteConstantInternal(raw_os<br>
       // the value back and get the same value.<br>
       //<br>
       bool ignored;<br>
-      bool isHalf = &CFP->getValueAPF().getSemantics()==&APFloat::IEEEhalf;<br>
       bool isDouble = &CFP->getValueAPF().getSemantics()==&APFloat::IEEEdouble;<br>
       bool isInf = CFP->getValueAPF().isInfinity();<br>
       bool isNaN = CFP->getValueAPF().isNaN();<br>
-      if (!isHalf && !isInf && !isNaN) {<br>
+      if (!isInf && !isNaN) {<br>
         double Val = isDouble ? CFP->getValueAPF().convertToDouble() :<br>
                                 CFP->getValueAPF().convertToFloat();<br>
         SmallString<128> StrVal;<br>
@@ -1140,7 +1139,7 @@ static void WriteConstantInternal(raw_os<br>
                     "assuming that double is 64 bits!");<br>
       char Buffer[40];<br>
       APFloat apf = CFP->getValueAPF();<br>
-      // Halves and floats are represented in ASCII IR as double, convert.<br>
+      // Floats are represented in ASCII IR as double, convert.<br>
       if (!isDouble)<br>
         apf.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven,<br>
                           &ignored);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>