Lines Matching refs:isLeftShift

70 static bool CanEvaluateShifted(Value *V, unsigned NumBits, bool isLeftShift,  in CanEvaluateShifted()  argument
84 if ((isLeftShift && match(I, m_LShr(m_Value(), m_ConstantInt(CI)))) || in CanEvaluateShifted()
85 (!isLeftShift && match(I, m_Shl(m_Value(), m_ConstantInt(CI))))) { 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()
123 if (isLeftShift) return true; in CanEvaluateShifted()
148 if (!isLeftShift) return true; 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
193 if (isLeftShift) 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()
226 if (isLeftShift) { in GetShiftedValue()
267 if (!isLeftShift) { 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()
313 isLeftShift, IC, DL)); in GetShiftedValue()
323 bool isLeftShift = I.getOpcode() == Instruction::Shl; in FoldShiftByConstant() local
339 CanEvaluateShifted(Op0, COp1->getZExtValue(), isLeftShift, *this, &I)) { in FoldShiftByConstant()
344 I, GetShiftedValue(Op0, COp1->getZExtValue(), isLeftShift, *this, DL)); in FoldShiftByConstant()
356 if (BO->getOpcode() == Instruction::Mul && isLeftShift) in FoldShiftByConstant()
426 if (isLeftShift && Op0BO->getOperand(1)->hasOneUse() && in FoldShiftByConstant()
445 if (isLeftShift && Op0BOOp1->hasOneUse() && in FoldShiftByConstant()
462 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
480 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
507 isValid = isLeftShift; in FoldShiftByConstant()