Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Op0

119   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
121 if (Value *V = SimplifyMulInst(Op0, Op1, TD))
128 return BinaryOperator::CreateNeg(Op0, I.getName());
163 if (Op0->hasOneUse() &&
164 match(Op0, m_Add(m_Value(X), m_ConstantInt(C1)))) {
178 if (Op0->hasOneUse()) {
181 if (match(Op0, m_Sub(m_Value(Y), m_Value(X))))
183 else if (match(Op0, m_Add(m_Value(Y), m_ConstantInt(C1))))
197 if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
201 if (isa<PHINode>(Op0))
206 if (Value *Op0v = dyn_castNegVal(Op0)) // -X * -Y = X*Y
214 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0);
218 Op1C = Op0;
251 return BinaryOperator::CreateAnd(Op0, Op1);
257 if (match(Op0, m_Shl(m_One(), m_Value(Y))))
260 return BinaryOperator::CreateShl(Op0, Y);
271 if (MaskedValueIsZero(Op0, Negative2))
272 BoolCast = Op0, OtherOp = Op1;
274 BoolCast = Op1, OtherOp = Op0;
404 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
406 if (isa<Constant>(Op0))
407 std::swap(Op0, Op1);
409 if (Value *V = SimplifyFMulInst(Op0, Op1, I.getFastMathFlags(), TD))
417 if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
421 if (isa<PHINode>(Op0))
431 if (isFMulOrFDivWithConstant(Op0)) {
432 Value *V = foldFMulConst(cast<Instruction>(Op0), C, &I);
438 Instruction *FAddSub = dyn_cast<Instruction>(Op0);
482 detectLog2OfHalf(Op0, OpY, Log2);
488 OpX = Op0;
504 Value *Opnd0 = Op0;
561 Value *LHS = Op0, *RHS = Op1;
575 Value *LHS = Op0, *RHS = Op1;
673 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
688 if (Instruction *LHS = dyn_cast<Instruction>(Op0))
699 if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
702 if (isa<PHINode>(Op0))
714 if (match(Op0, m_Sub(m_Value(X), m_Value(Z)))) { // (X - Z) / Y; Y = Op1
739 typedef Instruction *(*FoldUDivOperandCb)(Value *Op0, Value *Op1,
766 static Instruction *foldUDivPow2Cst(Value *Op0, Value *Op1,
770 Op0, ConstantInt::get(Op0->getType(), C.logBase2()));
776 static Instruction *foldUDivNegCst(Value *Op0, Value *Op1,
778 Value *ICI = IC.Builder->CreateICmpULT(Op0, cast<ConstantInt>(Op1));
785 static Instruction *foldUDivShl(Value *Op0, Value *Op1, const BinaryOperator &I,
798 BinaryOperator *LShr = BinaryOperator::CreateLShr(Op0, N);
807 static size_t visitUDivOperand(Value *Op0, Value *Op1, const BinaryOperator &I,
836 if (size_t LHSIdx = visitUDivOperand(Op0, SI->getOperand(1), I, Actions))
837 if (visitUDivOperand(Op0, SI->getOperand(2), I, Actions)) {
846 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
848 if (Value *V = SimplifyUDivInst(Op0, Op1, TD))
859 if (match(Op0, m_LShr(m_Value(X), m_ConstantInt(C1)))) {
866 if (ZExtInst *ZOp0 = dyn_cast<ZExtInst>(Op0))
874 if (visitUDivOperand(Op0, Op1, I, UDivActions))
880 Inst = Action(Op0, ActionOp1, I, *this);
907 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
909 if (Value *V = SimplifySDivInst(Op0, Op1, TD))
919 return BinaryOperator::CreateNeg(Op0);
926 return BinaryOperator::CreateExactAShr(Op0, ShAmt, I.getName());
930 if (SubOperator *Sub = dyn_cast<SubOperator>(Op0))
940 if (MaskedValueIsZero(Op0, Mask)) {
943 return BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
951 return BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
988 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
990 if (Value *V = SimplifyFDivInst(Op0, Op1, TD))
993 if (isa<Constant>(Op0))
1002 if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
1012 if (match(Op0, m_FMul(m_Value(X), m_ConstantFP(C1)))) {
1019 } else if (match(Op0, m_FDiv(m_Value(X), m_ConstantFP(C1)))) {
1039 if (Instruction *T = CvtFDivConstToReciprocal(Op0, Op1C, AllowReciprocal))
1045 if (AllowReassociate && isa<ConstantFP>(Op0)) {
1046 ConstantFP *C1 = cast<ConstantFP>(Op0), *C2;
1081 if (Op0->hasOneUse() && match(Op0, m_FDiv(m_Value(X), m_Value(Y)))) {
1091 if (!isa<ConstantFP>(Y) || !isa<ConstantFP>(Op0)) {
1092 NewInst = Builder->CreateFMul(Op0, Y);
1113 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
1126 if (Instruction *Op0I = dyn_cast<Instruction>(Op0)) {
1145 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
1147 if (Value *V = SimplifyURemInst(Op0, Op1, TD))
1154 if (ZExtInst *ZOp0 = dyn_cast<ZExtInst>(Op0))
1163 return BinaryOperator::CreateAnd(Op0, Add);
1167 if (match(Op0, m_One())) {
1168 Value *Cmp = Builder->CreateICmpNE(Op1, Op0);
1177 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
1179 if (Value *V = SimplifySRemInst(Op0, Op1, TD))
1200 if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) {
1202 return BinaryOperator::CreateURem(Op0, Op1, I.getName());
1248 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
1250 if (Value *V = SimplifyFRemInst(Op0, Op1, TD))