APInt hasn't acquired an in place ashr yet, but hopefully soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301052
91177308-0d34-0410-b5e6-
96231b3b80d8
return IsUnsigned ? APSInt(lshr(Amt), true) : APSInt(ashr(Amt), false);
}
APSInt& operator>>=(unsigned Amt) {
- *this = *this >> Amt;
+ if (IsUnsigned)
+ lshrInPlace(Amt);
+ else
+ *this = *this >> Amt;
return *this;
}
return APSInt(static_cast<const APInt&>(*this) << Bits, IsUnsigned);
}
APSInt& operator<<=(unsigned Amt) {
- *this = *this << Amt;
+ static_cast<APInt&>(*this) <<= Amt;
return *this;
}