]> granicus.if.org Git - llvm/commit
[APInt] Add ashrInPlace method and implement ashr using it. Also fix a bug in the...
authorCraig Topper <craig.topper@gmail.com>
Sat, 22 Apr 2017 22:00:03 +0000 (22:00 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 22 Apr 2017 22:00:03 +0000 (22:00 +0000)
commit0d0472f857d4ea00a992e1d9113537bd3e6a01e5
tree14c0697e2ec5862a907f7b3a77a1547cf9b1060e
parent702614a330c01f746c7a2d01328f639dd72fb5bb
[APInt] Add ashrInPlace method and implement ashr using it. Also fix a bug in the shift by BitWidth handling.

For single word, shift by BitWidth was always returning 0, but for multiword it was based on original sign. Now single word matches multi word.

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