Lines Matching refs:getOperand
23 assert(I.getOperand(1)->getType() == I.getOperand(0)->getType()); in commonShiftTransforms()
24 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in commonShiftTransforms()
92 if (MaskedValueIsZero(I->getOperand(0), in CanEvaluateShifted()
95 return CanEvaluateTruncated(I->getOperand(0), Ty); in CanEvaluateShifted()
112 return CanEvaluateShifted(I->getOperand(0), NumBits, isLeftShift, IC) && in CanEvaluateShifted()
113 CanEvaluateShifted(I->getOperand(1), NumBits, isLeftShift, IC); in CanEvaluateShifted()
117 CI = dyn_cast<ConstantInt>(I->getOperand(1)); in CanEvaluateShifted()
132 if (MaskedValueIsZero(I->getOperand(0), in CanEvaluateShifted()
141 CI = dyn_cast<ConstantInt>(I->getOperand(1)); in CanEvaluateShifted()
156 if (MaskedValueIsZero(I->getOperand(0), in CanEvaluateShifted()
207 I->setOperand(0, GetShiftedValue(I->getOperand(0), NumBits,isLeftShift,IC)); in GetShiftedValue()
208 I->setOperand(1, GetShiftedValue(I->getOperand(1), NumBits,isLeftShift,IC)); in GetShiftedValue()
216 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in GetShiftedValue()
235 V = IC.Builder->CreateAnd(BO->getOperand(0), in GetShiftedValue()
257 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in GetShiftedValue()
275 V = IC.Builder->CreateAnd(I->getOperand(0), in GetShiftedValue()
294 I->setOperand(1, GetShiftedValue(I->getOperand(1), NumBits,isLeftShift,IC)); in GetShiftedValue()
295 I->setOperand(2, GetShiftedValue(I->getOperand(2), NumBits,isLeftShift,IC)); in GetShiftedValue()
347 if (Constant *BOOp = dyn_cast<Constant>(BO->getOperand(1))) in FoldShiftByConstant()
348 return BinaryOperator::CreateMul(BO->getOperand(0), in FoldShiftByConstant()
361 Instruction *TrOp = dyn_cast<Instruction>(TI->getOperand(0)); in FoldShiftByConstant()
368 isa<ConstantInt>(TrOp->getOperand(1))) { in FoldShiftByConstant()
416 if (isLeftShift && Op0BO->getOperand(1)->hasOneUse() && in FoldShiftByConstant()
417 match(Op0BO->getOperand(1), m_Shr(m_Value(V1), in FoldShiftByConstant()
420 Builder->CreateShl(Op0BO->getOperand(0), Op1, Op0BO->getName()); in FoldShiftByConstant()
423 Op0BO->getOperand(1)->getName()); in FoldShiftByConstant()
430 Value *Op0BOOp1 = Op0BO->getOperand(1); in FoldShiftByConstant()
436 Builder->CreateShl(Op0BO->getOperand(0), Op1, in FoldShiftByConstant()
448 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
449 match(Op0BO->getOperand(0), m_Shr(m_Value(V1), in FoldShiftByConstant()
452 Builder->CreateShl(Op0BO->getOperand(1), Op1, Op0BO->getName()); in FoldShiftByConstant()
455 Op0BO->getOperand(0)->getName()); in FoldShiftByConstant()
462 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
463 match(Op0BO->getOperand(0), in FoldShiftByConstant()
467 Builder->CreateShl(Op0BO->getOperand(1), Op1, Op0BO->getName()); in FoldShiftByConstant()
482 if (ConstantInt *Op0C = dyn_cast<ConstantInt>(Op0BO->getOperand(1))) { in FoldShiftByConstant()
513 Builder->CreateBinOp(I.getOpcode(), Op0BO->getOperand(0), Op1); in FoldShiftByConstant()
528 if (ShiftOp && isa<ConstantInt>(ShiftOp->getOperand(1))) { in FoldShiftByConstant()
542 ConstantInt *ShiftAmt1C = cast<ConstantInt>(ShiftOp->getOperand(1)); in FoldShiftByConstant()
547 Value *X = ShiftOp->getOperand(0); in FoldShiftByConstant()
678 if (Value *V = SimplifyShlInst(I.getOperand(0), I.getOperand(1), in visitShl()
686 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(I.getOperand(1))) { in visitShl()
691 MaskedValueIsZero(I.getOperand(0), in visitShl()
699 ComputeNumSignBits(I.getOperand(0)) > ShAmt) { in visitShl()
708 if (match(I.getOperand(0), m_OneUse(m_Shl(m_Constant(C1), m_Value(A)))) && in visitShl()
709 match(I.getOperand(1), m_Constant(C2))) in visitShl()
716 if (Value *V = SimplifyLShrInst(I.getOperand(0), I.getOperand(1), in visitLShr()
723 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitLShr()
756 if (Value *V = SimplifyAShrInst(I.getOperand(0), I.getOperand(1), in visitAShr()
763 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitAShr()
783 uint32_t SrcBits = ZI->getOperand(0)->getType()->getScalarSizeInBits(); in visitAShr()
786 return new SExtInst(ZI->getOperand(0), ZI->getType()); in visitAShr()