Home | History | Annotate | Download | only in ADT

Lines Matching refs:ShiftAmt

199   void shlSlowCase(unsigned ShiftAmt);
202 void lshrSlowCase(unsigned ShiftAmt);
205 void ashrSlowCase(unsigned ShiftAmt);
890 /// Shifts *this left by shiftAmt and assigns the result to *this.
892 /// \returns *this after shifting left by ShiftAmt
893 APInt &operator<<=(unsigned ShiftAmt) {
894 assert(ShiftAmt <= BitWidth && "Invalid shift amount");
896 if (ShiftAmt == BitWidth)
899 U.VAL <<= ShiftAmt;
902 shlSlowCase(ShiftAmt);
908 /// Shifts *this left by shiftAmt and assigns the result to *this.
910 /// \returns *this after shifting left by ShiftAmt
911 APInt &operator<<=(const APInt &ShiftAmt);
934 /// Arithmetic right-shift this APInt by shiftAmt.
935 APInt ashr(unsigned ShiftAmt) const {
937 R.ashrInPlace(ShiftAmt);
941 /// Arithmetic right-shift this APInt by ShiftAmt in place.
942 void ashrInPlace(unsigned ShiftAmt) {
943 assert(ShiftAmt <= BitWidth && "Invalid shift amount");
946 if (ShiftAmt == BitWidth)
949 U.VAL = SExtVAL >> ShiftAmt;
953 ashrSlowCase(ShiftAmt);
958 /// Logical right-shift this APInt by shiftAmt.
959 APInt lshr(unsigned shiftAmt) const {
961 R.lshrInPlace(shiftAmt);
965 /// Logical right-shift this APInt by ShiftAmt in place.
966 void lshrInPlace(unsigned ShiftAmt) {
967 assert(ShiftAmt <= BitWidth && "Invalid shift amount");
969 if (ShiftAmt == BitWidth)
972 U.VAL >>= ShiftAmt;
975 lshrSlowCase(ShiftAmt);
980 /// Left-shift this APInt by shiftAmt.
981 APInt shl(unsigned shiftAmt) const {
983 R <<= shiftAmt;
995 /// Arithmetic right-shift this APInt by shiftAmt.
996 APInt ashr(const APInt &ShiftAmt) const {
998 R.ashrInPlace(ShiftAmt);
1002 /// Arithmetic right-shift this APInt by shiftAmt in place.
1003 void ashrInPlace(const APInt &shiftAmt);
1007 /// Logical right-shift this APInt by shiftAmt.
1008 APInt lshr(const APInt &ShiftAmt) const {
1010 R.lshrInPlace(ShiftAmt);
1014 /// Logical right-shift this APInt by ShiftAmt in place.
1015 void lshrInPlace(const APInt &ShiftAmt);
1019 /// Left-shift this APInt by shiftAmt.
1020 APInt shl(const APInt &ShiftAmt) const {
1022 R <<= ShiftAmt;