• Home
  • Raw
  • Download

Lines Matching refs:CmpInst

91 static bool isSameCompare(Value *V, CmpInst::Predicate Pred, Value *LHS,  in isSameCompare()
93 CmpInst *Cmp = dyn_cast<CmpInst>(V); in isSameCompare()
96 CmpInst::Predicate CPred = Cmp->getPredicate(); in isSameCompare()
100 return CPred == CmpInst::getSwappedPredicate(Pred) && CLHS == RHS && in isSameCompare()
369 static Value *ThreadCmpOverSelect(CmpInst::Predicate Pred, Value *LHS, in ThreadCmpOverSelect()
379 Pred = CmpInst::getSwappedPredicate(Pred); in ThreadCmpOverSelect()
493 static Value *ThreadCmpOverPHI(CmpInst::Predicate Pred, Value *LHS, Value *RHS, in ThreadCmpOverPHI()
502 Pred = CmpInst::getSwappedPredicate(Pred); in ThreadCmpOverPHI()
1923 return CmpInst::makeCmpResultType(Op->getType()); in GetCompareTy()
1929 static Value *ExtractEquivalentCondition(Value *V, CmpInst::Predicate Pred, in ExtractEquivalentCondition()
1934 CmpInst *Cmp = dyn_cast<CmpInst>(SI->getCondition()); in ExtractEquivalentCondition()
1940 if (Pred == CmpInst::getSwappedPredicate(Cmp->getPredicate()) && in ExtractEquivalentCondition()
1976 const DominatorTree *DT, CmpInst::Predicate Pred, in computePointerICmp()
1984 (Pred == CmpInst::ICMP_EQ || Pred == CmpInst::ICMP_NE)) in computePointerICmp()
1986 !CmpInst::isTrueWhenEqual(Pred)); in computePointerICmp()
1994 case CmpInst::ICMP_EQ: in computePointerICmp()
1995 case CmpInst::ICMP_NE: in computePointerICmp()
2000 case CmpInst::ICMP_UGT: in computePointerICmp()
2001 case CmpInst::ICMP_UGE: in computePointerICmp()
2002 case CmpInst::ICMP_ULT: in computePointerICmp()
2003 case CmpInst::ICMP_ULE: in computePointerICmp()
2025 if (Pred == CmpInst::ICMP_EQ || Pred == CmpInst::ICMP_NE) { in computePointerICmp()
2070 !CmpInst::isTrueWhenEqual(Pred)); in computePointerICmp()
2081 !CmpInst::isTrueWhenEqual(Pred)); in computePointerICmp()
2132 !CmpInst::isTrueWhenEqual(Pred)); in computePointerICmp()
2146 CmpInst::isFalseWhenEqual(Pred)); in computePointerICmp()
2157 CmpInst::Predicate Pred = (CmpInst::Predicate)Predicate; in SimplifyICmpInst()
2158 assert(CmpInst::isIntPredicate(Pred) && "Not an integer compare!"); in SimplifyICmpInst()
2166 Pred = CmpInst::getSwappedPredicate(Pred); in SimplifyICmpInst()
2176 return ConstantInt::get(ITy, CmpInst::isTrueWhenEqual(Pred)); in SimplifyICmpInst()
2443 CmpInst::getInversePredicate(Pred), RHS_CR); in SimplifyICmpInst()
2627 (CmpInst::isUnsigned(Pred) && LBO->hasNoUnsignedWrap()) || in SimplifyICmpInst()
2628 (CmpInst::isSigned(Pred) && LBO->hasNoSignedWrap()); in SimplifyICmpInst()
2633 (CmpInst::isUnsigned(Pred) && RBO->hasNoUnsignedWrap()) || in SimplifyICmpInst()
2634 (CmpInst::isSigned(Pred) && RBO->hasNoSignedWrap()); in SimplifyICmpInst()
2741 if (!CmpInst::isUnsigned(Pred) && match(LHS, m_Neg(m_ZExt(m_Value())))) { in SimplifyICmpInst()
2904 CmpInst::Predicate P = CmpInst::BAD_ICMP_PREDICATE; in SimplifyICmpInst()
2905 CmpInst::Predicate EqP; // Chosen so that "A == max/min(A,B)" iff "A EqP B". in SimplifyICmpInst()
2910 EqP = CmpInst::ICMP_SGE; // "A == smax(A, B)" iff "A sge B". in SimplifyICmpInst()
2916 EqP = CmpInst::ICMP_SGE; // "A == smax(A, B)" iff "A sge B". in SimplifyICmpInst()
2918 P = CmpInst::getSwappedPredicate(Pred); in SimplifyICmpInst()
2922 EqP = CmpInst::ICMP_SLE; // "A == smin(A, B)" iff "A sle B". in SimplifyICmpInst()
2925 P = CmpInst::getSwappedPredicate(Pred); in SimplifyICmpInst()
2929 EqP = CmpInst::ICMP_SLE; // "A == smin(A, B)" iff "A sle B". in SimplifyICmpInst()
2934 if (P != CmpInst::BAD_ICMP_PREDICATE) { in SimplifyICmpInst()
2939 case CmpInst::ICMP_EQ: in SimplifyICmpInst()
2940 case CmpInst::ICMP_SLE: in SimplifyICmpInst()
2952 case CmpInst::ICMP_NE: in SimplifyICmpInst()
2953 case CmpInst::ICMP_SGT: { in SimplifyICmpInst()
2954 CmpInst::Predicate InvEqP = CmpInst::getInversePredicate(EqP); in SimplifyICmpInst()
2967 case CmpInst::ICMP_SGE: in SimplifyICmpInst()
2970 case CmpInst::ICMP_SLT: in SimplifyICmpInst()
2977 P = CmpInst::BAD_ICMP_PREDICATE; in SimplifyICmpInst()
2980 EqP = CmpInst::ICMP_UGE; // "A == umax(A, B)" iff "A uge B". in SimplifyICmpInst()
2986 EqP = CmpInst::ICMP_UGE; // "A == umax(A, B)" iff "A uge B". in SimplifyICmpInst()
2988 P = CmpInst::getSwappedPredicate(Pred); in SimplifyICmpInst()
2992 EqP = CmpInst::ICMP_ULE; // "A == umin(A, B)" iff "A ule B". in SimplifyICmpInst()
2995 P = CmpInst::getSwappedPredicate(Pred); in SimplifyICmpInst()
2999 EqP = CmpInst::ICMP_ULE; // "A == umin(A, B)" iff "A ule B". in SimplifyICmpInst()
3004 if (P != CmpInst::BAD_ICMP_PREDICATE) { in SimplifyICmpInst()
3009 case CmpInst::ICMP_EQ: in SimplifyICmpInst()
3010 case CmpInst::ICMP_ULE: in SimplifyICmpInst()
3022 case CmpInst::ICMP_NE: in SimplifyICmpInst()
3023 case CmpInst::ICMP_UGT: { in SimplifyICmpInst()
3024 CmpInst::Predicate InvEqP = CmpInst::getInversePredicate(EqP); in SimplifyICmpInst()
3037 case CmpInst::ICMP_UGE: in SimplifyICmpInst()
3040 case CmpInst::ICMP_ULT: in SimplifyICmpInst()
3052 if (Pred == CmpInst::ICMP_SGE) in SimplifyICmpInst()
3055 if (Pred == CmpInst::ICMP_SLT) in SimplifyICmpInst()
3062 if (Pred == CmpInst::ICMP_SLE) in SimplifyICmpInst()
3065 if (Pred == CmpInst::ICMP_SGT) in SimplifyICmpInst()
3072 if (Pred == CmpInst::ICMP_UGE) in SimplifyICmpInst()
3075 if (Pred == CmpInst::ICMP_ULT) in SimplifyICmpInst()
3082 if (Pred == CmpInst::ICMP_ULE) in SimplifyICmpInst()
3085 if (Pred == CmpInst::ICMP_UGT) in SimplifyICmpInst()
3165 CmpInst::Predicate Pred = (CmpInst::Predicate)Predicate; in SimplifyFCmpInst()
3166 assert(CmpInst::isFPPredicate(Pred) && "Not an FP compare!"); in SimplifyFCmpInst()
3174 Pred = CmpInst::getSwappedPredicate(Pred); in SimplifyFCmpInst()
3196 return ConstantInt::get(GetCompareTy(LHS), CmpInst::isUnordered(Pred)); in SimplifyFCmpInst()
3201 if (CmpInst::isTrueWhenEqual(Pred)) in SimplifyFCmpInst()
3203 if (CmpInst::isFalseWhenEqual(Pred)) in SimplifyFCmpInst()
3330 if (CmpInst *C = dyn_cast<CmpInst>(I)) { in SimplifyWithOpReplaced()
3359 if (CmpInst *C = dyn_cast<CmpInst>(I)) in SimplifyWithOpReplaced()
3862 if (CmpInst::isIntPredicate((CmpInst::Predicate)Predicate)) in SimplifyCmpInst()