APInt hasn't acquired an in place ashr yet, but hopefully soon.
llvm-svn: 301052
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;
}