• Home
  • Raw
  • Download

Lines Matching refs:NumBits

70 static bool CanEvaluateShifted(Value *V, unsigned NumBits, bool isLeftShift,  in CanEvaluateShifted()  argument
86 if (CI->getZExtValue() == NumBits) { in CanEvaluateShifted()
114 return CanEvaluateShifted(I->getOperand(0), NumBits, isLeftShift, IC, I) && in CanEvaluateShifted()
115 CanEvaluateShifted(I->getOperand(1), NumBits, isLeftShift, IC, I); in CanEvaluateShifted()
126 if (CI->getValue() == NumBits) return true; in CanEvaluateShifted()
132 if (CI->getZExtValue() > NumBits) { in CanEvaluateShifted()
135 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits, in CanEvaluateShifted()
151 if (CI->getValue() == NumBits) return true; in CanEvaluateShifted()
157 if (CI->getValue().ult(TypeWidth) && CI->getZExtValue() > NumBits) { in CanEvaluateShifted()
158 unsigned LowBits = CI->getZExtValue() - NumBits; in CanEvaluateShifted()
160 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits, in CanEvaluateShifted()
169 return CanEvaluateShifted(SI->getTrueValue(), NumBits, isLeftShift, in CanEvaluateShifted()
171 CanEvaluateShifted(SI->getFalseValue(), NumBits, isLeftShift, IC, SI); in CanEvaluateShifted()
179 if (!CanEvaluateShifted(IncValue, NumBits, isLeftShift, in CanEvaluateShifted()
189 static Value *GetShiftedValue(Value *V, unsigned NumBits, bool isLeftShift, in GetShiftedValue() argument
194 V = IC.Builder->CreateShl(C, NumBits); in GetShiftedValue()
196 V = IC.Builder->CreateLShr(C, NumBits); in GetShiftedValue()
213 0, GetShiftedValue(I->getOperand(0), NumBits, isLeftShift, IC, DL)); in GetShiftedValue()
215 1, GetShiftedValue(I->getOperand(1), NumBits, isLeftShift, IC, DL)); in GetShiftedValue()
228 unsigned NewShAmt = NumBits+CI->getZExtValue(); in GetShiftedValue()
240 if (CI->getValue() == NumBits) { in GetShiftedValue()
241 APInt Mask(APInt::getLowBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue()
253 assert(CI->getZExtValue() > NumBits); in GetShiftedValue()
255 CI->getZExtValue() - NumBits)); in GetShiftedValue()
269 unsigned NewShAmt = NumBits+CI->getZExtValue(); in GetShiftedValue()
280 if (CI->getValue() == NumBits) { in GetShiftedValue()
281 APInt Mask(APInt::getHighBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue()
293 assert(CI->getZExtValue() > NumBits); in GetShiftedValue()
295 CI->getZExtValue() - NumBits)); in GetShiftedValue()
302 1, GetShiftedValue(I->getOperand(1), NumBits, isLeftShift, IC, DL)); in GetShiftedValue()
304 2, GetShiftedValue(I->getOperand(2), NumBits, isLeftShift, IC, DL)); in GetShiftedValue()
312 PN->setIncomingValue(i, GetShiftedValue(PN->getIncomingValue(i), NumBits, in GetShiftedValue()