<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This was causing failures on the mips/ppc bots on an x86 file check test which did not occur on the x86 bots = /.<div><br></div><div>I reverted while I am investigating.</div><div><br></div><div>Michael</div><div><br><div><div>On Jun 27, 2013, at 12:50 PM, Michael Gottesman <<a href="mailto:mgottesman@apple.com">mgottesman@apple.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;">Author: mgottesman<br>Date: Thu Jun 27 14:50:52 2013<br>New Revision: 185095<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=185095&view=rev">http://llvm.org/viewvc/llvm-project?rev=185095&view=rev</a><br>Log:<br>[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.<br><br>The category which an APFloat belongs to should be dependent on the<br>actual value that the APFloat has, not be arbitrarily passed in by the<br>user. This will prevent inconsistency bugs where the category and the<br>actual value in APFloat differ.<br><br>I also fixed up all of the references to this constructor (which were<br>only in LLVM).<br><br>Modified:<br>   llvm/trunk/include/llvm/ADT/APFloat.h<br>   llvm/trunk/lib/Support/APFloat.cpp<br>   llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp<br><br>Modified: llvm/trunk/include/llvm/ADT/APFloat.h<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=185095&r1=185094&r2=185095&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=185095&r1=185094&r2=185095&view=diff</a><br>==============================================================================<br>--- llvm/trunk/include/llvm/ADT/APFloat.h (original)<br>+++ llvm/trunk/include/llvm/ADT/APFloat.h Thu Jun 27 14:50:52 2013<br>@@ -191,7 +191,6 @@ public:<br>  APFloat(const fltSemantics &); // Default construct to 0.0<br>  APFloat(const fltSemantics &, StringRef);<br>  APFloat(const fltSemantics &, integerPart);<br>-  APFloat(const fltSemantics &, fltCategory, bool negative);<br>  APFloat(const fltSemantics &, uninitializedTag);<br>  APFloat(const fltSemantics &, const APInt &);<br>  explicit APFloat(double d);<br><br>Modified: llvm/trunk/lib/Support/APFloat.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=185095&r1=185094&r2=185095&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=185095&r1=185094&r2=185095&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/Support/APFloat.cpp (original)<br>+++ llvm/trunk/lib/Support/APFloat.cpp Thu Jun 27 14:50:52 2013<br>@@ -795,17 +795,6 @@ APFloat::APFloat(const fltSemantics &our<br>  initialize(&ourSemantics);<br>}<br><br>-APFloat::APFloat(const fltSemantics &ourSemantics,<br>-                 fltCategory ourCategory, bool negative) {<br>-  initialize(&ourSemantics);<br>-  category = ourCategory;<br>-  sign = negative;<br>-  if (isFiniteNonZero())<br>-    category = fcZero;<br>-  else if (ourCategory == fcNaN)<br>-    makeNaN();<br>-}<br>-<br>APFloat::APFloat(const fltSemantics &ourSemantics, StringRef text) {<br>  initialize(&ourSemantics);<br>  convertFromString(text, rmNearestTiesToEven);<br>@@ -2406,8 +2395,8 @@ APFloat::roundSignificandWithExponent(co<br>    excessPrecision = calcSemantics.precision - semantics->precision;<br>    truncatedBits = excessPrecision;<br><br>-    APFloat decSig(calcSemantics, fcZero, sign);<br>-    APFloat pow5(calcSemantics, fcZero, false);<br>+    APFloat decSig = APFloat::getZero(calcSemantics, sign);<br>+    APFloat pow5(calcSemantics);<br><br>    sigStatus = decSig.convertFromUnsignedParts(decSigParts, sigPartCount,<br>                                                rmNearestTiesToEven);<br>@@ -3388,15 +3377,16 @@ APFloat APFloat::getSmallest(const fltSe<br>}<br><br>APFloat APFloat::getSmallestNormalized(const fltSemantics &Sem, bool Negative) {<br>-  APFloat Val(Sem, fcNormal, Negative);<br>+  APFloat Val(Sem, uninitialized);<br><br>  // We want (in interchange format):<br>  //   sign = {Negative}<br>  //   exponent = 0..0<br>  //   significand = 10..0<br><br>-  Val.exponent = Sem.minExponent;<br>  Val.zeroSignificand();<br>+  Val.sign = Negative;<br>+  Val.exponent = Sem.minExponent;<br>  Val.significandParts()[partCountForBits(Sem.precision)-1] |=<br>    (((integerPart) 1) << ((Sem.precision - 1) % integerPartWidth));<br><br><br>Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=185095&r1=185094&r2=185095&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=185095&r1=185094&r2=185095&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)<br>+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Thu Jun 27 14:50:52 2013<br>@@ -2888,7 +2888,7 @@ Instruction *InstCombiner::FoldFCmp_IntT<br>  if (!LHSUnsigned) {<br>    // If the RHS value is > SignedMax, fold the comparison.  This handles +INF<br>    // and large values.<br>-    APFloat SMax(RHS.getSemantics(), APFloat::fcZero, false);<br>+    APFloat SMax(RHS.getSemantics());<br>    SMax.convertFromAPInt(APInt::getSignedMaxValue(IntWidth), true,<br>                          APFloat::rmNearestTiesToEven);<br>    if (SMax.compare(RHS) == APFloat::cmpLessThan) {  // smax < 13123.0<br>@@ -2900,7 +2900,7 @@ Instruction *InstCombiner::FoldFCmp_IntT<br>  } else {<br>    // If the RHS value is > UnsignedMax, fold the comparison. This handles<br>    // +INF and large values.<br>-    APFloat UMax(RHS.getSemantics(), APFloat::fcZero, false);<br>+    APFloat UMax(RHS.getSemantics());<br>    UMax.convertFromAPInt(APInt::getMaxValue(IntWidth), false,<br>                          APFloat::rmNearestTiesToEven);<br>    if (UMax.compare(RHS) == APFloat::cmpLessThan) {  // umax < 13123.0<br>@@ -2913,7 +2913,7 @@ Instruction *InstCombiner::FoldFCmp_IntT<br><br>  if (!LHSUnsigned) {<br>    // See if the RHS value is < SignedMin.<br>-    APFloat SMin(RHS.getSemantics(), APFloat::fcZero, false);<br>+    APFloat SMin(RHS.getSemantics());<br>    SMin.convertFromAPInt(APInt::getSignedMinValue(IntWidth), true,<br>                          APFloat::rmNearestTiesToEven);<br>    if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // smin > 12312.0<br>@@ -2924,7 +2924,7 @@ Instruction *InstCombiner::FoldFCmp_IntT<br>    }<br>  } else {<br>    // See if the RHS value is < UnsignedMin.<br>-    APFloat SMin(RHS.getSemantics(), APFloat::fcZero, false);<br>+    APFloat SMin(RHS.getSemantics());<br>    SMin.convertFromAPInt(APInt::getMinValue(IntWidth), true,<br>                          APFloat::rmNearestTiesToEven);<br>    if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // umin > 12312.0<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></div></body></html>