[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)
commit26af2a993a63e00ba5908121ff001c915e917289
treebc2cc6a544f1ac6278ebfd7f3d7d0f9e08edacfc
parenta2d25ac14a9555eb23207a7b4007302de9182d04
[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.

llvm-svn: 301094
llvm/include/llvm/ADT/APInt.h
llvm/include/llvm/ADT/APSInt.h
llvm/lib/Support/APInt.cpp
llvm/unittests/ADT/APIntTest.cpp