APInt's countLeadingOnes() was broken for negative i128 values,
authorTorok Edwin <edwintorok@gmail.com>
Tue, 27 Jan 2009 18:06:03 +0000 (18:06 +0000)
committerTorok Edwin <edwintorok@gmail.com>
Tue, 27 Jan 2009 18:06:03 +0000 (18:06 +0000)
commit2d0f1c57c3f95e43a8b18bfe8481d90b665d5efe
tree72e1a5c7d8ff8f4caa92d81768de94e6e64bacb1
parent101a90f3d3c3ad9159676ba744b59b3a9d0b4af5
APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63107 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/APInt.cpp
unittests/ADT/APInt.cpp