[APInt] Fix nearestLogBase2 to return correct answers for very large APInt and APInt...
authorMichael Gottesman <mgottesman@apple.com>
Sun, 19 Jan 2014 20:33:48 +0000 (20:33 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Sun, 19 Jan 2014 20:33:48 +0000 (20:33 +0000)
commit7320de5ce2f440190caab6a248c6c207bb3003d1
tree5593b90e41bec506cc3532e48c558a1c0492e50f
parente7413972a42ebb9ff63df448cc1ed40ff7a6d20d
[APInt] Fix nearestLogBase2 to return correct answers for very large APInt and APInt with a bitwidth of 1.

I also improved the comments, added some more tests, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199610 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h
unittests/ADT/APIntTest.cpp