Lines Matching refs:Op0
23 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in commonShiftTransforms() local
30 if (isa<Constant>(Op0)) in commonShiftTransforms()
36 if (Instruction *Res = FoldShiftByConstant(Op0, CUI, I)) in commonShiftTransforms()
302 Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1, in FoldShiftByConstant() argument
310 CanEvaluateShifted(Op0, Op1->getZExtValue(), isLeftShift, *this)) { in FoldShiftByConstant()
312 " to eliminate shift:\n IN: " << *Op0 << "\n SH: " << I <<"\n"); in FoldShiftByConstant()
315 GetShiftedValue(Op0, Op1->getZExtValue(), isLeftShift, *this)); in FoldShiftByConstant()
321 uint32_t TypeBits = Op0->getType()->getScalarSizeInBits(); in FoldShiftByConstant()
328 return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType())); in FoldShiftByConstant()
335 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0)) in FoldShiftByConstant()
342 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in FoldShiftByConstant()
345 if (isa<PHINode>(Op0)) in FoldShiftByConstant()
350 if (TruncInst *TI = dyn_cast<TruncInst>(Op0)) { in FoldShiftByConstant()
393 if (Op0->hasOneUse()) { in FoldShiftByConstant()
394 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) { in FoldShiftByConstant()
517 BinaryOperator *ShiftOp = dyn_cast<BinaryOperator>(Op0); in FoldShiftByConstant()
666 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitLShr() local
671 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Op0)) { in visitLShr()
672 unsigned BitWidth = Op0->getType()->getScalarSizeInBits(); in visitLShr()
681 Constant *RHS = ConstantInt::getSigned(Op0->getType(), isCtPop ? -1:0); in visitLShr()
689 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt))){ in visitLShr()
706 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitAShr() local
714 if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1)))) { in visitAShr()
717 if (cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap()) in visitAShr()
735 MaskedValueIsZero(Op0,APInt::getLowBitsSet(Op1C->getBitWidth(),ShAmt))){ in visitAShr()
742 if (MaskedValueIsZero(Op0, in visitAShr()
744 return BinaryOperator::CreateLShr(Op0, Op1); in visitAShr()
747 unsigned NumSignBits = ComputeNumSignBits(Op0); in visitAShr()
748 if (NumSignBits == Op0->getType()->getScalarSizeInBits()) in visitAShr()
749 return ReplaceInstUsesWith(I, Op0); in visitAShr()