git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151385
91177308-0d34-0410-b5e6-
96231b3b80d8
/// @brief Logical right-shift function.
APInt APInt::lshr(unsigned shiftAmt) const {
if (isSingleWord()) {
/// @brief Logical right-shift function.
APInt APInt::lshr(unsigned shiftAmt) const {
if (isSingleWord()) {
- if (shiftAmt == BitWidth)
+ if (shiftAmt >= BitWidth)
return APInt(BitWidth, 0);
else
return APInt(BitWidth, this->VAL >> shiftAmt);
return APInt(BitWidth, 0);
else
return APInt(BitWidth, this->VAL >> shiftAmt);