Changes in directory llvm/include/llvm/ADT:

APInt.h updated: 1.39 -> 1.40
---
Log message:

Correct the calculation in APInt::logBase2().


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

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


Index: llvm/include/llvm/ADT/APInt.h
diff -u llvm/include/llvm/ADT/APInt.h:1.39 llvm/include/llvm/ADT/APInt.h:1.40
--- llvm/include/llvm/ADT/APInt.h:1.39  Sat Mar  3 02:34:02 2007
+++ llvm/include/llvm/ADT/APInt.h       Mon Mar  5 10:42:58 2007
@@ -697,7 +697,7 @@
 
   /// @returns the floor log base 2 of this APInt.
   inline uint32_t logBase2() const {
-    return getNumWords() * APINT_BITS_PER_WORD - 1 - countLeadingZeros();
+    return BitWidth - 1 - countLeadingZeros();
   }
 
   /// @brief Converts this APInt to a double value.



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to