Lines Matching refs:Pred

90   CmpInst::Predicate Pred;  member
95 : Pred(CmpInst::BAD_ICMP_PREDICATE), Op0(nullptr), Op1(nullptr) {} in ConditionTy()
96 ConditionTy(CmpInst::Predicate Pred, Value *Op0, Value *Op1) in ConditionTy()
97 : Pred(Pred), Op0(Op0), Op1(Op1) {} in ConditionTy()
138 FactOrCheck(DomTreeNode *DTN, CmpInst::Predicate Pred, Value *Op0, Value *Op1, in FactOrCheck()
140 : Cond(Pred, Op0, Op1), DoesHold(Precond), NumIn(DTN->getDFSNumIn()), in FactOrCheck()
143 static FactOrCheck getConditionFact(DomTreeNode *DTN, CmpInst::Predicate Pred, in getConditionFact()
146 return FactOrCheck(DTN, Pred, Op0, Op1, Precond); in getConditionFact()
306 bool doesHold(CmpInst::Predicate Pred, Value *A, Value *B) const;
308 void addFact(CmpInst::Predicate Pred, Value *A, Value *B, unsigned NumIn,
315 ConstraintTy getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1,
325 ConstraintTy getConstraintForSolving(CmpInst::Predicate Pred, Value *Op0,
330 void transferToOtherSystem(CmpInst::Predicate Pred, Value *A, Value *B,
602 ConstraintInfo::getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1, in getConstraint() argument
609 switch (Pred) { in getConstraint()
614 Pred = CmpInst::getSwappedPredicate(Pred); in getConstraint()
620 Pred = CmpInst::ICMP_ULE; in getConstraint()
623 Pred = CmpInst::ICMP_ULE; in getConstraint()
628 Pred = CmpInst::getSwappedPredicate(CmpInst::ICMP_UGT); in getConstraint()
632 Pred = CmpInst::ICMP_ULE; in getConstraint()
639 if (Pred != CmpInst::ICMP_ULE && Pred != CmpInst::ICMP_ULT && in getConstraint()
640 Pred != CmpInst::ICMP_SLE && Pred != CmpInst::ICMP_SLT) in getConstraint()
644 bool IsSigned = CmpInst::isSigned(Pred); in getConstraint()
704 if (Pred == (IsSigned ? CmpInst::ICMP_SLT : CmpInst::ICMP_ULT)) in getConstraint()
733 ConstraintTy ConstraintInfo::getConstraintForSolving(CmpInst::Predicate Pred, in getConstraintForSolving() argument
739 if ((Pred == CmpInst::ICMP_ULE && Op0 == NullC) || in getConstraintForSolving()
740 (Pred == CmpInst::ICMP_UGE && Op1 == NullC)) { in getConstraintForSolving()
750 if (CmpInst::isSigned(Pred) && in getConstraintForSolving()
753 Pred = CmpInst::getUnsignedPredicate(Pred); in getConstraintForSolving()
756 ConstraintTy R = getConstraint(Pred, Op0, Op1, NewVariables); in getConstraintForSolving()
765 return Info.doesHold(C.Pred, C.Op0, C.Op1); in isValid()
813 bool ConstraintInfo::doesHold(CmpInst::Predicate Pred, Value *A, in doesHold() argument
815 auto R = getConstraintForSolving(Pred, A, B); in doesHold()
821 CmpInst::Predicate Pred, Value *A, Value *B, unsigned NumIn, in transferToOtherSystem() argument
834 switch (Pred) { in transferToOtherSystem()
843 addFact(CmpInst::getSignedPredicate(Pred), A, B, NumIn, NumOut, in transferToOtherSystem()
853 addFact(CmpInst::getSignedPredicate(Pred), A, B, NumIn, NumOut, in transferToOtherSystem()
894 CmpInst::Predicate Pred; in addInfoForInductions() local
897 m_Br(m_ICmp(Pred, m_Value(A), m_Value(B)), m_Value(), m_Value()))) in addInfoForInductions()
901 Pred = CmpInst::getSwappedPredicate(Pred); in addInfoForInductions()
911 if (Pred == CmpInst::ICMP_NE) in addInfoForInductions()
913 else if (Pred == CmpInst::ICMP_EQ) in addInfoForInductions()
1044 CmpInst::Predicate Pred; in addInfoFor() local
1045 if (!match(I.getOperand(0), m_ICmp(Pred, m_Value(A), m_Value(B)))) in addInfoFor()
1051 DT.getNode(I.getParent()), Pred, A, B)); in addInfoFor()
1161 static void dumpUnpackedICmp(raw_ostream &OS, ICmpInst::Predicate Pred, in dumpUnpackedICmp() argument
1163 OS << "icmp " << Pred << ' '; in dumpUnpackedICmp()
1176 ICmpInst::Predicate Pred; member
1180 ReproducerEntry(ICmpInst::Predicate Pred, Value *LHS, Value *RHS) in ReproducerEntry()
1181 : Pred(Pred), LHS(LHS), RHS(RHS) {} in ReproducerEntry()
1235 if (Entry.Pred != ICmpInst::BAD_ICMP_PREDICATE) in generateReproducer()
1236 CollectArguments({Entry.LHS, Entry.RHS}, ICmpInst::isSigned(Entry.Pred)); in generateReproducer()
1299 if (Entry.Pred == ICmpInst::BAD_ICMP_PREDICATE) in generateReproducer()
1303 dumpUnpackedICmp(dbgs(), Entry.Pred, Entry.LHS, Entry.RHS); in generateReproducer()
1305 CloneInstructions({Entry.LHS, Entry.RHS}, CmpInst::isSigned(Entry.Pred)); in generateReproducer()
1307 auto *Cmp = Builder.CreateICmp(Entry.Pred, Entry.LHS, Entry.RHS); in generateReproducer()
1320 static std::optional<bool> checkCondition(CmpInst::Predicate Pred, Value *A, in checkCondition() argument
1325 auto R = Info.getConstraintForSolving(Pred, A, B); in checkCondition()
1350 dbgs(), *ImpliedCondition ? Pred : CmpInst::getInversePredicate(Pred), in checkCondition()
1421 CmpInst::Predicate Pred; in checkOrAndOpImpliedByOther() local
1434 m_ICmp(Pred, m_Value(A), m_Value(B)))) in checkOrAndOpImpliedByOther()
1440 Pred = CmpInst::getInversePredicate(Pred); in checkOrAndOpImpliedByOther()
1444 Info.addFact(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack); in checkOrAndOpImpliedByOther()
1474 void ConstraintInfo::addFact(CmpInst::Predicate Pred, Value *A, Value *B, in addFact() argument
1480 auto R = getConstraint(Pred, A, B, NewVariables); in addFact()
1486 LLVM_DEBUG(dbgs() << "Adding '"; dumpUnpackedICmp(dbgs(), Pred, A, B); in addFact()
1572 auto DoesConditionHold = [](CmpInst::Predicate Pred, Value *A, Value *B, in tryToSimplifyOverflowMath()
1574 auto R = Info.getConstraintForSolving(Pred, A, B); in tryToSimplifyOverflowMath()
1702 auto AddFact = [&](CmpInst::Predicate Pred, Value *A, Value *B) { in eliminateConstraints() argument
1704 dumpUnpackedICmp(dbgs(), Pred, A, B); dbgs() << "\n"); in eliminateConstraints()
1705 if (Info.getCS(CmpInst::isSigned(Pred)).size() > MaxRows) { in eliminateConstraints()
1712 Info.addFact(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack); in eliminateConstraints()
1714 ReproducerCondStack.emplace_back(Pred, A, B); in eliminateConstraints()
1716 Info.transferToOtherSystem(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack); in eliminateConstraints()
1729 ICmpInst::Predicate Pred; in eliminateConstraints() local
1739 Pred = ICmpInst::getNonStrictPredicate(MinMax->getPredicate()); in eliminateConstraints()
1740 AddFact(Pred, MinMax, MinMax->getLHS()); in eliminateConstraints()
1741 AddFact(Pred, MinMax, MinMax->getRHS()); in eliminateConstraints()
1748 Pred = CB.Cond.Pred; in eliminateConstraints()
1751 if (CB.DoesHold.Pred != CmpInst::BAD_ICMP_PREDICATE && in eliminateConstraints()
1752 !Info.doesHold(CB.DoesHold.Pred, CB.DoesHold.Op0, CB.DoesHold.Op1)) { in eliminateConstraints()
1755 dumpUnpackedICmp(dbgs(), Pred, A, B); in eliminateConstraints()
1757 dumpUnpackedICmp(dbgs(), CB.DoesHold.Pred, CB.DoesHold.Op0, in eliminateConstraints()
1765 m_ICmp(Pred, m_Value(A), m_Value(B)))); in eliminateConstraints()
1769 AddFact(Pred, A, B); in eliminateConstraints()