Lines Matching defs:Cmp0
653 Value *InstCombinerImpl::simplifyRangeCheck(ICmpInst *Cmp0, ICmpInst *Cmp1,
657 ConstantInt *RangeStart = dyn_cast<ConstantInt>(Cmp0->getOperand(1));
661 ICmpInst::Predicate Pred0 = (Inverted ? Cmp0->getInversePredicate() :
662 Cmp0->getPredicate());
672 Value *Input = Cmp0->getOperand(0);
910 static Value *foldIsPowerOf2OrZero(ICmpInst *Cmp0, ICmpInst *Cmp1, bool IsAnd,
914 if (!match(Cmp0, m_ICmp(Pred0, m_Intrinsic<Intrinsic::ctpop>(m_Value(X)),
919 Value *CtPop = Cmp0->getOperand(0);
931 static Value *foldIsPowerOf2(ICmpInst *Cmp0, ICmpInst *Cmp1, bool JoinedByAnd,
936 std::swap(Cmp0, Cmp1);
938 std::swap(Cmp0, Cmp1);
943 if (JoinedByAnd && match(Cmp0, m_ICmp(Pred0, m_Value(X), m_ZeroInt())) &&
954 if (!JoinedByAnd && match(Cmp0, m_ICmp(Pred0, m_Value(X), m_ZeroInt())) &&
1038 static Value *foldPowerOf2AndShiftedMask(ICmpInst *Cmp0, ICmpInst *Cmp1,
1044 ICmpInst::Predicate CmpPred0 = Cmp0->getPredicate(),
1050 getMaskedTypeForICmpPair(A, B, C, D, E, Cmp0, Cmp1, CmpPred0, CmpPred1);
1148 Value *InstCombinerImpl::foldEqOfParts(ICmpInst *Cmp0, ICmpInst *Cmp1,
1150 if (!Cmp0->hasOneUse() || !Cmp1->hasOneUse())
1184 std::optional<IntPart> L0 = GetMatchPart(Cmp0, 0);
1185 std::optional<IntPart> R0 = GetMatchPart(Cmp0, 1);
1220 /// Cmp0/Cmp1 switched to handle logic op commutativity.
1221 static Value *foldAndOrOfICmpsWithConstEq(ICmpInst *Cmp0, ICmpInst *Cmp1,
1225 // Match an equality compare with a non-poison constant as Cmp0.
1230 if (!match(Cmp0, m_ICmp(Pred0, m_Value(X), m_Constant(C))) ||
1259 return IsAnd ? Builder.CreateLogicalAnd(Cmp0, SubstituteCmp)
1260 : Builder.CreateLogicalOr(Cmp0, SubstituteCmp);
1261 return Builder.CreateBinOp(IsAnd ? Instruction::And : Instruction::Or, Cmp0,