Lines Matching refs:ShiftAmt
1030 /// Arithmetic right-shift this APInt by shiftAmt.
1032 APInt APInt::ashr(const APInt &shiftAmt) const {
1033 return ashr((unsigned)shiftAmt.getLimitedValue(BitWidth));
1036 /// Arithmetic right-shift this APInt by shiftAmt.
1038 APInt APInt::ashr(unsigned shiftAmt) const {
1039 assert(shiftAmt <= BitWidth && "Invalid shift amount");
1041 if (shiftAmt == 0)
1046 if (shiftAmt == BitWidth)
1051 (((int64_t(VAL) << SignBit) >> SignBit) >> shiftAmt));
1058 if (shiftAmt == BitWidth) {
1069 unsigned wordShift = shiftAmt % APINT_BITS_PER_WORD; // bits to shift per word
1070 unsigned offset = shiftAmt / APINT_BITS_PER_WORD; // word offset for shift
1119 /// Logical right-shift this APInt by shiftAmt.
1121 APInt APInt::lshr(const APInt &shiftAmt) const {
1122 return lshr((unsigned)shiftAmt.getLimitedValue(BitWidth));
1125 /// Logical right-shift this APInt by shiftAmt.
1127 APInt APInt::lshr(unsigned shiftAmt) const {
1129 if (shiftAmt >= BitWidth)
1132 return APInt(BitWidth, this->VAL >> shiftAmt);
1138 if (shiftAmt >= BitWidth)
1144 if (shiftAmt == 0)
1151 if (shiftAmt < APINT_BITS_PER_WORD) {
1152 lshrNear(val, pVal, getNumWords(), shiftAmt);
1157 unsigned wordShift = shiftAmt % APINT_BITS_PER_WORD;
1158 unsigned offset = shiftAmt / APINT_BITS_PER_WORD;
1183 /// Left-shift this APInt by shiftAmt.
1185 APInt APInt::shl(const APInt &shiftAmt) const {
1187 return shl((unsigned)shiftAmt.getLimitedValue(BitWidth));
1190 APInt APInt::shlSlowCase(unsigned shiftAmt) const {
1194 if (shiftAmt == BitWidth)
1200 if (shiftAmt == 0)
1207 if (shiftAmt < APINT_BITS_PER_WORD) {
1210 val[i] = pVal[i] << shiftAmt | carry;
1211 carry = pVal[i] >> (APINT_BITS_PER_WORD - shiftAmt);
1217 unsigned wordShift = shiftAmt % APINT_BITS_PER_WORD;
1218 unsigned offset = shiftAmt / APINT_BITS_PER_WORD;
2217 unsigned ShiftAmt = (Radix == 16 ? 4 : (Radix == 8 ? 3 : 1));
2223 Tmp = Tmp.lshr(ShiftAmt);