Lines Matching refs:BO0

4074   BinaryOperator *BO0 = dyn_cast<BinaryOperator>(Op0);  in foldICmpBinOp()  local
4076 if (!BO0 && !BO1) in foldICmpBinOp()
4141 if (BO0 && isa<OverflowingBinaryOperator>(BO0)) in foldICmpBinOp()
4144 (CmpInst::isUnsigned(Pred) && BO0->hasNoUnsignedWrap()) || in foldICmpBinOp()
4145 (CmpInst::isSigned(Pred) && BO0->hasNoSignedWrap()); in foldICmpBinOp()
4155 if (BO0 && BO0->getOpcode() == Instruction::Add) { in foldICmpBinOp()
4156 A = BO0->getOperand(0); in foldICmpBinOp()
4157 B = BO0->getOperand(1); in foldICmpBinOp()
4271 (BO0->hasOneUse() || BO1->hasOneUse()) && !I.isUnsigned()) { in foldICmpBinOp()
4281 bool HasNUW = BO0->hasNoUnsignedWrap() && Diff.ule(*AP1); in foldICmpBinOp()
4282 bool HasNSW = BO0->hasNoSignedWrap(); in foldICmpBinOp()
4283 Constant *C3 = Constant::getIntegerValue(BO0->getType(), Diff); in foldICmpBinOp()
4290 Constant *C3 = Constant::getIntegerValue(BO0->getType(), Diff); in foldICmpBinOp()
4310 if (BO0 && BO0->getOpcode() == Instruction::Sub) { in foldICmpBinOp()
4311 A = BO0->getOperand(0); in foldICmpBinOp()
4312 B = BO0->getOperand(1); in foldICmpBinOp()
4353 if (match(BO0, m_Neg(m_Value(X)))) in foldICmpBinOp()
4368 (BO0 && BO1 && BO0->hasNoSignedWrap() && BO1->hasNoSignedWrap()) || in foldICmpBinOp()
4369 (BO0 && BO1 && BO0->hasNoUnsignedWrap() && BO1->hasNoUnsignedWrap())) in foldICmpBinOp()
4375 if (BO0 && BO0->getOpcode() == Instruction::SRem && Op1 == BO0->getOperand(1)) in foldICmpBinOp()
4376 SRem = BO0; in foldICmpBinOp()
4384 switch (SRem == BO0 ? ICmpInst::getSwappedPredicate(Pred) : Pred) { in foldICmpBinOp()
4402 if (BO0 && BO1 && BO0->getOpcode() == BO1->getOpcode() && BO0->hasOneUse() && in foldICmpBinOp()
4403 BO1->hasOneUse() && BO0->getOperand(1) == BO1->getOperand(1)) { in foldICmpBinOp()
4404 switch (BO0->getOpcode()) { in foldICmpBinOp()
4411 return new ICmpInst(Pred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4414 if (match(BO0->getOperand(1), m_APInt(C))) { in foldICmpBinOp()
4418 return new ICmpInst(NewPred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4422 if (BO0->getOpcode() == Instruction::Xor && C->isMaxSignedValue()) { in foldICmpBinOp()
4425 return new ICmpInst(NewPred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4435 if (match(BO0->getOperand(1), m_APInt(C)) && !C->isZero() && in foldICmpBinOp()
4441 BO0->getType(), in foldICmpBinOp()
4443 Value *And1 = Builder.CreateAnd(BO0->getOperand(0), Mask); in foldICmpBinOp()
4452 if (I.isSigned() || !BO0->isExact() || !BO1->isExact()) in foldICmpBinOp()
4454 return new ICmpInst(Pred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4457 if (!I.isEquality() || !BO0->isExact() || !BO1->isExact()) in foldICmpBinOp()
4459 return new ICmpInst(Pred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4462 if (!BO0->isExact() || !BO1->isExact()) in foldICmpBinOp()
4464 return new ICmpInst(Pred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4467 bool NUW = BO0->hasNoUnsignedWrap() && BO1->hasNoUnsignedWrap(); in foldICmpBinOp()
4468 bool NSW = BO0->hasNoSignedWrap() && BO1->hasNoSignedWrap(); in foldICmpBinOp()
4473 return new ICmpInst(Pred, BO0->getOperand(0), BO1->getOperand(0)); in foldICmpBinOp()
4478 if (BO0) { in foldICmpBinOp()
4483 if (match(BO0, BitwiseAnd) && Pred == ICmpInst::ICMP_ULT) { in foldICmpBinOp()
4484 auto *Zero = Constant::getNullValue(BO0->getType()); in foldICmpBinOp()