Lines Matching refs:Pred

91   CmpInst::Predicate Pred;  member
96 : Pred(CmpInst::BAD_ICMP_PREDICATE), Op0(nullptr), Op1(nullptr) {} in ConditionTy()
97 ConditionTy(CmpInst::Predicate Pred, Value *Op0, Value *Op1) in ConditionTy()
98 : Pred(Pred), Op0(Op0), Op1(Op1) {} in ConditionTy()
139 FactOrCheck(DomTreeNode *DTN, CmpInst::Predicate Pred, Value *Op0, Value *Op1, in FactOrCheck()
141 : Cond(Pred, Op0, Op1), DoesHold(Precond), NumIn(DTN->getDFSNumIn()), in FactOrCheck()
144 static FactOrCheck getConditionFact(DomTreeNode *DTN, CmpInst::Predicate Pred, in getConditionFact()
147 return FactOrCheck(DTN, Pred, Op0, Op1, Precond); in getConditionFact()
307 bool doesHold(CmpInst::Predicate Pred, Value *A, Value *B) const;
309 void addFact(CmpInst::Predicate Pred, Value *A, Value *B, unsigned NumIn,
316 ConstraintTy getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1,
326 ConstraintTy getConstraintForSolving(CmpInst::Predicate Pred, Value *Op0,
331 void transferToOtherSystem(CmpInst::Predicate Pred, Value *A, Value *B,
618 ConstraintInfo::getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1, in getConstraint() argument
625 switch (Pred) { in getConstraint()
630 Pred = CmpInst::getSwappedPredicate(Pred); in getConstraint()
636 Pred = CmpInst::ICMP_ULE; in getConstraint()
639 Pred = CmpInst::ICMP_ULE; in getConstraint()
644 Pred = CmpInst::getSwappedPredicate(CmpInst::ICMP_UGT); in getConstraint()
648 Pred = CmpInst::ICMP_ULE; in getConstraint()
655 if (Pred != CmpInst::ICMP_ULE && Pred != CmpInst::ICMP_ULT && in getConstraint()
656 Pred != CmpInst::ICMP_SLE && Pred != CmpInst::ICMP_SLT) in getConstraint()
660 bool IsSigned = CmpInst::isSigned(Pred); in getConstraint()
720 if (Pred == (IsSigned ? CmpInst::ICMP_SLT : CmpInst::ICMP_ULT)) in getConstraint()
749 ConstraintTy ConstraintInfo::getConstraintForSolving(CmpInst::Predicate Pred, in getConstraintForSolving() argument
755 if ((Pred == CmpInst::ICMP_ULE && Op0 == NullC) || in getConstraintForSolving()
756 (Pred == CmpInst::ICMP_UGE && Op1 == NullC)) { in getConstraintForSolving()
766 if (CmpInst::isSigned(Pred) && in getConstraintForSolving()
769 Pred = CmpInst::getUnsignedPredicate(Pred); in getConstraintForSolving()
772 ConstraintTy R = getConstraint(Pred, Op0, Op1, NewVariables); in getConstraintForSolving()
781 return Info.doesHold(C.Pred, C.Op0, C.Op1); in isValid()
829 bool ConstraintInfo::doesHold(CmpInst::Predicate Pred, Value *A, in doesHold() argument
831 auto R = getConstraintForSolving(Pred, A, B); in doesHold()
837 CmpInst::Predicate Pred, Value *A, Value *B, unsigned NumIn, in transferToOtherSystem() argument
850 switch (Pred) { in transferToOtherSystem()
859 addFact(CmpInst::getSignedPredicate(Pred), A, B, NumIn, NumOut, in transferToOtherSystem()
869 addFact(CmpInst::getSignedPredicate(Pred), A, B, NumIn, NumOut, in transferToOtherSystem()
910 CmpInst::Predicate Pred; in addInfoForInductions() local
913 m_Br(m_ICmp(Pred, m_Value(A), m_Value(B)), m_Value(), m_Value()))) in addInfoForInductions()
917 Pred = CmpInst::getSwappedPredicate(Pred); in addInfoForInductions()
927 if (Pred == CmpInst::ICMP_NE) in addInfoForInductions()
929 else if (Pred == CmpInst::ICMP_EQ) in addInfoForInductions()
1040 assert((Pred == CmpInst::ICMP_EQ || Pred == CmpInst::ICMP_NE) && in addInfoForInductions()
1074 CmpInst::Predicate Pred; in addInfoFor() local
1075 if (!match(I.getOperand(0), m_ICmp(Pred, m_Value(A), m_Value(B)))) in addInfoFor()
1081 DT.getNode(I.getParent()), Pred, A, B)); in addInfoFor()
1196 static void dumpUnpackedICmp(raw_ostream &OS, ICmpInst::Predicate Pred, in dumpUnpackedICmp() argument
1198 OS << "icmp " << Pred << ' '; in dumpUnpackedICmp()
1211 ICmpInst::Predicate Pred; member
1215 ReproducerEntry(ICmpInst::Predicate Pred, Value *LHS, Value *RHS) in ReproducerEntry()
1216 : Pred(Pred), LHS(LHS), RHS(RHS) {} in ReproducerEntry()
1270 if (Entry.Pred != ICmpInst::BAD_ICMP_PREDICATE) in generateReproducer()
1271 CollectArguments({Entry.LHS, Entry.RHS}, ICmpInst::isSigned(Entry.Pred)); in generateReproducer()
1334 if (Entry.Pred == ICmpInst::BAD_ICMP_PREDICATE) in generateReproducer()
1338 dumpUnpackedICmp(dbgs(), Entry.Pred, Entry.LHS, Entry.RHS); in generateReproducer()
1340 CloneInstructions({Entry.LHS, Entry.RHS}, CmpInst::isSigned(Entry.Pred)); in generateReproducer()
1342 auto *Cmp = Builder.CreateICmp(Entry.Pred, Entry.LHS, Entry.RHS); in generateReproducer()
1355 static std::optional<bool> checkCondition(CmpInst::Predicate Pred, Value *A, in checkCondition() argument
1360 auto R = Info.getConstraintForSolving(Pred, A, B); in checkCondition()
1385 dbgs(), *ImpliedCondition ? Pred : CmpInst::getInversePredicate(Pred), in checkCondition()
1442 ICmpInst::Predicate Pred = in checkAndReplaceMinMax() local
1445 Pred, MinMax->getOperand(0), MinMax->getOperand(1), MinMax, Info)) in checkAndReplaceMinMax()
1448 Pred, MinMax->getOperand(1), MinMax->getOperand(0), MinMax, Info)) in checkAndReplaceMinMax()
1498 CmpInst::Predicate Pred; in checkOrAndOpImpliedByOther() local
1511 m_ICmp(Pred, m_Value(A), m_Value(B)))) in checkOrAndOpImpliedByOther()
1517 Pred = CmpInst::getInversePredicate(Pred); in checkOrAndOpImpliedByOther()
1521 Info.addFact(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack); in checkOrAndOpImpliedByOther()
1551 void ConstraintInfo::addFact(CmpInst::Predicate Pred, Value *A, Value *B, in addFact() argument
1557 auto R = getConstraint(Pred, A, B, NewVariables); in addFact()
1563 LLVM_DEBUG(dbgs() << "Adding '"; dumpUnpackedICmp(dbgs(), Pred, A, B); in addFact()
1649 auto DoesConditionHold = [](CmpInst::Predicate Pred, Value *A, Value *B, in tryToSimplifyOverflowMath()
1651 auto R = Info.getConstraintForSolving(Pred, A, B); in tryToSimplifyOverflowMath()
1783 auto AddFact = [&](CmpInst::Predicate Pred, Value *A, Value *B) { in eliminateConstraints() argument
1785 dumpUnpackedICmp(dbgs(), Pred, A, B); dbgs() << "\n"); in eliminateConstraints()
1786 if (Info.getCS(CmpInst::isSigned(Pred)).size() > MaxRows) { in eliminateConstraints()
1793 Info.addFact(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack); in eliminateConstraints()
1795 ReproducerCondStack.emplace_back(Pred, A, B); in eliminateConstraints()
1797 Info.transferToOtherSystem(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack); in eliminateConstraints()
1810 ICmpInst::Predicate Pred; in eliminateConstraints() local
1823 Pred = ICmpInst::getNonStrictPredicate(MinMax->getPredicate()); in eliminateConstraints()
1824 AddFact(Pred, MinMax, MinMax->getLHS()); in eliminateConstraints()
1825 AddFact(Pred, MinMax, MinMax->getRHS()); in eliminateConstraints()
1832 Pred = CB.Cond.Pred; in eliminateConstraints()
1835 if (CB.DoesHold.Pred != CmpInst::BAD_ICMP_PREDICATE && in eliminateConstraints()
1836 !Info.doesHold(CB.DoesHold.Pred, CB.DoesHold.Op0, CB.DoesHold.Op1)) { in eliminateConstraints()
1839 dumpUnpackedICmp(dbgs(), Pred, A, B); in eliminateConstraints()
1841 dumpUnpackedICmp(dbgs(), CB.DoesHold.Pred, CB.DoesHold.Op0, in eliminateConstraints()
1849 m_ICmp(Pred, m_Value(A), m_Value(B)))); in eliminateConstraints()
1853 AddFact(Pred, A, B); in eliminateConstraints()