[APInt] Make behavior of ashr by BitWidth consistent between single and multi word.
authorCraig Topper <craig.topper@gmail.com>
Mon, 24 Apr 2017 05:38:26 +0000 (05:38 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 24 Apr 2017 05:38:26 +0000 (05:38 +0000)
commitfc03d2d21f9f364b2d5ab41f42625a1c98eab351
treed30fb88f74ee5aace8857b28b2ad021ba79f544d
parent4bac44c8054f30ace47088d7a22e992c02e6c12b
[APInt] Make behavior of ashr by BitWidth consistent between single and multi word.

Previously single word would always return 0 regardless of the original sign. Multi word would return all 0s or all 1s based on the original sign. Now single word takes into account the sign as well.

llvm-svn: 301159
llvm/lib/Support/APInt.cpp
llvm/unittests/ADT/APIntTest.cpp