Lines Matching refs:CmpInst

69   CmpInst::Predicate Pred;
73 PreconditionTy(CmpInst::Predicate Pred, Value *Op0, Value *Op1) in PreconditionTy()
143 bool doesHold(CmpInst::Predicate Pred, Value *A, Value *B) const;
145 void addFact(CmpInst::Predicate Pred, Value *A, Value *B, bool IsNegated,
152 ConstraintTy getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1,
158 ConstraintTy getConstraint(CmpInst *Cmp, in getConstraint()
166 void transferToOtherSystem(CmpInst::Predicate Pred, Value *A, Value *B,
244 Preconditions.emplace_back(CmpInst::ICMP_SGE, Op0, in decompose()
261 CmpInst::ICMP_UGE, Op0, in decompose()
277 ConstraintInfo::getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1, in getConstraint()
282 case CmpInst::ICMP_UGT: in getConstraint()
283 case CmpInst::ICMP_UGE: in getConstraint()
284 case CmpInst::ICMP_SGT: in getConstraint()
285 case CmpInst::ICMP_SGE: { in getConstraint()
286 Pred = CmpInst::getSwappedPredicate(Pred); in getConstraint()
290 case CmpInst::ICMP_EQ: in getConstraint()
292 Pred = CmpInst::ICMP_ULE; in getConstraint()
295 Pred = CmpInst::ICMP_ULE; in getConstraint()
298 case CmpInst::ICMP_NE: in getConstraint()
301 Pred = CmpInst::getSwappedPredicate(CmpInst::ICMP_UGT); in getConstraint()
309 if (Pred != CmpInst::ICMP_ULE && Pred != CmpInst::ICMP_ULT && in getConstraint()
310 Pred != CmpInst::ICMP_SLE && Pred != CmpInst::ICMP_SLT) in getConstraint()
314 bool IsSigned = CmpInst::isSigned(Pred); in getConstraint()
364 if (Pred == (IsSigned ? CmpInst::ICMP_SLT : CmpInst::ICMP_ULT)) in getConstraint()
379 bool ConstraintInfo::doesHold(CmpInst::Predicate Pred, Value *A, in doesHold()
390 getCS(CmpInst::isSigned(Pred)).isConditionImplied(R.Coefficients); in doesHold()
394 CmpInst::Predicate Pred, Value *A, Value *B, bool IsNegated, unsigned NumIn, in transferToOtherSystem()
406 case CmpInst::ICMP_ULT: in transferToOtherSystem()
408 if (doesHold(CmpInst::ICMP_SGE, B, ConstantInt::get(B->getType(), 0))) { in transferToOtherSystem()
409 addFact(CmpInst::ICMP_SGE, A, ConstantInt::get(B->getType(), 0), in transferToOtherSystem()
411 addFact(CmpInst::ICMP_SLT, A, B, IsNegated, NumIn, NumOut, DFSInStack); in transferToOtherSystem()
414 case CmpInst::ICMP_SLT: in transferToOtherSystem()
415 if (doesHold(CmpInst::ICMP_SGE, A, ConstantInt::get(B->getType(), 0))) in transferToOtherSystem()
416 addFact(CmpInst::ICMP_ULT, A, B, IsNegated, NumIn, NumOut, DFSInStack); in transferToOtherSystem()
418 case CmpInst::ICMP_SGT: in transferToOtherSystem()
419 if (doesHold(CmpInst::ICMP_SGE, B, ConstantInt::get(B->getType(), -1))) in transferToOtherSystem()
420 addFact(CmpInst::ICMP_UGE, A, ConstantInt::get(B->getType(), 0), in transferToOtherSystem()
423 case CmpInst::ICMP_SGE: in transferToOtherSystem()
424 if (doesHold(CmpInst::ICMP_SGE, B, ConstantInt::get(B->getType(), 0))) { in transferToOtherSystem()
425 addFact(CmpInst::ICMP_UGE, A, B, IsNegated, NumIn, NumOut, DFSInStack); in transferToOtherSystem()
441 CmpInst *Condition;
447 ConstraintOrBlock(DomTreeNode *DTN, CmpInst *Condition, bool Not) in ConstraintOrBlock()
574 void ConstraintInfo::addFact(CmpInst::Predicate Pred, Value *A, Value *B, in addFact()
586 assert(CmpInst::isSigned(Pred) == R.IsSigned && in addFact()
626 auto DoesConditionHold = [](CmpInst::Predicate Pred, Value *A, Value *B, in tryToSimplifyOverflowMath()
633 auto &CSToUse = Info.getCS(CmpInst::isSigned(Pred)); in tryToSimplifyOverflowMath()
642 if (!DoesConditionHold(CmpInst::ICMP_SGE, A, B, Info) || in tryToSimplifyOverflowMath()
643 !DoesConditionHold(CmpInst::ICMP_SGE, B, in tryToSimplifyOverflowMath()