[llvm-commits] CVS: llvm/lib/Support/APInt.cpp

Reid Spencer reid at x10sys.com
Tue Feb 27 17:30:24 PST 2007



Changes in directory llvm/lib/Support:

APInt.cpp updated: 1.57 -> 1.58
---
Log message:

Fix a bug in RoundDoubleToAPInt where it would force the size to 64 bits
instead of honoring the client's requested bit width.


---
Diffs of the changes:  (+1 -1)

 APInt.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.57 llvm/lib/Support/APInt.cpp:1.58
--- llvm/lib/Support/APInt.cpp:1.57	Tue Feb 27 17:49:07 2007
+++ llvm/lib/Support/APInt.cpp	Tue Feb 27 19:30:08 2007
@@ -808,7 +808,7 @@
 
   // If the exponent is negative, the value is < 0 so just return 0.
   if (exp < 0)
-    return APInt(64u, 0u);
+    return APInt(width, 0u);
 
   // Extract the mantissa by clearing the top 12 bits (sign + exponent).
   uint64_t mantissa = (T.I & (~0ULL >> 12)) | 1ULL << 52;






More information about the llvm-commits mailing list