Lines Matching defs:Op1
101 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
103 if (Value *V = SimplifyMulInst(Op0, Op1, TD))
109 if (match(Op1, m_AllOnes())) // X * -1 == 0 - X
112 if (ConstantInt *CI = dyn_cast<ConstantInt>(Op1)) {
164 if (isa<Constant>(Op1)) {
176 if (Value *Op1v = dyn_castNegVal(Op1))
182 Value *Op1C = Op1;
188 BO = dyn_cast<BinaryOperator>(Op1);
220 return BinaryOperator::CreateAnd(Op0, Op1);
227 return BinaryOperator::CreateShl(Op1, Y);
228 if (match(Op1, m_Shl(m_One(), m_Value(Y))))
241 BoolCast = Op0, OtherOp = Op1;
242 else if (MaskedValueIsZero(Op1, Negative2))
243 BoolCast = Op1, OtherOp = Op0;
257 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
260 if (Constant *Op1C = dyn_cast<Constant>(Op1)) {
288 if (Value *Op1v = dyn_castFNegVal(Op1))
371 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
381 if (isa<SelectInst>(Op1) && SimplifyDivRemOfSelect(I))
384 if (ConstantInt *RHS = dyn_cast<ConstantInt>(Op1)) {
412 if (match(Op0, m_Sub(m_Value(X), m_Value(Z)))) { // (X - Z) / Y; Y = Op1
414 if ((isSigned && match(Z, m_SRem(m_Specific(X), m_Specific(Op1)))) ||
415 (!isSigned && match(Z, m_URem(m_Specific(X), m_Specific(Op1)))))
416 return BinaryOperator::Create(I.getOpcode(), X, Op1);
436 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
438 if (Value *V = SimplifyUDivInst(Op0, Op1, TD))
445 if (ConstantInt *C = dyn_cast<ConstantInt>(Op1)) {
467 if (match(Op1, m_Shl(m_Power2(CI), m_Value(N)))) {
479 if (match(Op1, m_Select(m_Value(Cond), m_Power2(C1), m_Power2(C2)))) {
481 Value *TSI = Builder->CreateLShr(Op0, C1->logBase2(), Op1->getName()+".t",
485 Value *FSI = Builder->CreateLShr(Op0, C2->logBase2(), Op1->getName()+".f",
495 if (Value *ZOp1 = dyn_castZExtVal(Op1, ZOp0->getSrcTy()))
504 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
506 if (Value *V = SimplifySDivInst(Op0, Op1, TD))
513 if (ConstantInt *RHS = dyn_cast<ConstantInt>(Op1)) {
538 if (MaskedValueIsZero(Op1, Mask)) {
540 return BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
543 if (match(Op1, m_Shl(m_Power2(), m_Value()))) {
548 return BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
557 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
559 if (Value *V = SimplifyFDivInst(Op0, Op1, TD))
562 if (ConstantFP *Op1C = dyn_cast<ConstantFP>(Op1)) {
582 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
591 if (isa<SelectInst>(Op1) && SimplifyDivRemOfSelect(I))
594 if (isa<ConstantInt>(Op1)) {
614 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
616 if (Value *V = SimplifyURemInst(Op0, Op1, TD))
624 if (match(Op1, m_Power2(C)))
630 if (match(Op1, m_Shl(m_Power2(), m_Value()))) {
632 Value *Add = Builder->CreateAdd(Op1, N1);
640 if (match(Op1, m_Select(m_Value(Cond), m_Power2(C1), m_Power2(C2)))) {
641 Value *TrueAnd = Builder->CreateAnd(Op0, *C1-1, Op1->getName()+".t");
642 Value *FalseAnd = Builder->CreateAnd(Op0, *C2-1, Op1->getName()+".f");
649 if (Value *ZOp1 = dyn_castZExtVal(Op1, ZOp0->getSrcTy()))
657 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
659 if (Value *V = SimplifySRemInst(Op0, Op1, TD))
666 if (Value *RHSNeg = dyn_castNegVal(Op1))
680 if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) {
682 return BinaryOperator::CreateURem(Op0, Op1, I.getName());
687 if (ConstantVector *RHSV = dyn_cast<ConstantVector>(Op1)) {
720 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
722 if (Value *V = SimplifyFRemInst(Op0, Op1, TD))
726 if (isa<SelectInst>(Op1) && SimplifyDivRemOfSelect(I))